...
As we continue to push thin-client interfaces and capabilites, the amount of Javascript we're writing and maintaining has increased substantially. Unfortunately, for most of this expansion we have lacked clear guidelines for Javascript development. This has in part contributed to the fragmentation of our thin-clients into the current collection of various different Javascript frameworks and methodologies. This document is an effort to consolidate best practices and serve as a reference to inform future development.Javascript Frameworks
Framework Guidelines
Historical
Early thin-client works at Pentaho were primarily plain javascript with the exception of WAQR (Ad-hoc reporting) which was written partially with the Dojo 0.4 framework. We introduced GWT as a way of allowing our Java developers to contribute to thin-client development. Later efforts have been a mixture of JQuery and modern Dojo.
Looking forward
Going forward we're trying to consolidate as much new development as possible around a JQuery stack. Dojo will continue to be used for Analyzer and Interactive Reporting, major thin-client applications where Dojo is already in use and excels. GWT usage will be limited to shared code situations leveraging XUL such as the Pentaho Modeler.
jQuery Stack
jQuery alone is not a full development suite in and of itself. As such we've chosen the most popular technologies to augment jQuery with. Backbone for MVC http://backbonejs.org, Handlebars for templating http://handlebarsjs.com, and jQuery.UI for widgets http://jqueryui.com.
Javascript Doc
All Javascript should be documented using JSDoc notation https://github.com/jsdoc3/jsdoc. Generation of doc will be added to a future update to Subfloor-JS
...