Feeds

Is SproutCore worth the Flash and Java iPhone snub?

Shows promise, reveals limitations

Secure remote control for conventional and virtual desktops

A little-known open-source project became the subject of intense interest recently, following a session at Apple's developer conference in San Francisco, California. That project? SproutCore.

Apple offered to show WWDC attendees a way to deliver a "first-class user experience and exceptional performance" in web applications using HTML 5 and SproutCore, a platform-independent, Cocoa-inspired JavaScript framework.

Put this together with Apple's aversion to Adobe Systems' Flash or Sun Microsystems' Java on the iPhone, and it seems plausible SproutCore will be Apple's official route to Rich Internet Applications (RIAs) on its increasingly popular phone. There's even more room to conclude this, given SproutCore appears to be used in Apple's MobileMe service.

It's time to take a look at SproutCore.

It turns out that SproutCore is not just a JavaScript framework. It is also a set of development tools, written in Ruby, that generate HTML and JavaScript from templates. The project also includes a test framework and a build tool that generates optimized code ready for upload to a web server. A SproutCore application is deployed as static files; Ruby is not used at runtime.

Apple's MobileMe

SproutCore in Apple's MobileMe - is it for you, too?

OK. Let's not get carried away with the facts SproutCore is open source, it uses JavaScript, and Ruby, and that it works on the iPhone. SproutCore is a work in progress. Internet Explorer is not properly supported, and although IE7 at will be supported soon, SproutCore framework co-founder Charles Jolley has said IE6 may never be catered for. That is understandable, bearing in mind the quirks of IE6, yet Microsoft's obsolete browser still has a 27 per cent market share, according to the latest figures from HitsLink.

Windows is not ideal for developing with SproutCore either, because of differences in the build environment, path structure, and the use of symbolic links. I used Ubuntu Linux, running as it happens on Windows Vista in VirtualBox. The prerequisites are Ruby, Rubygems, and a standard set of build tools, all of which let you install SproutCore with a single command: gem install sproutcore. Alternatively, it runs nicely on a Mac.

That aside, creating a "Hello World" application in SproutCore is a trivial task. A single command generates a skeleton application, with resources neatly arranged into several folders. SproutCore uses a Model View Controller (MVC) architecture. Each web page has its own folder, with sub-folders for models, views, controllers, tests, and language resources. A SproutCore page may be an entire application, since it leans towards the desktop model, in which many actions are possible within a single window.

In the language folder is body.rhtml, where you can start adding content. Here is a label:


<%= label_view :my_label, :tag => 'p', :bind => { :value =>
'Example.detailController.sMessage'} %>

This code is actually embedded Ruby syntax, which SproutCore parses using the Erubis library.

Choosing a cloud hosting partner with confidence

More from The Register

next story
Microsoft on the Threshold of a new name for Windows next week
Rebranded OS reportedly set to be flung open by Redmond
'In... 15 feet... you will be HIT BY A TRAIN' Google patents the SPLAT-NAV
Alert system tips oblivious phone junkies to oncoming traffic
Apple: SO sorry for the iOS 8.0.1 UPDATE BUNGLE HORROR
Apple kills 'upgrade'. Hey, Microsoft. You sure you want to be like these guys?
SMASH the Bash bug! Apple and Red Hat scramble for patch batches
'Applying multiple security updates is extremely difficult'
ARM gives Internet of Things a piece of its mind – the Cortex-M7
32-bit core packs some DSP for VIP IoT CPU LOL
'People have forgotten just how late the first iPhone arrived ...'
Plus: 'Google's IDEALISM is an injudicious justification for inappropriate biz practices'
Lotus Notes inventor Ozzie invents app to talk to people on your phone
Imagine that. Startup floats with voice collab app for Win iPhone
prev story

Whitepapers

Providing a secure and efficient Helpdesk
A single remote control platform for user support is be key to providing an efficient helpdesk. Retain full control over the way in which screen and keystroke data is transmitted.
Intelligent flash storage arrays
Tegile Intelligent Storage Arrays with IntelliFlash helps IT boost storage utilization and effciency while delivering unmatched storage savings and performance.
Beginner's guide to SSL certificates
De-mystify the technology involved and give you the information you need to make the best decision when considering your online security options.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.
Secure remote control for conventional and virtual desktops
Balancing user privacy and privileged access, in accordance with compliance frameworks and legislation. Evaluating any potential remote control choice.