Runtime Architecture

MyMobileWeb runtime execution architecture is illustrated in the figure below. At the device side, when a user interaction causes an event to be treated at the server side, it is sent an HTTP request which contains:

  • the identifier of the visual control that raised the event.
  • the event identifier.
  • data that might have been entered by the user.

At the server side, the request is initially processed by a Controller component, which recognizes the device (if it has not been done previously). Then, data is validated, and if validations are ok, data items are stored in the context. The context is a container that holds all the model data items, and it is structured hierarchically in different scopes (application, session, use case, view, etc.).

There are two kind of events sent from the device:

  • Application-specific events. These events have to do with the functionality of the application and are treated by specific handlers (methods of well-known Java classes) provided by programmers.
  • MyMobileWeb-specific events. These events are common to all applications and are related to the functionalities provided by MyMobileWeb. These events are handled automatically by MyMobileWeb, so application developers need not to worry about them. For example, a next page event is raised when the user is paginating over the contents of a table.

Application-specific event handlers decide on how to process an incoming request. Typically they will call application operations (OAs) to get more data to be put into the model and, finally, a redirection to the next view (identified by a logical name) will be made. At this point, MyMobileWeb will be responsible of locating the appropriate JSP page according to the delivery context. This JSP page will render the presentation and will resolve all the data and content bindings with the help of runtime libraries. The runtume will also resolve common issues such as pagination of contents, selection of the best images, calling the image transcoding, dealing with i18N and so on.

All event-handling related operations are accessible through an API provided by the MVC framework.

Tags: