Database Applications and the Future of HTML
By Mike McGhan, Database Administrator and HWG Governing Board Member
Databases are used in Web development in two ways--as interfaces to information repositories, which are manipulated using the browser as the client component of a traditional client-server system--and as the underlying system layer from which dynamically generated web-site content is composed.
Within these different purposes there are a myriad number of variations and hybrids. This document will focus on the needs that these possibilities place on the browser, and conversely, that the browser imposes on the DBMS, starting with the browser as a client application.
Input and Output: Data Windows
A traditional "thick client" product such as one developed using PowerBuilder (from the PowerSoft division of Sybase, Inc.) offers powerful client development facilities. These may include dedicated widgets, forms, event capture, and a custom scripting language with which to compose an application.
A key concept in these development systems is the data window control and, collectively, the form style--a structured graphical representation of relational data--allowing two way interaction between the client and the underlying data structures contained in the server.
Ignoring the Java and ActiveX extensions as being outside the topic of "the future of HTML", the facilities and methods provided by core HTML elements and scripting alone are insufficient to bring many current applications onto a web- based platform. Expanding the functionality to provide for better interaction (e.g. direct input in addition to the output capability for the <table> element) and new types-- such as master/detail components--and a tree structure for presenting hierarchically related information, would greatly improve the utility of the applications that could be constructed.
It might also be noted that the table element differs substantially from the simple "grid" control most of use to database applications: allowing for column and row spanning, variable length rows, etc. This functionality is perhaps more akin to the report formatting capabilities of a product like Seagate Software's Crystal Reports. Grouping data with control-breaks, suppressing repeating values, etc., is clearly valuable to database related applications; however such capabilities could be seen as presentation layer rather than structural, and relegated to CSS instead of HTML.
Providing other types of graphical interface elements, such as tab-form controls, from directly within the markup language would also be desirable. A page which allowed for this presentation mode in addition to simple scrolling would be well suited to those DB applications that would like to retrieve a large number of related data attribute in a single server access.
While many of these capabilities can be approximated now using more complex combinations of the basic HTML elements supplemented with server-side processing, the complexity of the rendering is subject to somewhat variable results from different browsers. Additionally, it involves complex coding (although this can be somewhat alleviated by code generation) and leads to difficult maintenance of the pages so designed. By providing more powerful fundamental elements, the coding and maintenance efforts would be substantially reduced, browserisms diminished, and general utility increased.
We can see what might be achieved today, in a product like Alliare's ColdFusion, which implements these very types of enhanced elements via their Application Server and aided by code generation. This approach, of implementing a three (or four) tier architecture, as shown in this example provided by Allaire, details many benefits beyond the addition of the new HTML elements suggested above. However, this comes at the cost of routinely extending the Web model (with the addition of the Application Server component) and shifting from an open to a proprietary solution. It can be argued that ASP and even CGI are similar extensions, though the latter is at least not implicitly proprietary.
There is also a cost in the term of complexity over the current HTML structural elements. Note, for example, the complexity of ColdFusion's CFGRID elements, as compared with, say, the definition of <tabl> from the W3C HTML 4.0 Recommendation (there is no implication here that these structural elements are to be considered to be directly equivalent). An even greater increase in complexity would be found comparing against the PowerBuilder form capabilities. Although in both cases, part of the added complexity results from overlap between structural and style elements that might better be partitioned between HTML and CSS.
The conclusion here is that a desirable goal would be to increase the functionality provided by core HTML structural elements moderately, both by adding new control types and functions specifically useful in database applications, while retaining the benefits of a thin-client and minimizing the complexity of the resulting language. The assumption remains that the use of three-tier architectures, dynamic HTML, and Java or ActiveX, to supplement these basic capabilities would continue where warranted, as these clearly provide many additional benefits outside of the scope of this discussion.
Active Client Pages
One form of the expression dynamic HTML in vogue now relates to the activation of the client. HTML originally provided for static rendering of information in the client, with changes and processing logic involving the selection of a "new" page (possibly with the transmission of control information back to the server as part of the request). This has evolved over time into a much more dynamic client page, which can--at the expense of some programming--provide immediate transformation without server interaction.
Such behavior is critical to database applications, which need to have both the ability to transform their appearance and operation in response to selections made by the user, according to various business rules that they obey, but also to provide local data validation and consistency checking functions without needing to access the server with the consequent delays.
It would seem that the properties of certain HTML elements might be enhanced to improve these capabilities, with the remainder being provided through some form of scripting or advanced technology. A good example of something that could be handled at the base tag level would be a form of input field rollover text or balloon help. One need found in developing complex forms is that there is insufficient space available on the main sheet to provide much description of a requested input value. One technique used in these cases is to implement a balloon help that will appear when the mouse pointer hovers over a control for a specified period of time. This type of functionality has already been demonstrated for links, and would be of great benefit if made more widely available.
In addition, the elemental controls found in the <form> group seem a bit underpowered. A variety of drop-down data windows, incorporating features of extensible as well as restricted menus, list boxes, and control groups/panels (e.g. outlines or shadow regions) would be seemingly simple extensions of features or facilities that could be immediately useful.
On the application control side, the ability to disable or enable certain controls or control group based on values selected in others, or dynamically require some values, once again based on prior selections, and to locally validate selections (both in value domain and other characteristics: e.g. type or size), are needed to make these client interfaces equivalent to those in stand-alone client-server tools. Improvements in the event capture and trigger facilities related to the individual controls may be required to achieve the maximum result.
Connectionless Client-Server Issues
Other issues arise in regard to the connectionless nature of the client-server interaction for Web based applications, as compared to the point-to-point connection typically maintained by traditional CS systems. This leads to a variety of issues, most particularly DB access inefficiency resulting from needing to re-establish the connection for each new request, state management problems between the client and server processes, transaction management problems (for systems that employ transaction management), and error recovery concerns.
The most usual improvement made to alleviate the disconnect/ reconnect problem is to use a server-side middleware component that can establish a continuous connection. Sometimes this is done directly from the httpd server (e.g. PHP module for Apache, MS-IIS), sometimes via an Application Server component (like ColdFusion), and sometimes using custom facilities. The improvements reported can be dramatic. Connection state is then maintained through client or server side cookies. Transaction management and error handling is performed per request to the (DBMS) server, if at all; admittedly many of the small database systems employed today with web applications have no concept of a transaction (2-phase commit) and are unconcerned with these issues.
Although important, it is unclear that there is a significant aspect of these issues that pertains to page rendering or structure, the purview of HTML. As more sophisticated DB engines and applications are developed and brought into common use with web-based clients, this area would be expected to change significantly. New techniques may consequently evolve which would benefit from additional support from the page's structural components.
Database Generated HTML
The other meaning for dynamic HTML relates to the generation of the page dynamically, customized for each request (or requestor). This has the benefit of always providing current information, at the cost of computing the page structure for each request.
The ColdFusion Application Server and MS-IIS Active Server Pages, as well as a variety of CGI methods all fall into this category. The technique divides into two steps (which may be integrated or distinct): one of deciding the framework for the page structure, the other for adding the content to that framework.
Increasingly, DBMS are being used to store the content and even the framework for these pages. This is especially useful for large sites, which would otherwise need to consist of thousands of distinct pages, separately maintained. With this approach, content providers can concentrate strictly on the content stored in the DBMS, while the site managers can focus on the "templates" used for rendering the content without needing to become involved in the details of that information. Abstracting the presentation definitions into a separate context (as is provided using CSS) can further simplify the management, although the various separations and abstraction can lead to design and management problems of their own.
It would seem that this is an area where there is some opportunity to increase site efficiency, usability and maintainability by suitably modifying the elemental structures used to compose the pages. However, it is not entirely obvious how the HTML could be enhanced or modified to better provide for such sites at this time. As they become more widely used, such changes may be more evident.
For Further Reference
Further analysis of the application of web-based clients to database systems can be found at: The National Institute of Health's Web Information Day site, and with the Database Research Laboratory at the University of Illinois.
Systems employing web browsers as distributed client applications for connecting with central database servers involve virtually all aspects of web technology, from core HTML structural tags to server middleware to the DBMS systems themselves. Certain benefits to such applications can be immediately derived from enhancements to the HTML component of the system. As the other system components evolve, additional changes and benefits may become apparent.