The Fruit of SproutCore’s Labor Will Live On as Amber.js

Last month, the team responsible for the creation of SproutCore, one of the more successful of many JavaScript libraries for Web application development, were absorbed as a whole into Facebook, and will likely be working on an apps distribution platform there, probably involving HTML5. What Strobe left on the table was SproutCore, a project which had evolved into its own independent HTML5 apps framework for both assembly and distribution, but which began at Apple as a JavaScript toolkit for rendering Web apps, including for mobile.

Yehuda Katz and Tom Dale had already left SproutCore in October, prior to the rest of the team’s acquisition. Katz is a core contributor to a number of major, recognizable projects including Ruby on Rails and jQuery; and Dale confirmed in a tweet last month that he, Katz, and other notables were starting a new venture to be called Tilde. This morning on his personal blog, Katz announced Tilde’s first key project: the reworking of SproutCore 2.0 into a new and emerging project called Amber.js.

“We became increasingly convinced that calling what we were building ‘SproutCore 2.0’ was causing a lot of confusion,” Katz wrote, “because SproutCore 1.x was primarily a native-style widget library, while SproutCore 2.0 was a framework for building Web-based applications using HTML and CSS for the presentation layer… To clear things up, we have decided to name the SproutCore-inspired framework we have been building (so far called ‘SproutCore 2.0’) ‘Amber.js.’ Amber brings a proven MVC architecture to Web applications, as well as features that eliminate common boilerplate. If you played with SproutCore and liked the concepts but felt like it was too heavy, give Amber a try.”

MVC, as SproutCore 1.5 veterans know, refers to model/view/controller architecture – a way of separating the components of an application into the data, the aspect or view of that data, and the device being used to present that view. Keeping these components separate ends up simplifying both the management and presentation processes, and lends itself very well to the different toolsets of Web app development.

Katz’ history with SproutCore began in the middle of the product’s development; his key contribution was the concept of dynamic templating. This refers to the use of code to specify within a markup page how and where elements of a template may be constructed on the fly. This way, a JavaScript compiler can effectively produce template elements in accordance with the data, and can change the template when the data changes. This was a tremendous breakthrough for SproutCore 1.5, which premiered at a time when CSS stylesheets and HTML documents were being intentionally over-provisioned in order to account for any and all contingencies.

As Katz told InfoQ a year ago, it also allows the runtime to determine the best templating method for the browser at hand, producing different code for Internet Explorer, for example, than it would for Chrome.

Tom Dale announced the first Developer Preview of SproutCore 2.0 last May, with an emphasis on the new Handlebars.js coding system (inspired by Mustache.js) for presenting dynamic template elements. Really more of a syntax than a programming language, Handlebars allows you to insert elements into an HTML page by {{ offsetting it in double-curly brackets }}, and then define those elements as variables using JavaScript.

“Handlebars, unlike other templating solutions like Eco, doesn’t tempt you to embed domain logic in your HTML,” wrote Dale on his personal blog last October. “Anything other than simple conditionals and loops must be contained in your application’s JavaScript, which enforces the separation of concerns and leads to better testability. The language is also extensible with custom helpers, which allows you to effectively write a template DSL for your particular application.”

Although SproutCore 2.0’s code today remains hosted through the SproutCore organization via GitHub, Katz says it will be relocated to Tilde’s namespace within the next few days.

Facebook Comments