Forum OpenACS Q&A: Rich Internet Apps
I've been looking around at Rich Internet Apps, and frameworks that support RIAs. I remember there was discussion of Laszlo a while back, and we all thought it was cool. However integrating it into OpenACS seemed overly complex.
I was exploring Rails way of approaching it. The Xmlhttp requests are directly mapped to methods in the controller, So the developer has to only think about which component of his view maps to a method. The rest the framework takes care.
One of the way we do this in openacs is by providing a way for xmlhttp requests to be directed to a single URL in a package ( or even to a single url on the site ):
In the Notes package we can have a script www/view.adp or tcl. Then we define all the "adp lets" in the lib directory and call the appropriate adp piece. The XMLHTTP requests would have a single url and a query variable called method which the "view" page serves.
I believe it was all coded from scratch without use of Macromedia's dev environment. I am not sure what the effort was, but the result was gorgeous.
Ernie (one of the principals in the LAMS project), can you tell us what your experience has been with Flash and what you think?
This is working to speed up forms a lot because rather then picking through a select box with hundreds of entries users can just start typing to get to their selection.
It might be interesting to see something like this in ad_form so OpenACS could have AJAX style-autocomplete out of the box.
The most difficult part is to get Flash developers, as most of the people that work with Flash are graphic designers but not programmers that can do actual code in actionscript (the scripting language Macromedia uses).
The communication between the Flash movie and the backend is done thru an open XML data transfer standard called WDDX (http://www.openwddx.org/). It's a bit of a nightmare to get your head around it, but in principle, it allows you to serialize Java objects and pass them to Flash, and Flash can make sense of them. However, as you can imagine it ain't so easy, as Flash does not have a rich varieaty of datatypes as Java does, so there's quite a fiddling to do there.
We are currently redoing the entire Flash interface for the next LAMS release (which includes I18N in Flash, resizeable windows, change skins on the fly, etc) and the most difficult part has been the time that it takes you to create a framework in Flash that allows you to do all this. We looked at Lazlo but realized that it wasn't going to be as easy and didn't provide the flexibility we wanted so we went with our home brew recipe.
Surprisingly enough, at times the fact that you require Flash clients on browsers seems to be a bit of a burden for system admins at some Universities or highschools. In addition, Firefox seems to have a memory leak when using Flash for a while (we have experience this at times). Hopefully that will be fix shortly by the Macromedia fellows, but until it gets fix, your application might be suffering a bit, which might be a thing to take into account.
Overall, if you want to go Flash all the way, probably the most difficult part is to get good Flash devs that understand what an object is and are not scared to parse very large and cryptic XML documents
If you want to have a look at the Flash source code in LAMS, you can download the source code from the lamsfoundation.org site.
Hope that helps,
I found it interesting.
a light weight framework to script in xml and generate flash websites.