Why Apollo?
There has been a lot of excitement, interest and discussion around Apollo, especially since we released the public alpha on labs last week. One thing that has come up a couple of times, is confusion over what Apollo is as well as what value it provides. A lot of the discussion has focused on uncertainty about why would you want to move web applications outside of the browser.
A lot of times when this question gets answered, the answer focuses on specific Apollo features (file I/O API, working offline). While these are things that Apollo can do today, that are difficult if not impossible to do consistently in the browser, a feature based discussion doesn't address the fundamental question of why would you want to move applications out of the browser.
I had been planning to write up my thoughts on this, and realized that I already had as part of the Apollo Pocket Guide for Flex Developers. Below is chapter one from that book, which explains what Apollo is, and what problems it is trying to solve. (You can download the entire book from here).
Note that the excerpt does contain a discussion of features, but one of the primary advantages of Apollo, which isn't a specific feature, is that it allows applications to run outside of the browser. This is not a ding on browsers, or web technologies, and as I point out, the browser has some strong advantages that often outweigh its disadvantages.
Ultimately though, because browser based and Apollo based applications are built using the same technologies, it is possible to deploy to both platforms, taking advantages of the strengths of each. Because of this, Apollo applications compliment web applications. They do not replace them.
What is Apollo?
Apollo is a new cross-platform desktop runtime being developed by Adobe
that allows web developers to use web technologies to build and deploy
Rich Internet Applications and web applications to the desktop.
In order to better understand what Apollo enables, and which problems
it tries to address, it is useful to first take a quick look over at
the (relatively short) history of web applications.
A Short History of Web
Applications
Over the past couple of years, there has been an accelerating trend of
applications moving from the desktop to the web browser. This has been
driven by a number of factors, which include:
- The growth of the Internet as a communication medium
- The relative ease of deployment of web applications
- The ability to target multiple operating systems via the browser
- The maturity of higher-level client technologies, such the browser and the Flash Player runtime
However, with the maturation of the Flash Player runtime, and more recently Ajax-type functionality in the browser, it became possible for developers to begin breaking away from page-based application flows. In short, developers began to be able to offer richer application experiences via the browser. In a whitepaper from March 2002, Macromedia coined the term Rich Internet Application (RIA), to describe these new types of applications in browsers, which “blend content, application logic and communications…to make the Internet more usable and enjoyable.” These applications provided richer, more desktop-like experiences, while still retaining the core cross-platform nature of the Web:
Internet applications are all about reach. The promise of the web is one of content and applications anywhere, regardless of the platform or device. Rich clients must embrace and support all popular desktop operating systems, as well as the broadest range of emerging device platforms such as smart phones, PDAs, set-top boxes, game consoles, and Internet appliances.
You can find the complete whitepaper and more information on RIAs here.
The paper goes on to list some features that define RIAs:
- Provide an efficient, high performance runtime for executing code, content, and communications.
- Integrate content, communications, and application interfaces into a common environment.
- Provide powerful and extensible object models for interactivity.
- Enable rapid application development through components and re-use.
- Enable the use of web and data services provided by application servers.
- Embrace connected and disconnected clients.
- Enable easy deployment on multiple platforms and devices.
Today the web has firmly established itself as an application deployment platform that offers benefits to both developers and end users. These benefits include the ability to:
- Target multiple platforms and operating systems.
- Develop with relatively high-level programming and layout languages.
- Allow end users to access their applications and data from virtually any Internet-connected computer.
Problems with Delivering Applications via the Browser
As web applications have become more complex, they have begun to push the boundaries of both the capabilities of the browser and the usability of the application. As their popularity grows, these issues become more apparent and important and highlight that there are still a number of significant issues for both developers and end users when deploying applications via the browser.
The web browser was original designed to deliver and display HTML-based documents. Indeed, the basic design of the browser has not significantly shifted from this purpose. This fundamental conflict between document-and application-focused functionality creates a number of problems when deploying applications via the browser.
Conflicting UI
Applications deployed via the browser have their own user interface, which often conflicts with the user interface of the browser. This application within an application model often results in user interfaces that conflict with and contradict each other. This can lead to user confusion in the best cases, and application failure in the worst cases. The classic example of this is the browser’s Back button. The Back button makes sense when browsing documents, but it does not always make sense in the context of an application. Although there are a number of solutions that attempt to solve this problem, they are applied to applications inconsistently; users may not know whether a specific application supports the Back button, or whether it will force their application to unload, causing it to lose its state and data.
Distance from the Desktop
Due in part to the web security model (which restricts access to the users machine), applications that run in the browser often do not support the type of user interactions with the operating system that users expect from applications. For example, you cannot drag a file into a browser-based application and have the application act on that file. Nor can the web application interact with other applications on the user’s computer.
RIAs have tried to improve on this by making richer, more desktop-like interfaces possible in the browser, but they have not been able to overcome the fundamental limitations and separation of the browser from the desktop.
Primarily Online Experience
Because web applications are delivered from a server and do not reside on the users machine, web applications are a primarily online experience. While there are attempts underway to make offline web-based applications possible, they do not provide a consistent development model, they fail to work across different browsers, and they often require the user to interact with and manage their application and browser in complex and unexpected ways.
Lowest Common Denominator
Finally, as applications become richer and more complex and begin to push the boundaries of JavaScript and DHTML, developers are increasingly faced with differences in browser functionality and APIs. While these issues can often be overcome with browser-specific code, it leads to code that is more difficult to maintain and scale, and takes time away from function-driven development.
While JavaScript frameworks are a popular way to help address these issues, they can offer only the functionality provided by the browser, and often resort to the lowest common denominator of features between browsers to ease the development model. While this issue doesn’t affect Flash-based RIAs, the end result for JavaScript-or DHTML-based applications is a lowest common denominator user experience and interaction model, as well as increased development, testing, and deployment costs for the developer.
The fact that web applications have flourished despite these drawbacks is a testament to the attractiveness of having a platform with a good development model that has the ability to deliver applications to multiple operating systems. A platform that offered the reach and development model of the browser, while providing the functionality and richness of a desktop application, would provide the best of both worlds. This is what Apollo aims to do.
Introducing the Apollo Runtime
So, what is Apollo, and how can it make web application development and deployment better?
Apollo is the code name for a new cross-operating system runtime being developed by Adobe that allows web developers to leverage their existing web development skills (such as Flash, Flex, HTML, JavaScript, and PDF) to build and deploy Rich Internet Applications and content to the desktop.
In essence, it provides a platform in between the desktop and the browser, which combines the reach and ease of development of the web model with the functionality and richness of the desktop model.
It is important to step back for a second and point out what Apollo is not. Apollo is not a general desktop runtime meant to compete with lower-level application runtimes. This means that you probably wouldn’t want to build Photoshop on top of Apollo. Apollo’s primary use case is enabling Rich Internet and web applications to be deployed to the desktop. This is a very important but subtle distinction, as enabling RIAs on the desktop is the primary use case driving the Apollo 1.0 feature set.
Apollo is also not a browser. While it does allow developers to use web technologies such as HTML, and Flash to build applications, it does not provide any default UI to the user for browsing web pages. It is possible to build a browser on top of Apollo, but at a basic level, Apollo is a runtime that enables developers to build end user applications, and is not an end user application itself.
At its core, Apollo is built on top of web technologies, which allow web developers to develop for and deploy to the desktop using the same technologies and development models that they use today when deploying applications on the Web.
Primary Apollo Technologies
There are three primary technologies included within Apollo, which fall into two distinct categories: application technologies and document technologies.
Primary Application Technologies
Application technologies are technologies that can be used as the basis of an application within Apollo. Apollo contains two primary application technologies, Flash and HTML, both of which can be used on their own to build and deploy Apollo applications.
Flash
One of the core technologies Apollo is built on is the Flash Player. Specifically, Apollo is built on top of Flash Player 9, which includes the ECMAScript-based ActionScript 3 as well as the open source Tamarin virtual machine (which will be used to interpret JavaScript in future versions of Firefox).
You can find more information on the open source Tamarin project at on the Mozilla website site at http://www.mozilla.org/projects/tamarin/.
Not only are all of the existing Flash Player APIs available within Apollo, but some of those APIs have also been expanded and/or enhanced. Some of the functionality that the Flash Player provides to Apollo includes:
- Just-in-time Interpreted ActionScript engine for speedy application performance
- Full networking stack, including HTTP and RTMP, as well as Binary and XML sockets
- Complete vector-based rendering engine and drawing APIs
- Extensive multimedia support including bitmaps, vectors, audio, and video
HTML
The second application technology within Apollo is HTML. This is a full HTML ren•dering engine, which includes support for:
- HTML
- JavaScript
- CSS
- XHTML
- Document Object Model (DOM)
The HTML engine used within Apollo is the open source WebKit engine. This is the engine behind a number of browsers, including KHTML on KDE and Safari on Mac OS X.
Why WebKit?
Adobe spent a considerable amount of time researching which HTML engine to use within Apollo and used a number of criteria that ultimately led them to settle on WebKit.
Open project. Adobe knew from the very beginning that it did not want to create and maintain its own HTML rendering engine. Not only would this be an immense amount of work, but it would also make it difficult for developers, who would then have to become familiar with all of the quirks of yet another HTML engine.
WebKit provides Apollo with a full-featured HTML engine that is under continuous development by a robust development community that includes individual developers as well as large companies such as Nokia and Apple. This allows Adobe to focus on bug fixes and features, and also means that Adobe can actively contribute back to WebKit, while also taking advantage of the contributions made by other members of the WebKit project.
Proven technology that web developers know. As discussed earlier, one of the biggest problems with complex web development is ensuring that content works consis•tently across browsers. While something may work perfectly in Firefox on the Mac, it may completely fail in Internet Explorer on Windows. Because of this, testing and debugging browser-based content can be a nightmare for developers.
Adobe wanted to ensure that developers were already familiar with the HTML engine used within Apollo, and that they did not have to learn new all of the quirks and bugs of a new engine. Since Safari (which is built on top of WebKit) is the default browser for Mac OS X, developers should be familiar with developing for it.
Minimum effect on Apollo runtime size. The target size for Apollo is between 5 and 9 MB. The WebKit code base was well-written and organized and had a minimal impact on the final Apollo runtime size. Indeed, the current runtime size with both Flash and HTML is just a little over 5 MB.
Proven ability to run on mobile devices. While the first release of Apollo runs only on personal computers, the long-term vision is to extend the Apollo runtime from the desktop to cell phones and other devices. WebKit has a proven ability to run on such devices and has been ported to cell phones by both Nokia and Apple.
Primary Document Technology
Document technologies within Apollo refer to technologies whose primary purpose is for the rendering and interaction with electronic documents.
PDF and HTML are the primary document technologies available within Apollo.
PDF functionality is not included in Alpha 1 of Apollo, so we cannot go into too much detail of how it is implemented. However, in general Apollo applications, both Flash- and HTML-based, will be able to leverage and interact with PDF content.
HTML
HTML was originally designed as a document technology, and today it provides rich and robust control over content and text layout and styling. HTML can be used as a document technology within Apollo—both within an existing HTML application as well as within a Flash-based application.
What Does An Apollo Application Contain?
Now that we know what technologies are available to applications running on top of the Apollo runtime (see Figure 1-1), let’s look at how those technologies can be combined to build an Apollo application.
Applications can consist of the following combinations of technologies:
- Flash only (including Flex)
- Flash-based with HTML content
- HTML/JavaScript only
- HTML/JavaScript-based with Flash content
Technology Integration and Script Bridging
Because WebKit and the Flash Player are both included within the runtime, they are integrated together on a very low level. For example, when HTML is included within Flash content, it is actually rendered via the Flash display pipeline, which, among other things, means that anything that you can do to a bitmap within Flash (blur, rotate, transform, etc.) can also be done to HTML.
This low-level integration also applies to the script engines within Apollo (that run ActionScript and JavaScript). Apollo provides script bridging between the two languages and environments, which makes the following possible:
- JavaScript code to call ActionScript APIs
- ActionScript code to call JavaScript APIs
- ActionScript code to directly manipulate the HTML DOM
- Event registration both ways between JavaScript and ActionScript
This low-level script bridging between the two environments makes it very easy for developers to create applications that are a combination of both HTML and Flash.
The end result of all of this is that if you are a web developer, then you already have all of the skills necessary to build an Apollo application.
Apollo Functionality
Apollo provides a rich set of programming APIs, as well as close integration with the desktop that allows developers to build applications that take advantage of the fact that they’re running on the user’s desktop.
Apollo Programming APIs
In addition to all of the functionality and APIs already offered by the Flash Player and WebKit engine, Apollo provides additional functionality and APIs.
Apollo APIs will be exposed to both ActionScript and JavaScript.
Some of the new functionality includes, but is not limited to:
- Complete file I/O API
- Complete native windowing API
- Complete native menuing API
- Online/Offline APIs to detect when network connectivity has changed
- Data Caching and Syncing APIs to make it easier to develop applications that work on- and offline.
- Complete control over application chrome
- Local storage/settings APIs
- System notification APIs (that tie into OS-specific notification mechanisms)
- Application update APIs
Apollo Desktop Integration
As discussed earlier, applications deployed via the browser cannot always support the same user interactions as desktop applications. This leads to applications that can be cumbersome for the user to interact with, as they do not allow the type of application interactions with which users are familiar.
Because an Apollo application is a desktop application, it is able to provide the type of application interactions and experience that users expect from an application. This functionality includes, but is not limited to:
- Appropriate install/uninstall rituals
- Desktop install touchpoints (i.e., shortcuts, etc.)
- Rich drag-and-drop support:
- Between operating system and Apollo applications
- Between Apollo applications
- Between native applications and Apollo applications
- Rich clipboard support
- System notifications
- Native Icons
- Ability for applications to run in the background
The goal is that the end user doesn’t need to know they are running an application that leverages Apollo. They should be able to interact with an Apollo application in the same way that they interact with any other application running on his desktop.
Apollo Development Toolset
One of the reasons web applications have been successful is that they allow developers to easily deploy applications that users can run regardless of which OS they are on. Whether Mac, Windows, Linux, Solaris, or cell phones, web applications provide reach.
However, success is based not only on cross-platform deployment, but also on the cross-platform nature of the development environment. This ensures that any developer can develop for—and leverage—the technology. Neither the runtime nor the development tools are tied to a specific OS.
The same is true of Apollo. Not only does Apollo provide the cross-platform reach of web applications, but, just as importantly, Apollo applications can be developed and packaged on virtually any operating system.
In fact, Apollo itself does not have a compiler or specialized IDE. Apollo applications just consist of web content, such as Flash and HTML. Any tool that can edit an HTML or JavaScript file can also be used to create an Apollo application.
A beta version of Flex Builder with Apollo support is included with the Apollo Alpha. Because Apollo applications are built with existing web technologies such as HTML and Flash, you can use the same tools that you use to create browser-based content to create Apollo applications. The Apollo SDK provides a number of free command-line tools that make it possible to test, debug, and package Apollo applications with virtually any web development and design tool.
The included command line tools are:
ADL - Allows Apollo applications to be run without having to first install them
ADT - Packages Apollo applications into distributable installation packages
While Adobe will be adding support to its own web development and design tools for authoring Apollo content, they are not required. Using the Apollo command-line tools, you can create an Apollo application with any web development tool. You can use the same web development and design tools that you are already using today.
Is Apollo the End of Web Applications in the Browser?
So, by this point, you may be saying to yourself, “Gee, Apollo sure sounds great! Why would anyone ever want to deploy an application to the browser again? Is Apollo the end of web applications within the browser?”
No.
Let me repeat that again: no.
Apollo solves most of the problems with deploying web applications via the browser. However, there are still advantages to deploying applications via the browser. The fact that there are so many web applications despite the disadvantages discussed earlier is a testament to the advantages of running within the browser. When those advantages outweigh the disadvantages, developers will still deploy their applications via the web browser.
But is it not necessarily an either/or question. Because Apollo applications are built using web technologies, the application that you deploy via the web browser can be quickly turned into an Apollo application. You can have a web-based version that provides the browser-based functionality, and then also have an Apollo-based version that takes advantage of running on the desktop. Both versions could leverage the same technologies, languages, and code base.
Apollo applications complement web applications in the browser. They do not replace them.
Related Entries
- Apollo Camp Twitter Application Released
- Apollo Cheat Sheets
- Simple HTML Based Apollo Example
- Teknision on Apollo and Branded Applications
- yourminis.com Alpha for Apollo
Comments
-
THANKS!
-
Alexander MarktlI also thought about that. You know: will Apollo replace the browser? Will it be a new Browser... I'm currently working on an Apollo based Business Application. Today such apps are still mainly classical desktop software but there are some attempts that bring them Online. The problem is: Browsers are just not the best way to do such an Application but on the otherside the Internet just has so many advantages (no installs, no backups, no updates, access everywhere ...). Apollo is the solution: It's a combination of both worlds. But why is it a complement to the Browser and not a replacement? Well there are still situations where you just cannot or don't want to install a desktop app, like at public PCs, at your private PC,... The really cool thing with Apollo is, that we don't have to decide between Web or Desktop anymore. Just take your existing code and with a few modifications it runs within a Browser or on the Desktop. You can offer both versions to your customers and let them decide, what they prefer... Btw: I'm using Flex Builder since 3 months now and the learning curve is massive.
-
BrianMy question is how large is the Apollo runtime for normal users? If it's a lot bigger than say a flash download, then Apollo suffers from the same major weakness that Java suffers from. Flash installation seems automatic and painless... if Apollo isn't the same, then that's one strike against it.
-
Jamie BadmanThe biggest problem from a personal point of view, using Apollo is, in a large corporate intranet - which is the arena I've developed in for the last five years or so, desktop security is often very tight. This means that installing a new application can often not be accomplished by a standard user; a support call needs to be placed for a support engineer to install a required application - provided it's been passed by an apps security group etc etc. This has been the great strength of developing apps in Flex (or prior to that, Flash/Firefly etc). All that was needed was approval for Flash to be installed on the corporate build and everything else just works. Apollo steps back a little in that regard though; it's back to 'each application has its own install' and therefore is likely to run afoul of corporate security/policy. However... all the above might be total rubbish - I've not tried Apollo yet - except to install a few demos on my PC - *perhaps* an install is less than it appears to be - if, for example, an Apollo install (assuming the runtime already exists on the PC) is actually the transfer of a single file/directory onto the user's machine - with no registry or system modification - then *maybe* this isn't such a problem - because of course each user will *always* have a writeable directory somewhere. Is this the case ? Or is an Apollo app install spreading itself out and about on the user's machne ? Cheers, Jamie.
-
Some thoughts on Apollo, XUL, and WPFe: http://jinsync.com/?q=node/12 ~L
-
Brian LeeWhy Apollo will probably not make it (or how Flash kicked Java's ass as a Web UI)? I could be wrong, but if Apollo's install is a lot longer and larger than Flash's installation, say closer to Java's time to install (think of it on the consumer's end as opposed to developer's), Apollo will suffer the same fate as java for the consumer. Not many people want to take time to install something that doesn't do anything specific (instant messaging, playing music, etc...). This is why web apps and flash games have taken off in popularity - most people just don't like to install software. This isn't Macromedia/Adobe's first time in trying to do this. If I remember correctly there was a desktop version of flash as well. Those who don't study history, tend to repeat it....
-
Simon LordI have to agree with Brian on this one. We were hoping that Apollo was a wrapper for our apps so that we could create an installer for our clients to run. But now it looks like we need to get our clients to install Apollo first THEN install our app? How is this appealing? Psycologically this makes the apps more complex because users have to install "all this other stuff". Ok, yes, once Apollo is installed then the user can omit that step. But how does THAT make our documentation any easier or smaller? Now we have to descibe HOW to *check* for Apollo AND how to *install* Apollo or how to *update* Apollo. That's a LOT of extra documentation to write in *our* product docs about ANOTHER companies product. This is no different than having to ask users to install HyperCard in order to run Stacks. And, as Brian suggests, the act of having to depend on the user to go through all these hoops to install Apollo before installing our app is for us, simply too risky.
-
Thank you for taking the time to write such an awesome article! It is exactly the type of overview I was looking for. Regards Tim
-
Great article, and certainly interesting technology. Most applications I've worked on the last years would certainly have taken advantage of such a mixed model. If I may add my two cents: * It's unfortunate that there is no role for a Java. The prospect of having to use JavaScript for more than a little tweak here and there would be a big turn-off for me (and many fellow programmers I'm sure). * The conflicting UI argument makes sense, but has two sides to it. I think that many of the leading web applications, especially some of the 2.0 apps, got popular because they had a UI that set them apart, as much for the looks and innovations as for the bare functionality.
-
SimonHHaving to install the runtime before you run the app could be a problem for some people. But, because the Apollo app may have a link with an existing web application you're already using, the incentive to install it is much greater than Java. The Ebay app is a good example, it's not reinventing Ebay, just extending it. A user would much rather install the Apollo runtime that extends Ebay over the Java runtime for an untested/unused Java auction app.
-
Jean-francois NeptonI have heard mentioning of more audio support, would this happen to include support for recording audio from the microphone and saving to the local file system as opposed to just hearing the sound with Flash's default API?