$bbtitle
AAPL: 174.29 ( -1.55 ) AppleInsider RSS Feed
Search:
AppleInsider.com Archives Reviews Anonymous Mailer Submit Story AppleInsider Forums Polls Advertise on AppleInsider Contact AppleInsider
Help AppleInsider: Please take a moment to complete this quick survey.
Monday, June 16, 2008

Apple's open secret: SproutCore is Cocoa for the Web

By Prince McLean

Published: 09:00 AM EST

One of the biggest revelations at WWDC was quietly unveiled in a session on Friday morning entitled "Building Native Look-and-Feel Web Applications Using SproutCore." While Apple maintained high security during the entire NDA-sealed WWDC session, the secret of SproutCore is out because it is an open source project and people can't stop talking about it.

As Apple's public schedule for WWDC explained, "SproutCore is an open source, platform-independent, Cocoa-inspired JavaScript framework for creating web applications that look and feel like Desktop applications. Learn how to combine SproutCore with HTML5's standard offline data storage technologies to deliver a first-class user experience and exceptional performance in your web application."

The secrets of SproutCore first tumbled out of the bag last fall, when it was revealed that .Mac Web Gallery had been built using the framework. Originally developed by Charles Jolley of SproutIt for use in his online email manager named Mailroom, the SproutCore framework goes beyond other JavaScript frameworks because it is designed to build entire rich applications on the web rather than just adding some animation or sizzle to web pages.

Open Help for JavaScript.

JavaScript is a powerful language that, thanks to its bundling with all modern web browsers, is very widely deployed. However, there is a paucity of strong tools for building anything more than basic scripts to kick off web animations and other dynamic behaviors. That has opened the door for proprietary tools such as Adobe Flash, which is built around ActionScript, which is itself based upon JavaScript.

As outlined in the series Flash Wars: Adobe in the History and Future of Flash, Flash provides a large framework on top to handle things that aren't easy to do in JavaScript itself, but that also requires distributing a Flash plugin runtime. Web applications coded in Flash are no longer interpreted in the web browser itself, but in Adobe's plugin. That makes developers dependent upon Adobe, and also leaves platform vendors such as Apple reliant upon Adobe to provide suitable runtime plugins for their products.

Adobe's Flash plugin for the Mac has long been a second class citizen because Adobe has focused on its Windows version; Steve Jobs also stated that Adobe didn't offer a mobile runtime appropriate for the iPhone, only a Flash Lite version that wasn't capable of running existing desktop Flash content and a desktop version that wasn't suited to run on a mobile device, as described in Steve Jobs pans Flash on the iPhone.

In place of using Flash on its own website, Apple has been working with a number of open scripting frameworks such as Prototype and Script.aculo.us, which mentions Apple on the front page of its website as a high profile user. Those frameworks offer prebuilt code that has been polished to work on all browsers, making it easier for the developer to concentrate on what their web page should be doing rather than repeatedly reinventing the wheel for various low level functions. In that respect, open JavaScript frameworks can replace Flash without requiring any secondary plugin runtime because they are simply open JavaScript that runs in the browser directly.

Introducing SproutCore

Jolley's SproutIt decided to move past common scripting frameworks to develop an entire application development stack based on the Model View Controller architecture. In MVC development, Model data and user interface Views are tied together by discrete Controller logic. This is in contrast to typical web development tools that mix logic, data, and presentation together, resulting in code that is messy and difficult to maintain.

As explained on the developer's website, "SproutCore is a framework for building applications in JavaScript with remarkably little amounts of code. It can help you build full 'thick' client applications in the web browser that can create and modify data, often completely independent of your web server, communicating with your server via Ajax only when they need to save or load data. JavaScript applications are faster, easier to use, and a lot easier to write than complicated Ajax-driven applications. When you use a framework like SproutCore to help you, they can also be a lot of fun to write."

SproutCore pushes more of the application into the browser itself, resulting in the "thick client" designation. That enables a more responsive, full featured experience that feels and behaves more like a desktop app because it is actually running on the local computer rather than waiting for responses from a remote server. The capacity to do this is actually quite new; rapid advances in web browsers over the last year have finally made thick client JavaScript applications practical.

Cocoa for the Web

Apple didn't just use SproutCore, it also contributed major performance updates and added lots of new functionality. Apple's contributions have helped make SproutCore the ideal way to build web applications that work like desktop Cocoa apps, as noted in the article Cocoa for Windows + Flash Killer = SproutCore. Both share a lot of the same conventions such as the use of bindings. SproutCore's bindings allow developers to write JavaScript that automatically runs any time a property value changes. Using bindings, very complex applications with highly consistent behavior can be created with very little “glue” code.

Apple has also been working on the other side of the client equation to improve its own JavaScript engine in Safari. Announced just prior to WWDC, WebKit's new SquirrelFish JavaScript interpreter will dramatically boost the performance of JavaScript applications like those built in SproutCore.

Those two factors combine to make SproutCore the natural heir to the Yellow Box or Cocoa for Windows, which has been bandied about as a possibility ever since Apple moved away from its cross platform Rhapsody strategy to develop Mac OS X ten years ago. Rather than requiring a Cocoa runtime however, users will only need a web browser with JavaScript support, including Safari, Mobile Safari on the iPhone, FireFox, or Internet Explorer 6/7.

Using SproutCore enabled Apple to deliver a new suite of online apps in MobileMe for a cross platform audience. The natural next step will be to expand those offerings to include others, for example, iWork productivity apps. Because SproutCore is offered under the open source MIT license, anyone can use it to develop their own highly responsive web apps. It also seems likely that Apple will at some point invite third parties to deliver MobileMe applications, either included as part of the subscription service, or with their own nominal fee. That would mirror the company's efforts in creating a mobile software market in the Phone Apps Store.

Until then, Apple is focusing MobileMe as a push messaging alternative to Exchange "for the rest of us," while also leveraging push support in iPhone 2.0 and in the upcoming Mac OS X Snow Leopard client apps to deliver an Exchange Server replacement in Snow Leopard Server.

There's more information about SproutCore on its official website. Apple also has more details on the new MobileMe, and SquirrelFish details are on the Webkit project site.

Filed under : Software 80 Comments ] 
Story topics: MobileMe, WWDC   Print ] [ Story Link ] 

Mac Poker players can play Full Tilt Poker for Mac and get 100% to $600 free with bonus code MP600, courtesy of Online Poker Mac
AppleInsider Features
Hot Forum Topics

Recent Articles
Orange Poland shops allegedly creating fake iPhone 3G queues
Apple may report unprecedented 3 million Mac quarter
Microsoft taps Seinfeld to help battle Apple in new ad campaign
Class action suit claims Apple deceived over iPhone 3G speeds
Apple: iPhone 2.0.2 update targets 3G issues
Retail sources say its closing time for current iPod line
Briefly: shots of Nike+ touch app not the real deal
WWDC presenter talks iPhone development from .NET perspective
Steve Jobs vows iPhone app crash fix for September
Apple will replace 'exploding' first-run iPod nanos
Rising iPhone browser share points to sales of 5 million 3G units
Apple sets new standard in customer satisfaction
Apple's secret "Back to My Mac" push behind IPv6
Mac OS X 10.5.5 build 9F17 now in developers' hands
Apple gives another 60-day free extension for MobileMe
Second iPhone 3G carrier reaches Turkey as Russia nears deal
Apple launches iPhone 2.0.2 update
Apple Enterprise sending thousands of Macs into hotels, cruise ships
Inside the iPhone 3G dropped call complaints
Fourth iPhone 2.1 beta takes out push notification feature
Apple already padding iPhone 3G supply for second-wave carriers
First Google Android phone sighting reveals awkward iPhone rival
Inside MobileMe: Web 3 and Web client-server apps
New iPhone app streams iTunes collections anywhere
Intel's processor future through 2012 spotted online
iPhone 3G reception issues to be relieved by software update - report
Ex-Apple general counsel settles backdating suit for 2.2 million
Mac OS X 10.5.5 bug fix list grows with build 9F13 seed
iTunes movies now available for Australia & New Zealand
Apple's Best Buy play makes 12m iPhones "very conservative"
HSBC bank may ditch BlackBerry for 200,000 iPhones - report
Apple averaging 95 iPhone 3G sales per store, per day
Inside MobileMe: iPhone's Exchange alternative for contacts and calendar
Three-alarm fire scorches key building on Apple campus
Google Android flaws pushing software firms towards iPhone
Sources: Best Buy to sell Apple's iPhone 3G nationwide
Microsoft updates Office 2004 and Office 2008 for Mac
iPhone reception; Australian Mac sales boom; 30% off Office 2008
SingTel to launch iPhone 3G in Singapore on Aug 22
Inside MobileMe: iPhone Mail

AppleInsider Market Place

Sell your Laptop - working or not. Free shipping.: Get an instant online quote and sell your laptop today !

Believe in Office: Save Up To 25% on Office 2004 For Mac. Visit Our Site for Details!

IBackup - SMB Online Backup: IBackup is the preferred online storage and backup service of choice for SMBs for its ease of use, security and value. Offers automated backup and restore, file selection and securiy.

Download free software - everyday updated freeware files

 
Advertisements







AppleInsider RSS Feed
AppleInsider © 1997-2008
Please review our Privacy Policy.
Written/Edited/Compiled by the AppleInsider Staff.