Saturday, April 25, 2009

Use GWT to produce pure JavaScript libraries

I've released my first release of JsChismes which is the result of compiling and exporting the code of the gwtchismes library in order to populate its classes and methods into native javascript. So the widgets can be used in html pages using pure javascript, and the goal is that the set of widgets can now be used directly in html pages without the need of knowing anything about gwt and java at all.

The main advantage of using this GWT to produce javascript libraries is that the developer can use the power of java tools (IDE, refactoring, namespaces, reuse, debug, testing, coverage, etc.) to develop his library/application without worrying about the well known javascript problems (versioning of files, obfuscate, optimize, browser compatibility, etc). Then non-java developers (ruby, php ..) and designers can use the library in their pages with a little effort.

This technique is easier since Ray Cromwell's gwt-export library makes it pretty simple.