Online documentation - Websydian v6.5 |
This document describes how the various Websydian Modules (and libraries) can be used in development of WAP applications. Most of the existing Websydian patterns are implemented in more or less the same way as they are in Websydian HTML applications.
The EventHandlerWithValidation, EventHandlerWithFieldConversion and PageGeneratorWithFieldConversion can be applied in WAP applications in the same way as for HTML applications.
The Websydian Utility module contains the WebEditDialog entity pattern and three main function patterns - WebGridPage, WebInsertPage, and the WebUpdatePage. Corresponding WAP patterns have been specified (see WAP Utility Patterns).
The Utility module contains a number of other patterns:
Applying Integrity Control to WAP applications is straight-forward. All fields declared as hidden input to WAP Event Handler functions are included in the calculation and validation of the Digital Signature implemented by the Integrity Control patterns.
Integrity Control is implemented in WAP applications by having all Deck Generator and Card Generator functions in the application inherit from the PageGeneratorWithSignature pattern and all WAP Event Handlers inherit from the EventHandlerWithSignature pattern.
The Secret Key used for signature calculation should be specified in the same way as when implementing Integrity Control for HTML applications.
Session Management in Websydian is implemented by server-based session handling where Session records are created in a Session table on the database server. This is as opposed to the client-based cookies approach implemented in many Web applications, which requires the Web client to download a cookie on the client machine. So far the WAP protocol does not support cookies, and therefore the Session module provided by Websydian becomes very important.
The Session module can be implemented by following the instructions provided for Websydian HTML applications with a few modifications.
The WAP Dispatcher function and the WAP Event Handlers must inherit from the corresponding abstract Session patterns while the Session abstract Page Generator pattern must be included in the inheritance path of all Deck Generator and Card Generator functions.
The User Management module makes it possible to keep track of the individual users of an application. A few modifications must be made to the existing Implementation guidelines in order to implement User Management for WAP applications.
The Error Page used by the User Management Service functions must be replaced with a WAP Error Deck function:
MyUserMgt.Services |
replaces FNC ...by FNC |
ErrorPage MyErrorDeck |
MyErrorDeck | is a FNC | ErrorDeck |
The User Management Service functions cannot be implemented directly. A Deck Generator and a Card Generator function has to be defined for each Service function to be implemented and user input fields need to be specified explicitly, e.g.:
MyLoginDeck | is a FNC | DeckGenerator |
includes FNC | LoginCard | |
MyLoginDeck.LoginCard | is a FNC | CardGenerator MyUserMgt.Services.WebLoginPage |
local FLD ...for VAR |
UserLoginName WsyUserInput |
|
local FLD ...for VAR |
Password.PasswordDisplayed WsyUserInput |
The WebCreateUserPage and WebChangePasswordPage functions can be implemented in the same way.
Having generated and built the required objects (do not generate and build the Web Services functions themselves), the Template Generator functions of the specified Deck Generators need to be run from the Generate & Build window.
One last design-guideline should be given – do not hide the password even though it is possible in WML. Keep in mind that the user will have a small handheld device and it will be difficult for others to look over his shoulder when he enters a password.
By the Audit Control module, it is possible to get an exact view of the activity of an implemented Web or WAP application. The Audit module contains functionality to produce detailed Log records for all events, application errors and system errors triggered by the Websydian application.
To implement the Audit module for a WAP application, follow the implementation instructions and just have all Deck Generators and Card Generators (instead of Page Generators) in the application inherit from the Abstract.PageGenerator of the implemented Audit pattern.
The Presentation Control module contains patterns for Message Storage and Layout Control. The Message Store pattern supports server-side handling of application messages, and it provides the ability to specify application messages in several languages. Applying the Message Store pattern in a WAP application works exactly in the same way as with Websydian HTML applications - just follow the implementation instructions and have all Deck Generators and Card Generators (instead of Page Generators) in the application inherit from the Abstract.ActivateMessageStore of the implemented Message Store pattern.
The SessionWithLayoutControl pattern enables a Websydian application to use multiple sets of Document Templates. This is a very interesting feature when developing WAP applications whereas in the WAP world, browsers from different vendors often interpret the WML standard in different ways.
Using the Layout Control pattern, different sets of Deck Templates can be defined - each set corresponding to a group of browsers. Action diagram code must be specified to check for the type of WAP browser used and select the Template Code for the corresponding set of Deck Templates (this information can be retrieved from the WAP gateway - or the user may enter the information directly in the application).
Follow the implementation instructions to implement Layout Control in a WAP application.