Desktop web applications offer the convenience of desktop applications and the interconnected power of web applications. This article looks at what they are, how they may evolve and focuses on Sproutcore, an open source framework for building them:
The Internet is still evolving and the familiar struggle over who will control the platform of future web applications is still ongoing. Companies like Microsoft and Adobe provide platforms that build slick web applications but their aim is to dominate with proprietary systems that will effectively replace the browser. On the other side you have Google and Apple who have developed or support open web standards for developing web applications.
If the proprietary companies win, future web applications could be locked into their systems and the incredible innovation that has driven the web to date may begin to falter.
What is the current state of Web Applications?
It is important to differentiate between Web Applications and ‘Desktop on the Web’ Applications. First desktop on the web applications are a subset of Web Applications, they are desktop like, and can even be single page or limited page applications that provided a specialist functionality, such as email, navigating maps, spreadsheets, etc. Generally all web applications try to get the client (browser) to handle much of the application actions and events, and only makes the odd asynchronous calls back to the server to get or post information Ajax is generally the mechanism that handles this, but desktop on the web applications take this up a notch.
Unfortunately Web Applications still revolve around a document model dictated to us by the web browser. Web apps are created as HTML pages with widgets embedded in them, such as JavaScript or Flash. Traditionally Web Applications have no consistent framework or platform to develop with, also due to the nature of the Internet there are multiple technologies a web developer must contend with, such as HTML, CSS, JavaScript, PHP to name few. Now consider true desktop applications, they usually have a clearly defined framework and use one language in the development stack, making development significantly easier and producing consistent programs.
Desktop frameworks ease development by handling design principles like the Model View Controller (MVC) design pattern, event handling and observer bindings to variables, etc. These data structures are present in Web Applications, but they generally reside on the server not on the client.
Finally desktop applications can store their own data, they are generally not dependent on a remote server to deliver the application, in contrast Web Applications traditionally cannot store data off-line and require a constant connection to the Internet.
Why do we want Web Applications?
Web Applications have a number of benefits over traditional desktop applications. They can potentially offer the power of the desktop applications running on any type of computer or mobile platform. They utilise the interconnectivity of the Internet, being able to link any computer or mobile device, to any other.
Web Applications avoid much of the complexities of desktop applications, such as deploying to users, and ensuring that the user has the correct version. This makes maintenance such as bug fixes and adding new features significantly easier, and it brings down the cost in both time and money.
Web 2.0 is the only the start.
Web browsers interpret HTML pages and traditional web applications have revolved around manipulating this concept to provide desktop like functionality, but this is was our first attempt, Web 1.0 as it were. Web 2.0 has been the current buzz word and has led to more interactive web pages and Web Applications, using JavaScript in the client to handle view type activities such as validating phone numbers in forms or allowing sorting of tables. This functionality has reduced unnecessary client communication with the server, making Web Applications more efficient and ‘quicker’.
This has launched many new Internet Web Application ideas, but most of these ideas have been implemented differently or are simply just fancy widgets embedded into web pages. However we have begun to glimpse at what can be done, and tools are now emerging which just might give us desktop functionality in a web browser.
The Web Application War.
As mentioned earlier there are four companies bidding to secure the foundations of future web applications they are Google, Microsoft, Adobe and Apple. There respective technologies are Gears, Silverlight, AIR and Flash, and JavaScript with web technologies. Of these four only Gears and JavaScript are open standards. However Google Gears, Silverlight and AIR all require a plug-in to be downloaded into the browser. This leaves JavaScript and web technologies – what is Apple thinking ? These are hardly new technologies, and JavaScript is an inherently awful scripting language… isn’t it?
It turns out, that JavaScript isn’t so bad, in fact it has some truly ‘good parts’, and this JavaScript subset turns out to be more than capable of providing a decent foundation for a sophisticated Desktop on the Web framework.
SproutCore facilitates a ‘Desktop on the Web’.
Over the years developers have tried to ‘fix’ JavaScript and so a number of JavaScript frameworks have emerged such as, Prototype, Dojo,and JQuery to name but a few. In terms of design these frameworks really only provide a thin layer on top of JavaScript adding cross platform capability, and an easier methods for interacting with JavaScript, this has been very successful for adding interactivity to pages but isn’t good enough for desktop like Web Applications (Although SproutCore originally had parts written using Prototype, this is gradually being removed).
Now a new breed of framework is evolving which is beginning to make web application more desktop like, in particular SproutCore and Objective-J. Interestingly both these frameworks have been influenced by the way Apple creates desktop applications using the ‘Objective C’ programming language.
As Apple has endorsed SproutCore by integrating it into their new MobileMe web platform the rest of this article will focus on this framework only. Some readers maybe sceptical because MobileMe has had a few teething problems, however these have not been a reflection a weak framework, but more a reflection of badly implementing and rushing the MobileMe platform, and Steve Jobs has admitted it wasn’t up to Apple’s traditional standards.
What does SproutCore offer?
These frameworks leverage some of the new web concepts, most notably Ruby on Rails, (RoR). One of the concepts SproutCore uses is generators. These generate much of the stub code within SproutCore and additionally Ruby provides an infrastructure for developing and testing your JavaScript application code. Once your are ready to deploy your application Ruby is used to optimise your JavaScript code to make it faster to download and be interpreted by the web browser.
Also the SproutCore framework encompasses many of the desktop framework concepts, such as MVC,bindings, etc. What the developers have done is build a framework using the ‘good parts’ of JavaScript, but without trying to redesign JavaScript, like some other JavaScript frameworks have done. It is transparent, in that a developer has complete access to the source code and can simply build on the framework using their JavaScript knowledge. It also provides the underlying mechanisms required by both desktop and Web Applications, and means that the developer does not have to reinvent the wheel. Instead the developer would use this core technology and is then not bound by the framework, allowing excellent flexibility and control over the application.
How can a Web Applications be more desktop like?
As these web applications usually consist of a small number of pages a full web browser such as Internet Explorer or Firefox is often overkill, in fact there has been a trend of using lightweight browsers for specific Web Applications, such as Fluid for the Mac and the Prism project for Windows. An instance of one of these lightweight browsers can be created against a Web Application, such that when you open it up it goes straight into that application without any of the traditional browser buttons or menu items, in fact for all intense and purposes this combination of lightweight browser and web application looks and functions a lot like a desktop application. In addition Apple have implemented a new JavaScript interpreter called SquirrelFish into their Safari browser, this interpreter offers a performance approaching the speeds expected of desktop applications. It won’t be long before other browsers follow suit especially as SquirrelFish is an OpenSource.
Persisting data has been a problem for earlier Web Applications but the new HTML standard specifies support for database connectivity. Now several browsers such as Mozilla Firefox and Apple’s Safari support this standard and have embedded the highly acclaimed SQLite database. This means that these browsers can download data from a server and make it available even when there is no Internet connectivity, or the browser has been closed and restarted.
Traditional Web Applications use a server and a Web Application utilising SproutCore is no different, SproutCore follows open standards to communicate from the client side code to the server in the form of Ajax (JSON) requests. It also uses RESTful web services, although initially their implementation didn’t strictly follow the standard, it is gradually being refactored so that it does. This means any type of server back end can be used, be it: Ruby on Rails, Django, PHP, .Net, Java, etc.
Following open standards means that the developer can make allowances for accessibility requirements, unlike the closed Web Application frameworks like SilverLight and AIR. Admittedly one of the tenets of accessibility is graceful degradation where on traditional web sites web components can gradually be turned off and the web site is still usable. SproutCore is dependent on JavaScript and so will not work if JavaScript is not enabled on the browser. However by making JavaScript a prerequisite and following good design concepts still means that a desktop on the web application can be read by screen readers or made available to mobile devices. This is an area of interpretation but there is still flexibility.
Likewise cross browser support again is open to interpretation. For example Apple have said that their MobileMe platform will not be supported by the Windows Internet Explorer browser. Initially this is surprising but if you look at desktop applications, many of these are not supported by different computer platforms and these suppliers intentionally opted to focus on specific operating system markets. Therefore it is not unreasonable to have prerequisites for desktop on the web application platforms, especially as it is far easier for a user to upgrade or change their browser than their operating system.
Additionally these applications can easily be made to work with mobile devices. For example as the iPhone runs the Safari browser and as this supports JavaScript there is no reason why your Web Application won’t work without any modification on the iPhone. Again this will vary from application to application.
Finally there has been a recent trend for Web Applications to utilise cloud
computing, allowing users to access technology-enabled services in the Internet cloud, such asGoogle Maps or MobileMe or Microsoft’s Live Mesh. Admittedly this is more of a server side component of a Web Application but this is a huge selling point for Web Applications over desktop applications.
Web Applications for the Enterprise?
Web Applications should not be thought of as predominantly consumer orientated. These frameworks are very much suited to the enterprise as well, in fact because enterprises can control the browser platforms there are many benefits.
For example these Web Applications are extremely well suited to corporate intranets, and many internal desktop applications can now be moved onto the corporate web server giving numerous advantages such as:
- Facilitating easy application maintenance
- Simple of deployment
- Reducing costs
- Quicker than traditional web applications, over a
corporate network. - Statistics gathering
Finally because these new frameworks are geared for nit testing corporates can ensure that the software meets quality assurance standards.
Conclusion
Web Applications have been evolving and at last there is real potential for marrying up desktop and Web Applications. Frameworks like SproutCore ease development of sophisticated Web Applications by enhancing JavaScript, with excellent desktop like development frameworks. This means that at last desktop like Web Applications are a reality when coupled with other technologies like faster JavaScript interpreters and lightweight browsers. Finally this will have a huge impact on both the consumer and corporate Web Applications and opens the door to a new era of the Internet.
Useful links
- Blog article on the new JavaScript frameworks.
- Blog article about Objective-J.
- SproutIt the company that developed SproutCore, and who’s product MailRoom uses it.
- Apple’s MobileMe about page, with a great video demonstration.
- SproutCore photos example.
- JavaScript: The good parts, by Douglas Crockford.


You say "Google Gears, Silverlight and AIR all require a plug-in to be downloaded into the browser.", but AIR is not a browser plug-in, it is a runtime for desktop applications that are installed on the users computer, and not run in a web browser.
Also, you say Gears is an "open standard". Gears is open source, but hardly a standard, in my opinion.
Sproutcore does indeed run on Internet Explorer, just not anything before IE7. So Windows users who are staying on top of their Internet explorer updates, can indeed use Sproutcore apps.
Targeted in many web developers' crosshairs is IE6, which is still a popular browser, but is finally being eclipsed by 7, enough so that we in the web development community can consider dropping support for this ancient and aggravating browser. Most-notably, 37signals officially dropped support for IE6 on August 15, and their products are widely used in many businesses.
Going forward, this move makes a lot of sense, especially for early adopter applications like Mobile Me. Chances of an IE6 user also using MobileMe — an Apple service, to boot — are slim. So their decision is appropriate.
For your mom-and-pop web brochure, though, dropping support for IE6 doesn't make sense quite yet.