Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

85 lines (59 sloc) 5.328 kb

FuseJS

Note: FuseJS is currently in alpha. This means that the API is incomplete, buggy, and not intended for production use.

Fuse to Win

JavaScript frameworks share similar features and functionality, such as DOM manipulation, event registration, and CSS selector engines. FuseJS attempts to incorporate the strengths of these frameworks into one stable, efficient, and optimized core JavaScript framework.

FuseJS is the first framework to use cross-browser sandboxed natives. This allows the extension of Array, String, Number, Date, and RegExp core objects, without polluting the native objects of the host environment.

FuseJS emphasizes browser capability testing, method forking, and lazy method definition for maintainability and performance. Modules and adapters are designed to allow customized builds, including one of eight supported CSS selector engines1. FuseJS also follows ECMA 2.62 (5th edition) specifications, supports minification, and plans to add inline documentation.

Additionally, FuseJS will feature framework emulation2 by creating a shell of the target framework and mapping all API calls to the FuseJS core. As support for more frameworks is added, the code base will gain numerous bug fixes and features, which, in turn, will be shared among all emulated frameworks. Because the FuseJS core is highly optimized, each emulated framework should, holistically, perform better than its official counterpart. The implications are manifold: developers could simply replace a supported client-side framework with FuseJS + Emulation Layer and receive instant performance and stability gains, while continuing to use their familiar framework's API.

Tested Browsers

Getting and Building FuseJS

The FuseJS source code is hosted on GitHub. Check out a working copy of the source tree with Git:

    $ git clone git://github.com/jdalton/fusejs.git
    $ cd fusejs
    $ git submodule update --init

To build FuseJS, you'll need Ruby 1.8.2 or higher. From the repo's root directory, run ruby Build.rb to automatically concatenate the source files, generate the composite in dist/fuse.js, and build the legacy unit tests in test/unit/legacy/build/.

Once you fork FuseJS on GitHub and commit your changes, you may also send a pull request if you'd like your feature or bug fix to be considered for the next release.

Please make sure to update all unit tests in the test/ directory as well.

Community

Gotchas

  • Firefox 3.6 changed the default value for security.fileuri.strict_origin_policy (in about:config) to true. You may need to change this value to false to run the unit tests locally.

  • If $ git submodule update --init fails, try deleting the contents of the vendor folder and running the command again.

Footnotes

  1. The following CSS selector engines are supported: NWMatcher (default), Acme (Dojo), DOMAssistant, DomQuery (ExtJS), Sizzle (jQuery), Peppy, Slick (MooTools), and Sly.

  2. Prototype emulation will be supported in the beta version.

Jump to Line
Something went wrong with that request. Please try again.