Building web apps today
The client is too thin, so all the work is done on the server:
- Querying one or more databases...
- ...building forms for the user interface...
- ...maintaining state...
- ...and validating data.
Building web apps today
No complete separation of UI and data
Applications generally take data and create a UI:
- Java classes generated from XML;
- HTML
select is created from a recordset.
This means that it's difficult to break UI from the data:
- difficult to use the same data with a different UI;
- difficult to use the same UI with different data.
No complete separation of UI and data (2)
The kinds of problems this causes:
- URLs invariably point to a UI that acts on some data,
and not the data itself;
- an application that runs remotely is different to one that
runs locally;
and so on.
The fundamental role of web services
Advantages:
- Distributed--use internet protocols;
- Easier to maintain;
- Main advantage--standard interface to data (ODBC for the web);
- Chance to make data independent of UI ...
- ... and so foundation for new type of internet application.
By web services we don't just mean SOAP, but Atom, REST, RSS, and so on.
Building web apps with web services
Summary of web services
Advantages over conventional model:
- Allows data to move around
- Standard interfaces to data
But:
- Requires a central 'hub' server to call services
- Maintenance is still not easy, since UI is still not separate
Rich client approach
More control to client allows data to become completely independent of UI.
Applications become much easier to author; when UI is merely consuming data,
you can have:
- Forms designers;
- Help text authors;
- Database builders;
- Translaters;
And so on.
Building web apps with rich clients
The role of XForms
A standard language for defining truly distributed applications:
- Data for help, hints, labels, etc., from one source...
- ...for selection lists from another...
- ...data to edit from another...
- ...and posted to another!
Yet deployment is what we would expect from 'thin client'.
A simple XForms application
Amazon is a useful example because it shows the old and the new:
- Old: Amazon can transform your results using XSLT...
- ...or your server-based application can use web services.
- New: client can access web services directly.
Amazon search with XForms
Conclusion
Separate data from UI with web services and rich clients make this a reality.
XForms is an ideal rich client:
- Declarative;
- XML standards-based (schema validation, XPath, XML Events, etc.);
- Event driven;
- Multi-platform;
- Accessible.