Hi all,
I would like to open a discussion about which framework/platform to use
to develop the client side of geonetwork.
The need for a framework is becoming strong. For example, the harvesting
web pages are difficult to maintain and the more features are add, the
more work must be done to make them working on all browsers.
Our architecture uses javascript + XSL on the browser side to allow a deep
customization of the rendered html. This combination is excellent from that
point of view, but has some disadvantages on the development side:
1)- IE has several problems that must be addresses separately
2)- beside IE and firefox, no other browser supports our "XSL on the client" approach
3)- due to the lack of object oriented features of javascript we have the same
code repeated "as is" and it is more difficult to write the code itself. Some
XSL code is repeated too, due to this design.
4)- refactoring of javascript is a hell work and strongly error prone and these
errors become visible only during normal usage of the page and not at compile
time.
After reading a very interesting article (http://java.sys-con.com/read/333329_p.htm)
which depicts all pros/cons of several ajax actors, it seems that there are only
2 viable solutions: Google Web Toolkit and Flex.
GWT's usage will remove points (3) (4) (the code is written is java) and probably (1).
Point (1) (and in general browser compatibility) is a heavy one. GWT has to struggle
and, as the article's author points out, it does not succeed always. The point here is
that GWT is based on javascript+dhtml and this technology has reached its limits.
Flex (http://www.flex.org) made by Adobe has strong advantages for us:
- now it is free (as java is) and the compiler (which seems to be written in java) is
available for windows, linux and osx.
- its player (flash) is installed by default on almost all browsers and, if not, on windows
you just click the provided link and the installation is automatic.
- it was born to create user interfaces (so, there is no competition with javascript on
this side).
- it is exactly the same on all browsers (no more testing on different browsers!)
- it has no limits. It is not based on javascript so it can be expanded and improved
to provide features which are impensable with javascript (like streaming of maps
during upload/download or image based processing for intermap).
- there are some IDEs for developers (here I have to check if/how much they are free)
From a technical point of view, flex outperforms GWT in all fields. The only issues I
see with flex are:
- we have to learn a new technology. It will require more time to learn flex than to
learn GWT. On the other side, once learned I'm pretty sure that flex usage will
cut development costs more than GWT.
- java developers are much more than flex developers so it can be difficult to
find other developers for the project.
From my side, flex is better than GWT. Both lack point (2) (I'm not sure about flex
anyway) but we could develop a custom xml format to generate the user interface
and thus allow customization.
Cheers,
Andrea