MontageJS is an open-sourceJavaScript framework for building scalable single-page applications. Its aim is to simplify the development and maintainability of expressive HTML5 applications by employing many of the foundations of proven native application frameworks. With Montage, developers can build and extend reusable user interface components and modules, bind properties among components and controllers, and synchronize DOM updates to ensure a smooth user experience, especially on resource-constrained devices.
Development History
Montage development started under Benoit Marchant and his team while at Motorola Mobility, from August 2010 to July 2012. The project was open sourced on GitHub in July 2012 under a BSD license. Montage is currently maintained by a Silicon Valley startup whose employees include Marchant and core members of the original development team. The ideas behind Montage date back to Marchant's tenure at Apple where he worked on native user interfaces written in JavaScript. Marchant's goal at the time was to create the equivalent of proven technologies such as Cocoa and WebObjects, but for the web and on the client side to facilitate building applications in HTML, CSS, and JavaScript. The result was Gianduia, a rich Internet application framework introduced by Apple at its 2009 World of WebObjects Developer Conference. In 2010, when Marchant had the opportunity to join Motorola Mobility to work on a new framework for mobile, he took the lessons learned at Apple to build Montage from the ground up using the model–view–controllerdesign pattern to partition a Montage application into logically distinct units. Although still evolving, with many more components on the roadmap, Montage has been used to build production-ready applications. Transposing the designs and patterns of native application frameworks onto the field of web-based application development is nothing new. Where Montage differs from its predecessors is that it doesn't try to introduce a new syntax for the web. Instead, it uses a Cocoa-like API to create a clean layer of abstraction on top of the web stack using modular, self-contained components, real objects and collections, and an API that allows you to observe changes on these objects and their properties or collections.
Features
Montage builds on ECMAScript 5, HTML5, and the CommonJSmodule system popularized by Node.js. It provides the functionality to build graphical user interfaces providing access to both a set of opinionated UI components as well as standard DOM interface components. However, instead of using a templating system like Mustache, for example, Montage lets developers craft user interface components as stand-alone web pages. An application is merely a component's template opened directly in a web browser. The template contains a DOM skeleton and may require some CSS, but it comes to life with the inclusion of a component object model, distinct but connected to the DOM. Montage also provides string and value manipulation, serialization, and other functions that are not directly tied to the graphical user interface. It uses getters and setters to bind properties, so it maintains performance even as the number of bindings grows. It implements a managed draw cycle, a key part of the Montage architecture, that separates read and write operations at scheduled intervals, so it doesn't compromise performance. And it uses event delegation to manage event handling and dispatching to improve application performance. Part of the MontageJS ecosystem are tools that provide a better developer-optimized experience. These include an initializer, Minit, which generates starter template applications and components, as well as a module system intended for front-end development of web applications using NPM-style packages called MR. Montage also comes with a command line tool that translates a developer-optimized experience into a user-optimized experience called Mop. Mop outputs production-ready Montage applications by reducing the overall file size of the application and creating bundles that can be preloaded or distributed among multiple downloads, to reduce the number of requests and allow developers to release Montage applications with restrictive Content Security Policies.