Sunday, June 13, 2010

Using js as flash-like application development language

To pursue the former post that stated that browser is the natural way to perform the V part of the MVC pattern, we could now focus a little more on this approach.

When we develop with flash, silverlight or javafx, we use three languages(two for javafx) : the domain language, xml and css. It is actually the same as for classical web development : html (subset of xml), js, and css. Even more, flash through actionscript is quite similar to js.

So why do we still using Flash, silverlight or javafx? It is mainly because of :
* vectorial nature of the languages, and the timeline, or states notions which are natively implemented
* the integrated solution for the client/server concern
* the highly efficient tools which are proposed
* the compatibility with the existing server libraries (java and dotNet especially)
* other?

Apart the lack of tools, we can see nothing particuliar which can't be done by the html, js, css tuple... Take a look at javafx ; a javafx UI is composed of a tree of nodes, and terminal nodes are vectorial graphical ones. The language itself is very near to the js syntax with in addition the ability to have strong typing, and a very useful feature called "bind" we don't find elsewhere natively.

If we took a glance to the DOM, what is it? A tree of nodes too, but the leaves have not true vectorial nature.

If we replaced the html widgets by vectorial "home made" ones (e.g. by using raphaelgwt or something else),and if we implement the State pattern used by javafx composer along a timeline class, we could have quite the same features as flash, or others.

To conclude quickly, we can see that current web material has the potential to replace every existing other technologies (more especially with the advent of html5 features like canvas, video, ..., and the always more amazing enhancements made in js interpretation ), but it is too disparate, and needs an orchester chief under a sole umbrella ; why not GWT with the appropriate features and tools?

No comments: