Announcing SproutCore 2.0 Developer Preview
Since 2007, SproutCore has led the way in building web applications that compete with the sophistication of native apps. During that time, we have pioneered many advanced techniques that are now commonly used.
SproutCore 1.0 was designed to build apps with native-style interaction. That meant providing a rich set of controls, such as scroll bars and buttons, that can go toe-to-toe with what you’d find on a desktop framework. In the meantime, however, a second form of interaction has taken off.
“Web-style” applications, such as GitHub and New Twitter, provide rich functionality while still retaining the feel and layout of a traditional web page. SproutCore’s strong MVC architecture and bindings make it significantly easier to build these kinds of apps than other lightweight frameworks, but developers also have to opt-in to SproutCore’s view layer that includes many features these kinds of applications don’t need.
Today we’re announcing SproutCore 2.0: a rebuilt SproutCore, designed from the ground up to support every kind of web application. SproutCore 2.0 is highly modular and decoupled, allowing you just to opt in to the features you need.
We’ve been working hard on SproutCore 2.0 and today we are releasing our first milestone: SproutCore 2.0 Developer Preview, designed for developers who want to create web-style apps and don’t need the features of SproutCore 1.6′s view layer.
Just describe your user interface using HTML and mark it up using the Handlebars templating language. Bindings take care of the rest, ensuring your HTML is always up-to-date—like magic. This declarative system eliminates entire categories of bugs that web developers frequently struggle with. And best of all, the new SproutCore is shipped as a single JavaScript file, and is just 29K after being minified and gzipped. It’s just as easy to add to an existing app as it is to start a new one.
Roadmap
SproutCore 2.0 is still under heavy development and APIs are likely to change. We built SproutCore 2.0 to support a wider range of applications, while being leaner and more modular. Because SproutCore 1.6 is already a great option for writing native-style applications, we started with SproutCore 2.0 by focusing on web-style apps.
We will be working hard over the next few months to bring SproutCore 2.0 up to feature parity with SproutCore 1.6. This is the first milestone in that process; in the coming months, we will be announcing more features, like the data store, optional build tools, and a beautifully-designed user interface layer that is competitive with any native widget library.
We are also beginning the process of updating the existing documentation and guides to reflect the new API changes. Your input and contribution is key to making this a successful community project.
Changes for Current SproutCore Users
If you’re an existing SproutCore developer, the biggest change you’ll notice is that SproutCore 2.0 is currently 100% HTML and CSS; no deeply-nested JavaScript objects with embedded layout hashes. We’ve also left behind pages and panes. If you’ve been using SC.TemplateView in SproutCore 1.5, you already know how to use Handlebars. Just insert your templates inside <script> tags in your document body, and we’ll automatically convert them to views and insert them into the DOM.
You also no longer need to use the command-line build tools. Instead, just include the SproutCore JavaScript file directly from your HTML page.
Remember: SproutCore 1.6 is still the best way to write desktop-style apps, and will continue to be maintained and developed by the core team and contributors. Right now, SproutCore 2.0 is the best choice only if you are building web-style apps, or want to augment an existing application.
Getting Started
Download the SproutCore Starter Kit, based on HTML5 Boilerplate, to get started. It includes the SproutCore JavaScript file, jQuery, and some stub files for you to get started writing your new application.
You can also download the standalone JavaScript library if you’d like to add it to an existing application, available either uncompressed or minified.
To learn more about SproutCore 2.0, read the guides, view the source code on GitHub, browse the Todos annotated source code, or download the Todos source code.
Update: We just fixed a bug with pre-Lion versions of Safari. If you grabbed any of the files from the first 10 minutes this was posted, please download them again. Fixed versions have version 2.0.a.2 of SproutCore. Sorry for the inconvenience!
Tweet
