Open Standards Rich Internet Applications

Steven Pemberton, CWI and W3C, Amsterdam

Some predictions I have heard

"We will never have LCD screens - they will need too many connectors"

"Vector graphics are the future; raster graphics need too much memory"

"Full audio on computers will need too much bandwidth"

"Digital photography will never replace film"

"Moore's Law hasn't got much longer to go" (1977, 1985, 1995, 2005)

We live in an exponential world

How has computing power developed since the start of the web?

To demonstrate Moore's Law.

Take a piece of paper, divide it in two, and write this year's date in one half:

Paper

2007

Now divide the other half in two vertically, and write the date 18 months ago in one half:

Paper

2007
2006

Now divide the remaining space in half, and write the date 18 months earlier (or in other words 3 years ago) in one half:

Paper

2007
2006
2004

Repeat until your pen is thicker than the space you have to divide in two:

Paper

2007
2006
2004
2003
2001
2000
1998
1997
95
94
92
91
89
88

This demonstrates that your current computer is more powerful than all other computers you have had put together (and the original Macintosh (1984) had tiny amounts of computing power available.)

Bandwidth

What is less well-known is that bandwidth is also growing exponentially at constant cost, but the doubling time is 1 year!

(Actually I recently heard from an executive of one of the larger suppliers that the current doubling time is 10½ months...)

Bandwidth

2007
2006
2005
2004
2003
2002
2001
2000
99
98
97
96
95
94

Bandwidth

Put another way, in 7 years we could have 1 Gigabit connections to the home

My Home Bandwidth 1982-2007

Bandwidth 1982-2007

Rich Internet Applications

What is the essence of Rich Internet Applications?

- that we can now use the internet instead of disks

The Web: some principles

Simplicity

The original web was easy to create a website for

Usability

The second most important property of the web!

Response times: 0.1 sec 'instantaneous'

1 sec acceptable

10 sec unacceptable

Accessibility

We will all need it sooner or later

Device independence

Device independence

Internationalisation

This should be self-evident

The current approach to internet applications

It's amazing really how much we can achieve with the tools we have

Simplicity

Much of the simplicity has gone. It is no longer easy to create a website.

I have had reports of companies losing programmers to nervous breakdowns once JavaScript programs exceed a certain size.

Usability

If you go to a talk by Jesse James Garrett, the man who coined the word Ajax, you will be struck that his emphasis on the value of Ajax is on Usability.

Ajax above all reduces latency, since the same functionaility is achievable without it

Accessibility

Harder to achieve

Device Independence

Also harder to achieve

Problems with current approach

Too hard to program

Loss of structure, accessibility, device independence

Have to write your application several times for different devices

CSS beginning to show its age, not meeting modern needs

What is on the (standard-based) horizon?

XBL

SVG

XForms

Declarative programming

XBL

The XML Binding Language

SVG

Structured Vector Graphics

Already present on many phones, and in several browers

XForms

Despite its name, a declarative constraint-based processing engine.

It uses an MVC model

The controls are abstract, intent-based, which then can bind to actual controls

This means that XForms is accessible out of the box

It also means that it is very platform-independent, and there are good examples of this in practice.

The cost of producing applications

According to the DoD, 90% of the cost of software is debugging.

According to Fred Brookes, in his classic book The Mythical Man Month, the number of bugs increases quadratically according to code size: L1.5.

In other words, a program that is 10 times longer is 32 times harder to write.

Or put another way: a program that is 10 times smaller needs only 3% of the effort.

Constructing Applications

The problem is, no one writes applications except programmers.

Interesting exception: spreadsheets

Mostly because they use a declarative programming model.

The nice part about declarative programming is that the computer takes care of all the boring fiddly detail.

Declarative Applications

A world clock written using XFormsSome of the most interesting work in this area is being done by xport.net with their Sidewinder rich web browser.

What they have done is combined XHTML, XForms, SVG and XBL. The SVG is essentially a stylesheet for XHTML+XForms content, being applied using XBL. For instance:

The code says:

<xf:output value="..."
    appearance="fp:analogue-clock" class="clock">

The output is then something like 11:30:00, and the SVG turns this into an analogue clock (the XBL keys off the 'appearance' attribute).

Google maps in XForms

Google maps in XForms

Google maps as Declarative Application

Although the example shown above is not quite complete, it does more than Google maps does and yet it is only 25Kbytes of code (instead of the 200+K of Javascript).

Remember, empirically, a program that is an order of magnitude smaller needs only 3% of the effort to build.

Another data point

A certain company makes BIG machines (walk in): user interface is very demanding — needs 5 years, 30 people

This became: 1 year, 10 people with XForms

Example: Firefox running an XForms with embedded SVG

Firefox running an XForms with embedded SVG

Example: Picoforms running same tax form on a cellphone

Picoforms tax form

Example: Firefox getting pictures from Flickr with an XForm

Firefox getting photos from Flickr using XForms

Example: Picoforms running Flickr form in Internet Explorer

Picoforms Flickr XForm in IE

Example: Picoforms, same XForm on PC and cellphone

Picoforms on PCPicoforms on a phone

Example: Joost (TV over IP): running on Mozilla (xulrunner), using SVG widgets via XBL

Joost

Conclusion

The advantages of this approach are:

In other words: everything you need for the web!