Re: Scripting


Subject: Re: Scripting
From: Mike Meyer (mwm@mired.org)
Date: Fri Jun 23 2000 - 21:05:34 CDT


Aaron Lehmann writes:
> Warning: what I am about to discuss is probably pretty contraversial. I
> don't want to start a language war. These are just my opinions! I want to
> propose some topics for discussion but NO FLAMES PLEASE!

You know, I was planning on a message with just this subject today. In
fact, my first response was "did I write it and forget?" So no
flames. No language war, either. How about a technology war?

> Before you flame me, please read the guile page. It explains a lot of this
> stuff. I am expecting the luddites to not agree with me ;).

Well, I agree about scripting, but disagree about Guile. Guile is a
Unix scripting technology. In this case, Windows has the better
solution. The Windows technology isn't very portable, but there is a
Unix version of that technology, and that is portable - more so than
Guile.

First, the scenario I was going to present to show an example of why
you would want scripting.

Let's start with someone running an ISP. Naturally, all their billing
is computerized. Most of their customers are quite happy getting email
from the monthly billing run, but a few stick-in-the muds want paper
mail. It'd be easy to dump flat ascii to the printer (along with an
envelope), but that's not very pretty. With proper scripting support
in AbiWord, it could be used to insert the appropriate values in a
template file, and then print a nice looking letter.

This example is from a book, and it uses MSWord and Python on
Windows. I'd like to be able to that on Unix, using AbiWord.

As Aaron intimated, you should also be able to customize a lot of the
behavior of AbiWord this way. In fact, more than one product I've
dealt with did preference saving by dumping a script that set all the
appropriate internal variables.

Finally, such scripting means you can start building regression
testing scripts, which I'm sure most developers would like.

Assuming you've got this far, you're interested in scripting. So now
we get to the technology. Guile is a Unix solution - the language is
imbedded in the application.

I'd propose CORBA. The language is *not* imbedded in application. It's
outside it. Internally, CORBA support means adding wrappers to
internal objects you want to be scriptable. Scripts typcially run in
external processes, and can use any language they want. Erik could
script in Python (I script my window manager in Python via CORBA),
Aaron could write Scheme, and others could also use Java, C, or any
other language with a CORBA ORB (the code that links into your
application) - which means pretty much anything, even Perl

For XP, CORBA wins because you don't need to convince the
sources to the ORB to compile on multiple platforms. You can use
different ORBs on different platforms. On Windows, CORBA objects can
be exported to DCOM, meaning that we get VB support there even if it
doesn't have CORBA support.

Gnome has CORBA support - including it's own ORB. Other Gnome
applications have some form of CORBA support, so it seems like a
natural choice for AbiWord.

Erik's comment about it being a geek thing are correct - but I'm
willing to tackle this one, even though I'd previously stated that I
WP's aren't my kind of thing. Scripting is, and I thought of this
after making that statement.

        <mike



This archive was generated by hypermail 2b25 : Fri Jun 23 2000 - 21:12:56 CDT