...
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.
...
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
AMD and RequireJS
Scripts need to be written as AMD modules. NOTE: Add link to our AMD docPlenty of documentation exists out on the web. The details of our RequireJS AMD system are described in the link below
RequireJS Javascript loading system in the BA-Server
Unit Testing
MORE RESEARCH REQURED.
Notes: Seems like RequireJS guys have worked around the issues with the major test suites out there, JSTestDriver, Jasmine. https://github.com/jrburke/requirejs/wiki/Test-frameworks
...