At a high level, RaptorJS provides support for the following:
- HTML templating: Using the same extensible templating language on both the server and in the browser to build UI components and web pages
Each of these features is described in more detail in the sections below.
RaptorJS provides a simple library to support defining namespaced modules, classes, mixins and enums. This library uses a clean and easy-to-understand syntax based on the AMD syntax.
RaptorJS packages are used by the RaptorJS server-side module loader, and they are also used to optimally deliver only the required code to the browser.
The RaptorJS AMD module loader integrates seamlessly with the Node module loader. In addition, RaptorJS provides a fully-compliant CommonJS and AMD module loader for Rhino.
Every application has different requirements so the RaptorJS Optimizer gives you full control over how resources are combined and where to include resources on your HTML pages.
Raptor Templates is an amazing new templating language that beautifully blends powerful templating directives with HTML tags. Unlike most other templating languages, Raptor Templates also allows high-level UI components to be embedded in templates through the use of custom tags. Equally effective in both the browser and on the server, use Raptor Templates wherever you want to produce HTML.
No other templating language makes it so effortless to produce easily readable templates that are blazingly fast with such a miniscule footprint. The full feature set for the Raptor Templating language can be found at Raptor Templates.
The RaptorJS Widget Framework is a lightweight framework that simplifies the creation of web applications built using UI components. The RaptorJS Widget Framework provides a mechanism for automatically attaching behavior to DOM sub-trees associated with rendered UI components—regardless of whether or not the UI components were rendered on the server or in the web browser.
The RaptorJS Widget Framework does not dictate how a client-side widget be implemented and there is no complex class inheritance hierarchy (only a few mixins that get applied to all initialized widgets).
UI components that use Raptor Templates to render their view will benefit from the bindings that allow widgets to be attached to rendered HTML elements. During the rendering of an HTML template, the Widget Framework keeps track of which widgets have been rendered and which HTML element each widget is bound to. This allows all of the widgets to be automatically and efficiently initialized without having to rely on the CPU-intensive task of scanning the final DOM tree to discover rendered widgets.
RaptorJS was built at eBay’s presentation platform by Patrick Steele-Idem (@psteeleidem)