W3C Ubiquitous Web Domain shamrock - irish clover

Declarative Models of Distributed Web Applications Workshop Report


The W3C Workshop on Declarative Models of Distributed Web Applications took place on 5-6 June 2007 in Dublin, Ireland, hosted by MobileAware with the support of the Irish State Development Agency, Enterprise Ireland. The workshop was chaired by Dave Raggett, a W3C Fellow from Volantis Systems, and Kevin Smith from Vodafone Group.

The focus of the workshop was on exploring the potential of declarative approaches for reducing the cost and complexity of Web applications, especially those that need to work across a wide variety of devices and delivery contexts. Declarative models of applications can be used to generate the components needed to execute the application in specific environments, for example, HTML markup, client and server-side scripts, style sheets and images scaled to suit the needs of a specific device. Application developers would no longer need to be experts in the variations across browsers, and all the specialized work arounds needed to deal with them.

With the increasing demand for richer interactivity, developers have been increasingly turning to client-side scripting, but not all users will have scripting enabled or available to them. Developers can provide fall backs via alternative page designs and server-side scripts, but these are expensive to develop in parallel with the rich web client version of each application. Further challenges are faced when trying to develop truly accessible applications, and in providing an attractive user experience on a wide variety of mobile devices. Declarative approaches have the potential to address all of these challenges in a manageable way with greatly reduced costs compared to traditional approaches to developing Web applications.

Declarative approaches also make it possible to offer developers higher level authoring tools that avoid the need to work directly with markup or scripts. By using an explicit representation of the developer's intentions, the authoring tool can avoid the problems that occur when authoring in lower level markup or scripting languages, where the authoring tool is unable to recover the developer's intentions the next time the application is loaded.

Whilst standards are clearly important for on the wire formats used to deploy applications, the same also holds true for authoring formats, as standards encourage competition between tool vendors, and gives users of those tools the confidence that comes from the ability to switch tools as the need arises, and the resulting independence from individual vendors. Authoring formats may also point the way for next generation standards for on the wire formats.

Standard higher level authoring formats have the potential for improving the effectiveness of search engines through more explicit representations of authors intentions. As the variety of devices multiply, what device or devices should a search engine masquerade itself as when compiling indexes? The ability to index higher level formats would help to avoid the problems that can arise due to a mismatch between the device an end-user is currently using to make a query, and the device the search engine emulated when indexing a given Web site. Accessibility also benefits indexing as search engines are effectively blind.

First Day - 5 June 2007

The workshop started with introductions. We then heard from Steven Pemberton on why declarative approaches matter. He explained that thanks to Moore's law, your current computer is more powerful than all the other computers you have had put together. This power is largely going to waste. According to the US Department of Defence, 90% of the cost of applications is in debugging, and according to Fred Brookes, the number of bugs increases in proportion to the code size raised to the power of 1.5. This predicts that a ten fold increase in code size will make it 32 times more expensive to develop and debug. Declarative approaches can dramatically reduce code size, thereby slashing costs.

Steven took us through a number of examples, including spreadsheets - the killer application for personal computers in the early eighties. He recommends an approach based upon declarative markup and late binding for the user interface. The advantages include: greater accessibility through the model-view-controller design pattern, device independence, re-use and much less coding, since much of the fiddly work in dealing with particular environments is factored out.

This was followed by Fabio Paternò with a presentation on Migrating Web Applications through Declarative Models. He focused on the challenges of accessing the same applications from a wide variety of devices. This can be accomplished through a tiered set of models:

Fabio explained the relationship between the layers and took us through how the approach can be applied to semi-automatic transformation of a desktop design into a mobile design. More details can be found on the Teresa Web site.

We then heard from Jari Kleimola who presented on Declarative techniques in Distributed Media Center system. This looked at a scenario involving desktop computers, PDAs, phones, TVs, etc. in one or more homes coupled via the Internet. The talk focused on the notion of a Distributed Media Center as a means to coordinate the activities of other devices, and to enable remote user interfaces. XSLT is used to transform between tiered models. The approach makes use of a mix of technologies including XProc, XSLT, REX, REST, XPointer and XPath.

Next Sailesh Sathish presented on Using declarative models for multi-device smart space environments. He defined a Smart Space as a multi-device dynamic interaction environment that is aware of its physical environment and works on top of heterogeneous networking technologies and software distribution platforms. Sailesh provided us wioth a detailed use case involving a mobile phone to play music through the room's HiFi system, exploiting the handset to provide a rich user interface.

Sailesh described the use of a blackboard architecture for coupling devices together with W3C's work on DCCI to combine device contexts, REX as a basis for remote user interfaces, and SCXML as a means to model state based behavior. He identified areas for further work, including resource discovery, security, privacy and general performance issues.

Mikko Honkala presented Connecting XForms to Databases. He started by observing that even for simple Web applications, authors need to master many programming languages and paradigms, e.g. HTML+JavaScript+CSS in the client, PHP/RoR/J2EE etc for the server and SQL for the database. However, the success of spreadsheets shows that there is a huge potential demand for non-programmers to be able to create their own applications. Mikko went on to describe XFormsDB, an XQuery based extension to XForms to support databinding to databases. This enables higher authoring tools and deployment through transformation into XHTML+JS+CSS for execution on existing browsers. He then showed how this could be applied to a blog editor.

After a break for lunch we heard from Lasse Pajunen. He presented The role of Web Services as a means for browsers to provide services. This involves modeling Web applications with XHTML, WS-BPEL and WSDL. The browser is modeled as a presentation service that ouputs form data. A process description describes the connection to back-end data and calculation services, leveraging work flow and service composition technolologies. To treat the browser as a service, a page push paradigm is needed, and may be implemented using client pull and a proxy. Lasse noted that it is important to understand different client classes (desktop, mobile, etc.) and drew attention to the need for more client-side adaptation options for different and dynamic contexts.

Bruce Lucas and Charlie Wiecha then presented Collage: A Declarative Programming Model for Compositional Development and Evolution of Cross-Organizational Applications. This is a declarative approach aimed at applications that work across organizations. RDF is used for the data models, which simplifies the programming model and eases evolution/refactoring by eliminating document boundary issues. For interaction and composition, the model-view-controller design pattern is used to enable flexible composition and device adaptation. Collage leverages and extends concepts familiar from XForms

Open Discussion

The open discussion periods were based around topics people had posted during the day on a flip-chart. We started by discussing what we meant by "declarative". The basic idea is to separate the essence of an application from the details of how it should be implemented. The latter can be dealt with by libraries and transformation tools that are common to many applications. This factorization reduces the level of skill needed to create applications and expands the pool of developers.

Charlie Wiecha noted that most task definitions are recursively decomposable. Others noted the need to push up the level of abstraction to cover more aspects. HTML is considered to be too weak. Petri Vuorimaa said that he is looking for abstractions that enable modeling applications at a much higher level than XHTML.

We then talked about accessibility. ARIA is being driven by the need to make rich Web applications accessible, but would benefit from the use of higher level models for authoring purposes. Declarative authoring solutions have the potential to make it easier to ensure the accessibility of Web applications.

We then switched to the challenges posed by introducing tiers of abstraction into the authoring process. Handled badly, this can result in extra effort and a backlash against semanticly rich approaches. Good tools make it easier for people to achieve their goals whilst capturing the information needed without burdening them for no apparent gain. We would like to support end-to-end development, and perhaps this can be considered in terms of user interfaces, dialogue flows, and abstract data models.

We ended the day by discussing what is needed to provide a functional user experience. One observation is that there are huge numbers of low end devices still being deployed so we shouldn't just focus on high end devices. How far out should standards work be aiming at? A minimally usable experience discourages adoption, but is better than nothing at all. It is also impractical to forsee everthing that people will want to do. The success of mashups shows that it is important to build in flexibility.

Second Day - 6 June 2007

Our host, Rotan Harahan started the day talking to us without slides, and startling us by saying that he hates markup! He explained that markup is important, but it should be in the background. This is a failing of current authoring tools. There needs to be a barrier between the authors and the details of the technologies. We should be addressing the needs of the vast majority of the population, not the tiny geeky minority.

Someone commented that Adobe is doing this with their authoring frameworks for flash etc. Rotan responded saying that the market battles are on flash, silverlight, etc. where the focus is on technologies rather than the needs of users. We are wasting our energies wandering around battling the troglodytes of the caves and need to climb back out into the light. Rhys Lewis added: that to dynamically generate web pages today involves a lot of complex scripting. Why is this still the case? A declarative approach should make this easier to solve.

Rhys Lewis then gave a presentation on Application Adaptation. Device independent authoring techniques have proven ability to reach out to a wide range of mobile devices. The challenge is now to extend this beyond look and feel to behavior, through capturing the author's intent not code, and with late binding to particular application environments, for example, J2ME in various flavors, Brew, Symbian, and Windows Mobile. Declarative approaches can reduce the number of technologies authors need to understand.

Rhys briefly described W3C's work on DIAL (Device Independent Authoring Language), this is a profile of XHTML2, XForms and DISelect. It can be combined with custom controls which abstract behaviors above the client and server side components used for today's Ajax solutions. Policies can provide a means for authors to control adaptation using rules that determine what bindings to layout and behavior to use in different delivery contexts. It is important to be able to capture semantics above the level of individual pages, and perhaps SCXML and UML may prove helpful for that purpose.

Next up, Joerg Heuer gave us a presentation on Improving UI portability. He started by describing the application of Web technologies to entertainment in homes and cars, and to automation in health care. Current approaches based upon HTML, CSS and JavaScript conflate different levels of abstraction. He would like to see higher level models that account for navigation and composition.

Stability and timely behaviour is critical, but flexible configuration has become quite complex. He argues that portability demands the ability to compose controls, but currently that still works best with manual intervention by the application developer. Desirable aspects include separation of logic and presentation, scalable presentation, low computational complexity and mapping of events to navigation concepts (intent based events) We need to study common use cases to identify the appropriate higher level models.

José Manuel Cantera Fonseca then presented Declarative Models for Ubiquitous Web Applications Morfeo-MyMobileWeb. He started by observing that XHTML is general purpose and not as easy as it could be for describing user interfaces. This gap has been filled by script based libraries, e.g. Ajax toolkits such as Dojo, Yahoo and GWT. There are also proprietary markup-based higher level abstraction layers such as JSF, XAML, XUL, Laszlo and MSXML. When it comes to open standards, XForms isn't sufficient and further standardization work is justified.

Ajax toolkits encourage greater use of procedual approaches increasing debugging costs. Large scripts may lead to poor performance, and are unfriendly for mobile devices and accessibility tools. The dependency on particular toolkits compromises portability. Similar problems are found with proprietary tag-based solutions. The open source community has started to understand the need for an open standard, e.g. with work on the Apache XAP project.

José would like to see W3C work on a declarative format for applications and user interfaces. Attempts to get this started in the W3C Web Application Formats working group foundered due to a lack of critical mass. In particular, browser vendors saw this as a competitor to HTML5. However, this sounds like a good fit to work on declarative authoring formats in the Ubiquitous Web Applications working group.

José was encouraged to join the UWA WG and help drive work on policy based layout and behavior. There is a gap between the abstract controls in XForms and the kinds of controls José was describing. CSS is insufficient as it currently lacks all of the necessary abstractions. A markup based solution may be more appropriate and could leverage José's experience with Morfeo.

Giles Payne attended the workshop on behalf of PUCC (P2P Universal Computing Consortium). He presented The PUCC Protocol and Service Descriptor Metadata. PUCC is a non-profit R&D organization focusing on overlay P2P networking, and the development of cross industry specifications, e.g. PCs, printers, home appliances and digital cameras. The aim is to support interoperability over different kinds of networking technologies by building on top of existing standards.

This enables each device to communicate with each other via an overlay peer to peer protocol. Service and device discovery will be enabled through XML-based meta-data standards. PUCC is mainly composed from companies based in Japan. It plans to make the specifications publically available and would like to collaborate with the W3C on meta-data standards. This covers static data (e.g. product name and version), state variables and services. A subscribe/notify model is used for event exchange.

In principle, device descriptions could involve state transition models, where the behavior of the device alters from one state to the next. A further idea is to assert constraints or invariants. The meta-data may also cover access control and other security related mechanisms.

There is a close relationship between the PUCC work and UWA WG ambitions for work on resource binding and discovery. Collaboration between W3C and PUCC could strengthen the involvment of consumer electronics companies to the benefit of all involved.

We then heard from Charles McCathieNevile and Gorm Eriksen who presented Evolution approaches and emerging techologies. Charles started saying that there is one web, but many ways to use it, pointing out the many devices on which browsers are now available. The browser is a platform and usage is still exploding. There is a lot of innovation going on including standards, but how much more do we need?

When it came to questions, one person questioned the degree to which people would be willing to trust websites with their data in the trend to web-based applications? This would appear to depend on the ability to move your data from one website to another, and to avoid being locked into proprietary formats and databases.

We discussed the relationship between incremental extensions of existing standards and work on new disruptive technologies. A mix of both approaches seems necessary, but HTML as it currently stands is insufficient for high level declarative authoring needs, leading to a strong dependence on scripting.

The last talk was given by Joshue O'Connor and entitled Analyses of usability considerations for providing secure access to device capabilities and personal/confidential information. He started by describing the role of user testing for ensuring Web application accessibility. He then asked how will the challenges raised in dealing with trust, identity, privacy and security be addressed? Will current declarative languages be sufficient? User testing is critical to assessing the usability and effectiveness of Web application security.

In subsequent discussion, Steven Pemberton noted that Google is also 'blind' and so will benefit from improved accessibility of Web applications. He added that Forrester research studied 8000+ users as to why they used one site over another. They included dozens of variables. The four key ones turned out to be: 1 content 2 usability 3 speed and 4 freshness. It is a shame that companies do not treat usability seriously.

Open Discussion

As for the first day, we collected topics on a flipchart.

A show of hands was then used to rank topics, but as you can expect we ran out of time before exhausting the list of topics.

Standardising on what, exactly?

One approach is to focus on APIs (the things between components), another is focus on the components. A concern with the latter is that focusing on mechanisms may hinder innovation. Another question is whether to proceed top-down, bottom-up, or middle-out. Standards work tends to be on specific building blocks where it is easier to reach agreement and make progress, rather than complete solutions.

Security models are important but need to be flexible. We should support the uses cases we have, rather than what could be done in general. One such use case relates to the composability of web apps. Use cases can throw up requirements, but additional work is needed to avoid the risk of patchy requirements with major gaps, as it is hard to predict how people will use the technology.

When it comes to capturing intent, this can be explicit or implicit, where even if people don't explicitly describe their intent, you might be able to infer it. The intent may change during interaction. If you can identify goals, than achieving it is the ultimate intent. One example is search where the search engine may infer likely intent.

What about aggregating and aligning related technologies? How do we get organisations to work together? One approach is to identify gaps in standards and decide how to fill them. Outreach to open source groups can help to establish standards.

Use Cases

The Chairs had earlier asked people to write a brief description of use cases on a flip chart during the break. Lasse Pajunen started with a use case for people sending messages to the world (twitter service). The user experience is good, but the implementation needs to be more accessible/adaptable, e.g. for mobile access. That would be easier with a better separation of concerns, for instance, by using XForms and XBL, together with a remote eventing model. Lasse also points to flickrvision and the concept of geo-blogger apps.

Sailesh Sathish is next up. He describes someone in their living-room watching TV, receive a message saying that a new picture has been uploaded by a friend somewhere. The application would ask if he wants to have the photo displayed on the TV. How to enable such a scenario? A basic requirement is the need for an effective delivery context vocabulary about appliances, features on them, etc. plus a means to access the delivery context. You also need a way for devices to communicate with each other. Websites like flickr could open up their APIs to enable such applications from home appliances.

Charlie Wiecha suggested the value in sharing the complexity across different layers, e.g. client interaction, JSP flow, user task flow, and business process flow. Applications will evolve over time, and that is an important driver. You need flexibility among the layers to facilitate evolution. Things may move from the client side to the server and vice versa. The UI may change significantlty when moving from desktop to mobile with the UI being split into multiple parts.

Dave Raggett asks: Can we have Spreadsheets 2.0 where non-programmers are easily able to define forms and describe the data and work flows without having to deal directly with the markup? This could exploit XForms, XBL, and other W3C technologies. Today's Web forms are much too hard for non-programmers and that is sad considering the success of spreadsheets as the first killer app for PCs a quarter of a century ago!

Rotan Hanrahan drew our attention to the XHTML role attribute as an outcome of a previous W3C workshop, held in Dublin in 2004. Simple things like navigation, main, secondary, etc. as roles for pieces of content in a web page. This could be supported by authoring tools that provide a palette of components, so that authors don't need to edit the markup directly. Without roles, adaptation engines could select the wrong parts of a page when slimming it down for mobile use, e.g. discarding the important parts but keeping the adverts. Mobile users don't want or need everything provided for a desktop user. This is an important use case for UWA.

There was some discussion about disruptive innovations, such as Ajax. This has presented problems for accessibility and also for mobile devices where battery drain is an issue. Higher level models of applications would make it easier to adapt them to different delivery contexts without becoming battery or bandwidth hogs. For map-based applications, there is a need for better semantics for things on maps.

What should W3C do next?

There was encouragement for W3C to push ahead with work on declarative authoring techniques, including the concept of late binding of the user interface to a functional core as per XBL. One person expressed a concern about the number of working groups and the cost involved in tracking them — resulting in a preference for incorporating effort into existing activities. It was noted that some groups (e.g. WAF and Web API) don't have the bandwidth for additional work and in any case are not focusing on what this workshop has been talking about. In particular, those groups are focused on formats directly implemented by browsers. There appears to be the beginnings of concensus on using state models, semantic enrichment, late binding, composition and mechanisms to support evolution, etc. However, further work is needed on modeling page flows.

Smaller lightweight specifications are easier for implementors, where some specs define things and others define how to combine them. What is the relationship between ubiquity and accessibility? The work on roles and intent based events seems like a good example of an intersection between the two areas. In general, many of the problems cut across the boundaries of existing working groups, so coordination is important. The responsiveness of working groups to external viewpoints is a factor.

Summary and suggestions for future work

There is strong support for W3C to work on realising the benefits of declarative techniques for authoring web applications, and for the distinction between authoring formats and "on the wire" formats. There is a huge potential for easier to use authoring tools based upon such techniques, and which avoid authors from having to master multiple programming languages and the quirks of different browsers and devices. This has the potential to provide the following benefits:

W3C should focus on clarifying the requirements for declarative modeling of web applications, and a gap analysis that identifies where existing standards are insufficient, based upon a study of use cases and member contributions. Some of the topics to be considered include:

Follow up workshops may be appropriate, with a more narrowly defined scope.