JavaScriptSearch Tuesday, May 30, 2006; 03:27 AM
The large family of Ajax / JavaScript development frameworks was further expanded with the addition of another web development tool. Protowidget is developed by small IT company Redcode with the goal of meeting the specific needs of their customers. As the name suggests, it is driven by "the simplicity of Prototype, the
widgets/templates from Dojo and the event-based property binding
support from OpenLaszlo/Flex." Protowidget was announced with an extensive article on Redcode owner Terry Laurenzo's blog at http://www.rcode.net/blog/tlaurenzo/introducing-protowidget. Here is how he describes the shortcomings of various AJAX frameworks he has used, which made him go with the creation of Protowidget:
- ID-madness: Some frameworks (ie. Dojo) attempt to avoid this, but
most make the primary coupling point between JavaScript and HTML be the
ID attribute. While many have shown this to work, it is somewhat
offensive to have only one flat namespace. This becomes an especial
problem when trying to create repeating sections or scoped, re-usable
components. Since the namespace is flat, it also causes problems when
one component needs to logically interact with others.
- Non-standard UI construction: At the end of the day, HTML+CSS is a
pretty good tool for laying out web-based UIs. We can certainly come up
with better representations, but they are rarely as rich and they are
typically not designer friendly. Despite a lot of other great ideas, I
consider this to be OpenLaszlo’s primary failing. Other frameworks
which take the Swing-esque approach of coding the UI programatically by
assembling objects are even weaker.
- No client side model: Years ago someone co-opted the long standing
MVC design pattern and claimed that having servlets and views somehow
conformed to the pattern. Maybe it technically does, but it is
certainly not in the spirit of MVC as seen in real client-side apps.
Today, we have an interesting inversion going on where most people
think that the web-MVC (type II or whatever) pattern is classical-MVC.
We need to be applying some classical-MVC principles to our client-side
interfaces. Otherwise, we will end up with as much spaghetti as can be
found in an old-school VB6 app. OpenLaszlo and Flex with their
pervasive property bindings provide the building blocks for this type
of development. Few others do.
- Separating form from function: This is the holy grail, and likely
no tool will ever get 100% there. The idea is that the visual layout
and characteristics should be specified out-of-band from the code that
manipulates it. A good framework should have well-defined intersection
points where the visual bits mix and interact with the programmatic
bits.
Protowidget is in the initial stages of development, and it remains to be seen whether the new framework will address the issues, listed above, properly. A simple demonstration of Protowidget is available at http://www.rcode.net/stage/trunk/protowidget/test/bind_test.html . Current snapshop of source code (45KB ZIP file) is at http://www.rcode.net/stage/protowidget_2006_05_29.zip . The number of Ajax / JavaScript development frameworks has been rising steadily in recent months. According to various counts, there are between 100 and 150 of them.
|