File Under: Programming

Apple’s ‘SproutCore’ Tools May Help Web Apps Grow Up

SproutcoreReady for the web to start looking like Mac desktop apps? Whether it’s all part of Steve Jobs’ world domination plans or not, news is leaking out about a new JavaScript framework that enables developers to create very Mac OS X-esque web apps.

SproutCore, as the JavaScript library is known, has been around for a while. It was originally developed by Charles Jolley who was working on an e-mail manager app named Mailroom. Apple hired Jolley to work on the company’s .Mac interface and in the process embraced SproutCore.

Indeed SproutCore appears to power the coming Mobile Me site, one of Apple’s big announcements at the company’s recent WWDC event. Mobile Me is essentially a redesigned and reworked .Mac service, which ties in with iPhones and, perhaps most importantly, is aimed at a cross-platform audience.

The cross-platform MobileMe features a very slick interface and lays the groundwork for Apple to invade the web app space.

But what’s interesting about Apple’s web plans is that they remain entirely free of proprietary technologies like Adobe Flash or Microsoft’s would-be Flash-killer Silverlight. Frequent Apple partner Google has taken a similar approach, building very sophisticated webapps like Google Maps using entirely open tools.

By eschewing plugins like Flash, both Apple and Google are driving the web toward more open technologies.

But building those tools — like Google Maps or MobileMe — using Javascript is no easy process, which is where SproutCore comes in. Although details are thin and come from developers willing to violate their NDAs, Roughly Drafted has an excellent overview of how and why Apple has embraced SproutCore.

SproutCore not only makes it easy to build real applications for the web using menus, toolbars, drag and drop support, and foreign language localization, but it also provides a full Model View Controller application stack like Rails (and Cocoa), with bindings, key value observing, and view controls. It also exposes the latent features of JavaScript, including late binding, closures, and lambda functions. Developers will also appreciate tools for code documentation generation, fixtures, and unit testing.

If all that sounds too good to be true, well, you’re in league with the skeptics over at Ajaxian. Many commenters on that post argue that jQuery and other JavaScript libraries are already serving their needs — there’s no need for SproutCore.

But that seems to also be part of what Apple wants to do — turn Cocoa/Objective-C programmers in to web app creators. SproutCore offers a set of features that are much closer to Cocoa, Ruby or Python than anything JavaScript developers are likely accustomed to.

While SproutCore’s promise may seem a bit overhyped, keep in mind that it’s also very early on and most details are only in the hands of Mac developers.

For instance, one key component to SproutCore’s potential is in the upcoming Safari 4, which will include the ability to save individual webpages as applications as well as an updated JavaScript interpreter.

That, coupled with SproutCore, gives Apple a very nice in-road to the operating-system-as-a-platform and, as an added bonus for Apple, makes it dead simple to get Apple-style webapps running on your Windows desktop.

With social networks and online office suites fast becoming the primary “apps” for many users, Apple seems to recognize that the future seems less about what operating system you use than which on/offline apps you can access.

But Adobe has plans for that space as well and recently launched an update to AIR, which enables desktop Flash apps.

If Apple wants to make sure that the future of webapps is in open technologies it needs to counter AIR and that’s exactly what SproutCore appears designed to do.

[via CNet]

See Also: