Fork me on GitHub

The Scalable JavaScript Application framework

Develop one-page JavaScript applications that scale as you add up features with this open-source framework made in France.

Languages

JavaScript, (X)HTML, CSS

Description

The Scalable JavaScript Application framework is a client-side library used to create modular Web applications. It is based on the Scalable JavaScript Application Architecture by Nicholas C. Zakas.

First Steps

The design of the framework is described in Design Patterns for Scalable JavaScript Application.

After installing the required software (see the requirements section below), run Apache Ant in the build folder to generate the API documentation and the combined/minified script for deployment.

The HTML documentation of the Application Programming Interface is generated in the folder build/out/doc. The script generated for deployment is located at build/out/js/lb-min.js.

For debugging purpose, you may use another version of the script which contains the whole code in a single file including long identifiers, indentation and comments: build/out/js/lb-full.js (5 times bigger).

After understanding the underlying principles [1] and reading the design document [2], you should start digging the generated HTML API [4], starting with the Sandbox and the Core Application.

For the purpose of Semantic Versioning [2], the public API of this library comprises all the modules and methods in the lb.core namespace. The details of the modules in lb.base, a layer for cross-browser compatibility, are implementation-specific and may vary from version to version.

Learn More

The framework has been presented at ParisJS #6, on April 27th, 2011. You can find the slides of the presentation on GitHub [5] or watch the videos of the presentation [6][7] (in French).

Requirements

The following software is required for the build process which generates the API documentation, checks the syntax of source files and produces a combined (debug) and minified version of the library for deployment. The versions that I use in my development environment is indicated in parentheses.

Authors

Eric Bréchemier (c) 2011-2013, Some Rights Reserved.
Legal-Box SAS (c) 2010-2011, All Rights Reserved.

License

BSD License
http://creativecommons.org/licenses/BSD/

Included Software

Download

You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://github.com/eric-brechemier/lb_js_scalableApp

History

  1. 2010-06-03, Public Release on GitHub
  2. 2010-06-04, v1.0.0, Introduction of Semantic Versioning [3]
  3. 2010-06-10, v1.0.1, Minor fix: replaced Combiner with concat
  4. 2010-06-11, v1.1.0, Major fixes in history manager and local navigation
  5. 2010-06-15, v1.1.1, Minor additions in base DOM Listener
  6. 2010-06-18, v1.2.0, onHashChange listener can now be removed or replaced
  7. 2010-06-22, v1.2.1, fixes and updates in Google Closure (base,array,debug)
  8. 2010-07-27, v1.2.2, Sandbox is now using factory to create/destroy listeners
  9. 2010-08-09, v1.2.3, more lenient destroyEvent() now ignores custom events
  10. 2010-08-12, v1.2.4, added initElement() extension point for custom factories
  11. 2010-09-03, v1.2.5, Bug fix: added content-type declaration in AJAX calls
  12. 2010-09-15, v1.2.6, Enhancement: disabled debug logs (too noisy in XHR)
  13. 2010-09-22, v1.3.0, Added clearTimeout and getTimestamp in sandbox.utils API
  14. 2010-10-26, v1.4.0, Added confirm method in sandbox.utils API
  15. 2010-12-20, v1.4.1, Refactored base i18n API: simpler yet powerful
  16. 2010-12-20, v1.4.2, Bug fix: language code comparison is now case-insensitive
  17. 2011-01-05, v1.5.0, Added support for internationalization (i18n)
  18. 2011-01-07, v1.5.1, Refactoring: moved filterHtml code to base i18n templates
  19. 2011-01-13, v1.5.2, Enhanced i18n: language properties fallback in templates
  20. 2011-01-24, v1.5.3, Enhancement: catch and go on when a module fails to start
  21. 2011-01-24, v1.5.4, Enhancement: added explicit string conversion for Module
  22. 2011-01-24, v1.5.5, Enhancement: log errors from filters in topDownParsing()
  23. 2011-01-24, v1.5.6, Bug fix: replaceParams only sets nodeValue if different
  24. 2011-03-29, v1.5.7, Fixed replacement of parameters in src and href in IE7
  25. 2011-04-08, v1.5.8, Parameter replacement in getString() is now recursive
  26. 2011-04-12, v1.6.0, Added has() and is() methods to Sandbox utils API
  27. 2011-04-20, v1.6.1, Avoid type coercion in module definition: override
  28. 2011-04-22, v1.6.2, Fixed issue in build process on Windows (Cygwin/MinGW)
  29. 2011-04-26, v1.7.0, Modular Sandbox API using Sandbox Builder and Plug-ins
  30. 2011-05-02, v1.7.1, Fixed build: removed duplicate script in combine task
  31. 2011-05-04, v1.7.2, Enhancement: return null when function fails in getString()
  32. 2011-05-06, v1.7.3, Enhancement: speed up build using jslint4java
  33. 2011-06-03, v1.7.4, Upgraded Closure Library to add support for IE9
  34. 2011-06-06, v1.7.5, Removed Combiner tool, cleaned-up build script
  35. 2011-06-07, v1.7.6, Moved Ant macros to a separate file to facilitate reuse
  36. 2011-07-08, v1.8.0, Now using RequireJS to manage module dependencies
  37. 2011-07-12, v1.8.1, Upgraded jslint4java and JSLint, updated Ant macro
  38. 2011-08-14, v1.8.2, Project deleted by Legal-Box, moved to eric-brechemier
  39. 2013-09-09, v1.9.0, Add no() to Sandbox utils API
  40. 2013-09-10, v1.10.0, Add or() to Sandbox utils API
  41. 2013-09-10, v1.10.1, Replace a = has(a)? a: b with a = or(a,b)

References

  1. Scalable JavaScript Application Architecture, by Nicholas Zakas
    http://www.slideshare.net/nzakas/scalable-javascript-application-architecture

  2. Design Patterns for Scalable JavaScript Application
    doc/javascript-application-design-patterns.pdf

  3. Semantic Versioning
    http://semver.org

  4. HTML API of The Scalable JavaScript Application framework
    http://eric-brechemier.github.com/lb_js_scalableApp/build/out/doc/

  5. Introduction to The Scalable JavaScript Application Framework (slides)
    https://github.com/eric-brechemier/introduction_to_lb_js_scalableApp

  6. [FR] Video Part 1 - Presentation at ParisJS #6
    http://vimeo.com/26719486

  7. [FR] Video Part 2 - Q&A after the presentation at ParisJS #6
    http://vimeo.com/26996020