Web Applications Made Easy

OpenWAML Viewer - Web Application Viewer
Omnibus - Offline Web Storage

Introduction

As web application developers, we have always been well aware of the limitations of web browsers when it comes to creating rich, interactive web based applications. Despite these restrictions many individuals and companies have insisted on building browser based applications because they understood the importance of moving their applications to the web.

In this series, we will explain why we created the OpenWAML web application viewer and how we see the future of web applications. We will also examine the future of web browsers as a platform for web applications and we will look at some of the reasons for developing web applications in the first place and the alternative technologies that are available.

Do we really need a better web browser?

Web browsers were simply not created to do much more than viewing HTML documents. The fact that we are actually able to create applications that run inside a browser is a testament to the power of JavaScript and Dynamic HTML and a recognition of the efforts of those individuals who believed so strongly in the web as a platform for applications.

In some ways, the web today resembles the PC scene in the late 1970's and early 1980's when Apple and Microsoft showed the world that the simpler and cheaper Apple computers and PCs were in many ways better that the much larger mainframe systems of the day. The web is poised to repeat this lesson, albeit with software rather than hardware.

So, do we need a better browser that is more suited for application development or should we discard the semantic web paradigm altogether and return to large monolithic applications as suggested by some vendors?

Here is what other people have to say about the subject:
"What we need is a Web browser that doesn't just serves up documents, but serves up applications: full screen native GUI, network-transparent and, most important, fast, lightweight, real-time applications" - Ric Hardacre - (Web2.0 Journal)
http://www.web2journal.com/read/315240.htm
"The popular notion among tech industry followers is that a more capable Web browser, able to run sophisticated applications either online or offline, will make the desktop operating system less important, if not irrelevant." - David Meyer - (ZDNet UK)
http://m.zdnet.com.au/0,2000066034,339279528,00.htm
"Forrester has predicted that Web pages will get replaced by programs - we call this executable Internet (X Internet)."
http://www.ladlass.com/ice/archives/2005_10.html
"Personal computing is currently in a state of transition. While traditionally users have interacted mostly with desktop applications, more and more of them are using web applications. But the latter often fit awkwardly into the document-centric interface of web browsers. And they are surrounded with controls-like back and forward buttons and a location bar-that have nothing to do with interacting with the application itself."
http://labs.mozilla.com/2007/10/prism/
"Are Web Browsers Ready for the Next Generation of Internet Applications? Browsers were built to display documents, not deliver applications" - Esther Schindler, CIO
http://computerworld.co.nz/news.nsf/devt/07534A1E667A85FCCC2573A9007F9891

These quotes are from influencial programmers, technical writers and technology experts and reflect the general opinion of those on the forefront of the web revolution.

It should be quite clear that the need for a web application "browser" exists and that web browsers were never designed to be used as application platforms. Browsers do not naturally lend itself to application development and the "application inside of an application" paradigm often creates a weird and confusing user interface.

In the next part of this series, we will look at some of the reasons why companies started developing web applications and why you need to take all of this very seriously.


Historical background to web applications

The web has forever changed the way people interact and companies operate. Pivotal to this change is the web browser, which managed to put a face to an otherwise abstract computer network (Internet). For the first time ever, people were able to effortlessly share information across borders and continents.

It wasn't long before software developers realized that the web browser could also serve other purposes.

For years companies had known that serial (dumb) terminals connected to centralized application servers (usually mainframes) were cheaper and easier to manage. The personal computer turned this model upside down by moving all the processing power to the user side. This change was necessary as it enabled users to run much more powerful applications.

Unfortunately, along with the decentralized model came much more stringent requirements for developing, testing and distributing desktop software. This unfortunately also increased the Total Cost of Ownership (TCO) for each computer.

Somewhere along the line, a few Internet companies realized that the humble web browser could essentially perform the same functionality as a serial terminal. In the place of bulky Mainframes came powerful web servers, serving up custom generated web pages to millions of users each day, and so Web 2.0 was born.

Today, the old serial terminal has almost been completely replaced by browser based applications, but the basic concepts stayed the same. Centralized databases manage and store all data, while web servers perform business logic and generate HTML based user interfaces. Web browsers then interpret and display these web pages. By using any of a number of server side technologies, like ASP.NET, PHP, Ruby, Java, etc. web developers can now create applications that mimic equivalent desktop applications.

Unfortunately, web browsers were never designed to host applications and lack the necessary elements needed to create interactive applications. Some of these limitations can be overcome by using fancy JavaScript coding. This however comes at the cost of larger, more complex applications resulting in longer development cycles and reduced maintainability. More than often, usability suffers from the confusing application inside of an application (multiple menus and toolbars) design. You simply have to compare advanced web applications like Google's GMail with desktop applications like Microsoft's Outlook to realize the web applications still have a long way to go before they will be able to match the usability and visual candy of desktop applications.

So, what other options do we as web developers have? In the next part of this series we will look at the alternative technologies that are available and why they don't always posess the silver bullet.


Web Based vs Web Delivered applications

Sun Systems were the first company to propose a solution when they adapted their Java language for use inside web browsers (Java Applets). More recently, Adobe adapted their Flash/Flex viewer to run as a standalone application (AIR), while Microsoft produced a scaled down version of the .NET Windows Presentation Foundation (WPF) that could run inside a web browser (Silverlight).

These products all share the same basic design principle. A programmer writing software for these products will compile his code to an intermediate language, (sometimes called byte code) and upload this code to a web server from where the client will then download and "execute" the code. Note that in none of these products does the web server actually generate any output as is the case with (HTML) web pages. The web server merely acts as a file server with no knowledge of the contents of the file itself. This means that the client computer simply downloads and executes a previously compiled application in much the same way that a normal EXE file is downloaded and executed.

It is therefore pertinent to understand the difference between web delivered applications and web based applications. In the former case, applications are pre-compiled and wholly executed on the client computer, while web based applications operate more like web pages that consists of smaller grained views that are generated and displayed on request.

This difference is not just academical, but forms the basis of all Web 2.0 applications. To truly reap the benefits provided by Web 2.0, we need to consider the following:

  • Do you benefit from incremental development and debugging? How long does it take for software changes to filter down to client computers? How long after bug fixes are applied will your users receive these fixes?
  • Can you envision a scenario where different users may be executing different (and possibly conflicting) versions of your software? How will your web server handle requests from different versions of the same application and do you always have to keep backwards compatibility in mind?
  • What is the purpose of your web server? Does it play any part in the generation of a custom (dynamic) user interface or does it simply serve up files and provide web services?
  • Do you sometimes need users to work with the same application in different ways or have personalized views of the same core application, i.e. "Advanced mode", "Restricted mode", "Administrator Mode", etc?
  • Do your users always need to download the complete application every time that your developers make software changes, or are changes immediately visible?

These are just some of the issues that developers and technical support people need to face when working with pre-compiled applications.

The real question you need to ask is:

What benefits can be gained by rewriting native Win32 based software into another similar pre-compiled format?


Web applications - technology progression


A. Windows applications technology progression (left to right)
  1. Regular Windows Applications: These applications were limited to the desktop and were often installed from physical media.
  2. Web Delivered Applications: Increasingly applications are installed and/or updated via the internet.
  3. Web Enabled Applications: Some applications is starting to make use of web services for data exchange, e.g. Ordering, Invoicing, Stock Market Tracking, etc.
B. Web applications technology progression (right to left)
  1. Static Web Pages: Initially we only had static (HTML) web pages with unidirectional operation.
  2. Dynamic Web Pages: In the last 10 years we saw a dramatic increase in dynamically generated web pages.
  3. HTML Based Applications: More recently, web applications started appearing that mimic the desktop interface.
WAML offers the following advantages to desktop as well as web developers:
  • Traditional desktop application developers can now develop web applications with the same ease/speed as what they are used to and these apps will look and behave in a familiar way as desktop apps.
  • Traditional web application developers can now develop web applications with much more advanced user interfaces with the same tools/methods that they are using right now.

The solution

Web based applications have many advantages over web delivered applications:

  • Like web pages, web based applications can be developed and maintained by any number of developers with minimal interaction.
  • Web based applications can scale perfectly on any number of web servers, located anywhere in the world.
  • Unlike desktop applications, web applications can grow "organically" and can be adapted on-the-fly as business needs change with no need for users to constantly upgrade.

We believe that the current HTML standard is sufficient when it comes to displaying reports and documents, but it fails when we need to create rich interactive applications. Rather than trying to extend HTML in a propriety manner, we felt that it would be better to create a totally new HTML-like language with powerful tags like, <menubar>, <toolbar>, <treeview>, etc. We aptly named this the "Web Application Markup Language" or WAML.

WAML does not replace HTML but rather completes the picture. In the same way that HTML is used to markup text documents, WAML is used to markup application elements. Apart from a new set of tags, we retained all the familiar concepts of HTML like JavaScript, AJAX, Cookies, etc. To view these new style web pages we created a new kind of "web browser" that can display WAML and HTML with a familiar desktop application look and feel.

The Alfega OpenWAML viewer makes it possible for web developers to create rich web based applications using nothing more than standard web server software and familiar tools. WAML based applications are not just web pages that are viewed inside a web browser, but are complete standalone applications that look and behave like any other desktop application.

Because WAML code is so similar to HTML, if you already know HTML then you will immediately feel at ease creating applications using it. In some way it resembles creating normal web pages, albeit with much more powerful elements. WAML is a natural partner to HTML and most developers pick up on it in just a day or two.