Hmm...good question. :) Struts BSF is a very simple project that lets you write a Struts action using a BSF-supported scripting language. The advantage of this project is you can use any BSF-compatible language including Python, Ruby, Groovy, Javascript, Perl and even VBScript (on windows). The disadvantage is BSF tries to be support many languages and thus is stuck at lowest common denominator. As a result, it doesn't support compilation of scripts very well, so I was rather dismayed by the performance hit. I tried to cache at least the value of the script in memory, but it still had to be compiled each time.

Personally, I'm much more interested in Struts Flow. Struts Flow has the goal of bringing Continuations-based capabilities to web applications in general, Struts specifically (see the website for an explanation of what Continuations are and what they mean to web programming). Currently, the only stable and free implementation of continuations is Rhino, the Java-based Javascript implementation, however, Cocoon is working on Java continuations support which would open the door up to, of course Java, but also any scripting language that can compile to byte code (Jython and Groovy come to mind). RIFE also has Java support for continuations, but I understand it is limited. Struts Flow makes really complicated processes like dynamic wizards very easy and almost trivial, without requiring any Javascript on the client side or Back button restrictions.

Anyways, I give that history to show how perhaps on the surface the projects are similar, they really differ in focus. BSF just tries to bring scripting to Struts, but Struts Flow focuses on continuations, which currently happen to involve Rhino. I think Struts Flow has much more opportunity for revolutionizing web development and the problems BSF has of compilation, Flow doesn't have since it is pretty tied to Javascript and can take advantage of every optimization feature. So I wouldn't say I've "dropped" BSF, but I don't think it has the potential that Struts Flow has, however I don't mind maintaining it for those that just want to write Struts actions with scripting languages.

Don

Joe Germuska wrote:

Struts Flow allows you to use a Javascript function to replace a Struts action. I use iBATIS to run SQL queries and return Lists of Maps (a Map keyed by column names in the result set), then feed those Maps to the JSP. Struts Flow provides a jsobjectToMap function that lets you convert a Javascript object to a Map, and likewise, a ScriptableMap which lets you access a Map as if it was a Javascript object.


Don:

I haven't been following too closely -- have you pretty much dropped struts-bsf in favor of struts-flow? struts-flow was the one which was kind of inspired by some Cocoon practices, right?

If you have a few minutes to give us a state-of-the-art on it, I'd appreciate it.

Joe

--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll know I'm in the wrong place."
- Carlos Santana


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to