Architecture

XML is very general and can be used in many different ways.  Here, an architecture is shown that conforms to the general model-view-controller architecture and is well-suited for form-based interaction with a semantic object, such as a DBMS application.

In other lessons, the architecture considered was often similar to the following:

 

 

The following architecture is one that can be used effectively with xml-based form-oriented user interaction:

  

 

To work within this architecture, you need to recognize several basic requirements and/or tasks:

  1. All interaction with the user is through html pages, especially html forms.

  2. The data for forms and other html are generated by backend objects (the model) that communicate through the servlet.

  3. That data is embedded in xml.

  4. The servlet is responsible for transforming the xml generated by backend objects into html and returning the html to the user.

  5. The servlet uses a separate xsl stylesheet that is merged with the xml to produce the actual html, thereby providing a view.

  6. The user enters data into forms returned by the system and presses buttons signifying the desired action (e.g., add, search, update, delete).

  7. The servlet provides control services, figuring out what action the user desires to be done and sending the appropriate information to an appropriate object to begin carrying out the action.

  8. To keep programming as simple as possible, several layers of processing may be used to accomplish an action.

  9. This architecture is well-suited for using DataBeans, especially for user interface data, for entry data, and for view data.  The last is a good place to generate most of the actual xml.