In the 1980's when PCs were new, the most powerful computers were Crays, huge machines with extensive cooling.
And people used to say "One day we will all have a Cray on our desk".
So do we have a Cray on our desk now?
So do we have a Cray on our desk now?
Sure: in fact current workstations are about 120 Craysworth.
So do we have a Cray on our desk now?
Sure: in fact current workstations are about 120 Craysworth.
Even my previous mobile phone was 35 Craysworth...
To demonstrate Moore's Law
Take a piece of paper, divide it in two, and write this year's date in one half:
Now divide the other half in two vertically, and write the date 18 months ago in one half:
Now divide the remaining space in half, and write the date 18 months earlier (or in other words 3 years ago) in one half:
Repeat until your pen is thicker than the space you have to divide in two:
This demonstrates that your current computer is more powerful than all other computers you have had put together (and the original Macintosh (1984) had a tiny amount of power.)
Badly...
Mostly for pixel pushing.
Most computers spend most of their active life idle.
Why aren't we using the extra power to make people's (our!) lives better?
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.
The problem is, in comparison to web sites, no one writes applications except programmers.
With an 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.
XForms is a recent technology from W3C.
As its name suggests, it comes from an analysis of HTML Forms, and the needs of the community for Forms support.
However, because of the generality of the resulting design, it turns out to be useful for a lot more than just Forms.
XForms uses essentially a Model-View-Controller approach, so that the memory model is completely separated from the input/output.
The model specifies the values being collected (the instance), and their related logic:
Input/output controls then bind to values in the instance
The input controls, rather than expressing how they should look (radio buttons, menu, etc), express their intent (for instance: "this control selects one value from a list").
You then use styling to say how they should be represented, possibly with different styling for different devices (as a menu on a small screen, as radio buttons on a large screen).
Three possible representations of the control "select one from a list":
Colour: red green blue
The place where values are stored is called an 'instance' (there can be several of them). Each is an XML document:
<instance> <data xmlns=""> <width>640</width> <height>480</height> <depth>8</depth</depth> <bits/> </data> </instance>
It has a spreadsheet-like computation model:
<bind nodeset="bits" calculate="../height * ../width * ../depth"
An instance can be initialised by anything addressable with a URI, which includes local files, but also anything over the net:
<instance src="http://www.example.com/values"/>
The values in an instance can be submitted over the net:
<submit action="http://www.example.com" ... />
but a nice feature is that the result of the submission can:
<submit action="http://www.example.com" replace="instance" instance="results"/>
<submit action="http://www.example.com" replace="none"/>
So we have:
Everything we need for service-oriented computing.
Of course SOAP messages are also just XML instances, so XForms has everything you need to create, send, receive and unpack SOAP envelopes.
Cordys are building a system to deal with legacy systems.
Essentially they build a wrapper around each legacy machine that makes the machine talk SOAP.
Then they connect all machines with an XML data bus carrying the SOAP messages.
All messages contain all the transaction details: so the system is stateless (and therefore scalable).
Originally they used Ajax to provide the user interface, but started losing programmers to nervous breakdowns: Javascript has no engineering support.
They now use XForms.
More than 200K of Javascript
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), and was written by one person.
Remember, empirically, a program that is an order of magnitude smaller needs only 3% of the effort to build.
A company makes BIG machines (walk in): user interface needs 5 years, 30 people
This became: 1 year, 10 people with XForms
10 person years instead of 150 person years.
Different types of implementation:
Many big players have done implementations, e.g.
The advantages of the XForms approach include: