Re: my shortlist of GNOME wishes



As far as scripting GNOME apps goes, I think that anything above and beyond
the idea that people had mentioned before about being able to "graphically
pipe" a couple of applications together via some simple tool is overkill.

Think about it: first off, we're talking about GUI programs, with all of the
myriad function calls required for handling gui events, talking to the
framework, etc.  That's a lot of overhead, and in a human-computer
interaction mode, it's fine because the slowest part of the equation is
usually the human.  But in the automated scenario, there's a lot going on
all of a sudden that has nothing at all to do with the task at hand.  For
instance, you'd have to either start up all of the apps that the script used
before hand, or wait while all of the data & code for the GUI (which you're
not directly going to use) loads into memory during script processing,
slowing down the script tremendously.

Then, the app has to have some type of simple interface to deal with the
data being sent to it, OR the scripting tool/script author has to simulate
every single GUI event necessary to get the data in through the normal
GUI -- every single mouse-move, -click and key-press (i.e., the script
engine would have to take a string passed to it as output from one app and
pick it apart, simulating a separate key press for every single character
for input into, say, a text box in the other app). There is a really great
app for the Mac, QuickKeys, that basically does this. But AFAIK it does it
this way because on the Mac there is no other way to do it.  And if
something is slightly wrong (the target app pops its window up in a
different place, some other event interferes with the scripted sequence of
events), it blows up.

The reason scripting works so well on Unix is you have lots of little apps
which load and run quickly and have VERY well defined, SIMPLE interfaces
(ie, you can talk to me via stdin, command-line args, and env variables, and
I'll talk to you via my stdout & stderr -- you give me input I like, I
processs, you give me input I don't like, I bail)

I'd say to do it right, you'd need some kind of GNOME framework for
scriptability.  I guess perhaps with Bonobo, this wouldn't be as hard to
come up with (don't really know -- haven't looked at Bonobo -- but if my
understanding of it is not way off base, seems like apps could implement
some kind of Scriptable interface which allowed a script author or scripting
engine to interrogate the app to see what functions were available for
calling from a script & what kind of object it wanted as a parameter, etc.).
That would be much more efficient.  But it would take effort on the part of
the application developer to be script-friendly.

What I think would be very very cool is to have every single application
author write applications in such a way that the core functionality was
entirely encapsulated in a library, with a GUI wrapper, a command-line
interface wrapper, a GNOME_SCRIPT architecture wrapper, and an
any-other-wrapper-anyone-cared-to-write wrapper.  And if there were no
economic pressures and people lived forever, it might even be a reasonable
expectation.

The only benefit I really see to this is that if someone comes to Linux/Unix
and learns only the GUI, and then wants automation, they don't have to learn
10 new tools (scripting language + command-line tools), just the scripting
language/engine.

OTOH, your idea about a graphical scripting tool that uses a GUI as a front
end to command-line tools is excellent; much more doable from a programmer
standpoint, and useful for the "MacOS refugee" you cite, who doesn't want to
learn all the CLI tools.

My War and Peace, er, 2 cents ;-)

Dave Neuer

-----Original Message-----
From: Mike Swieton <pyromage@ync.net>
To: gnome-list@gnome.org <gnome-list@gnome.org>
Date: Thursday, August 19, 1999 6:05 PM
Subject: Re: my shortlist of GNOME wishes


>What if you had a "script generator" program? The end result is that you
can
>go through and add actions to a list of things it should do. You could have
>actions like "Search through files for a string" (i.e. it ought to run
>grep), and new programs would be addable via a module/plugin interface, so
>that it's extensible. Along with this would be a GNOME-specific interface,
>which would allow actions done that would normally require a mouse (or user
>input), like clicking buttons in applications and stuff. Then you'd hit a
>generate button, and it would pop up a window with the output saying what
>you want to do with it.
>
>Between the ability to modify open windows (Not sure if this would be
>possible; If it is it'd be necessary... Perhaps an app could have the
>GNOME-compliant window manager do it?), combined with a clean GUI interface
>to cryptic commands like sed, or controls like if's and stuff (and the
>inevitable complexity involved in manipulating windows via command-line),
it
>would be a great tool. If you could get it to output comments it would also
>function as a teaching aid, so the user can learn REAL scripting if he so
>desires.
>
>I am not sure if this is possible, but if it could be done well, i believe
>it would allow for the automation and scripting you want, so power users
can
>easily automate things, while at the same time allowing a simple
>point-and-click GUI for the MacOS refugee.
>
>Comments?
>
>>>I think that the GUI paradigm is somewhat antithetical to scripting;
GUI's
>>>are all about interaction, human-to-computer interface.  Scripting is
about
>>>automation, computer-to-computer interface.  MacOS has an Open Scripting
>>>Architecture, an API which allows authors of gui apps to make their apps
>>>scriptable.  MacOS has to do this because it doesn't have a command-line
>>>interface.  GNOME could conceivably provide an API like this too, but why
>>>should it?  Unlike the MacOS, Unix/Linux already has a command line and
>>>powerful scripting languages/engines.  It has lots of little programs
which
>>>do one specific thing in a flexible, powerful way and languages to tie
>>these tools together.  That's the Unix philosophy.
>
>
>--
>        FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
>         To unsubscribe: mail gnome-list-request@gnome.org with
>                       "unsubscribe" as the Subject.
>
>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]