Require.js offers utility functions to simplify things. Callback routines can be invoked once the loading of a JS file is completed – useful if you want to bring up frameworks in a specific order. Advanced users can create Web Modules containing code and info about other libraries it depends on.
BEST FOR… Lightweight jQuery work
Zepto.js weighs about 10KB, which makes downloading and parsing it fast. This is achieved by stripping out the rarely used parts of jQuery. The developers also restrict their library to modern web browsers and remove glue code to further accelerate the process. It is targeted at the mobile web, and boasts a large compatibility list Zepto follows the lines specified by jQuery closely. jQuery’s event system survived the cut and can be used in Zepto-enabled applications.
BEST FOR… Testing Node.js solutions
Testing code based on Node.js with a ‘normal’ unit-testing framework doesn’t take long to become
tedious. Mocha excels at testing applications that are made up of server and client components in one go.
Because of it being based on Node.js, users are unable to run Mocha tests from within a web browser. Instead, the product has to be invoked from an npm command line in a fashion similar to the included code snippet. Still, Mocha really shines when it comes to testing asynchronously. The callback routine of the code that is to be tested simply has to invoke the done() function when the result has been determined – data brokerage is handled by the framework.
BEST FOR… native-looking phone apps
PhoneGap apps tend to look a bit ‘off’, as the widely used jQM framework does not do a good job of mimicking the GUIs of mobile operating systems.
PhoneJS intends to solve this. It’s made up of a GUI stack specialised in creating native-looking apps. In the backend, jQuery and Knockout are integrated to simplify development. The developer also includes a view caching system and other elements that make creating robust architectures easier.
Sadly, the framework is not free and must be bought in subscription form, which costs $199 for the year.
BEST FOR… Apps for smart TVs
Enjo was envisioned as GUI building framework for Palm’s webOS. After it premature death, the rights of the library fell to LG. Pundits think the framework will be used on the next generation of LG smart TVs – but Enjo also works on most mobile and desktop browsers.
Creating user interfaces is easy. Forms are made up of ‘kinds’, which can best be described as slimmed-down components. Developers are provided with common widgets and additonal ones can be created using the kind() function.
Applications that access web services benefit from helper classes that simplify consumption. Internationalisation is aided by a library called g11n, which provides utility functions for adjusting text, number and date formats.