Tom Edelson's Songline
Writing about computers, life, and society from the perspective of a "poly Quaker Taoist" living in the Triangle region of North Carolina.

















Subscribe to "Tom Edelson's Songline" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.


Monday, May 21, 2007
 


In my April 23 post, I said that I intended to write a Moneydance extension which would make Moneydance scriptable from [one of the Java implementations of] Scheme.  I'd still like to do that, but have tentatively decided that that will not be the first Moneydance extension that I will loose upon the world.  The first one will still be a scripting interface, but for a different scripting language: BeanShell.

So what's Beanshell?  The really short answer is that BeanShell is interpreted, simplified Java.  "Simplified" in several senses; one is that declaring the types of your variables is optional in BeanShell.  Also, BeanShell can be run in a "console" mode in which you type a single BeanShell statement, and it is executed immediately. 

A BeanShell call to a Java method looks exactly like a Java call to the same method.  Behind the scenes, the BeanShell interpreter uses the Java "reflection" API to invoke the method.

This means that, while you can use BeanShell to write and run what we ordinarily think of as "scripts", you can also use it as a learning tool.  If the Javadoc for an API doesn't make it crystal clear just how to write that method call that you need, a little experimentation can usually clear it up.  You can do that experimentation in Java, of course, but doing it in BeanShell tends to be considerably faster.

Now actually, the same ability to experiment quickly with a Java API is also present in at least one of the Scheme implementations: namely, JScheme.  The difference is that, in order to use JScheme in that manner, you have to know how to program in Scheme, and also know a good bit about Java: at least enough to read Javadoc.  It's a pretty good bet that more people, today, know Java than know Scheme, but it's a dead solid cinch that more people know Java than know both.  (Perhaps you've never heard of BeanShell before, but if you know Java, then I've already told you nearly everything you need to know in order to get started in using BeanShell to explore an API.)

So there's the major reason for the change in plans: the BeanShell scripting interface has a bigger potential user base than a Scheme scripting interface does.  In particular, the BeanShell scripting interface should be useful to anyone engaged in learning the Moneydance API, in order to write their own Moneydance extension(s).  It might even encourage more people to do so.

The plan is, as I said, "tentative".  Why?  Mostly because I'd probably abandon it, if I found out that someone else was already working on the same thing, and had a big head start.  That consideration is part of the reason for this vaporware announcement; I'm hoping to get the word out such that, if my undertaking it would indeed be a duplication of effort, I'll find out.

I suppose I'd also reconsider the change of plan if this posting led to a great clamor of demand for me to implement a Scheme-Moneydance scripting interface as soon as possible.  Or, for that matter, if it resulted in squadrons of pigs flying around my house at all hours.

Categorie(s) for this post include: Personal Finance Software; Java.



4:20:13 PM    comment []



Click here to visit the Radio UserLand website. © Copyright 2007 Tom Edelson.
Last update: 6/8/07; 4:05:16 PM.
May 2007
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Apr   Jun