Design and realization of the main parts of the platform

Posted on by : admin Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Platform controller

The controller layer, realized by Servlet, is designated both to manage the requests of client and server, and transmit requests to other Servlet, models or views based on the current status of the program. ControllerServlet is the main part of the controller. Context class packs the whole texts of the system. FormElement packs data object of the form. BlockBuilder class packs the data model of the page submitted. ModelManager packs the management mechanism of the modal, while ViewManager packs the management mechanism of the views. Controller interacts with these classes in order, transmits the control right and data among contexts, data objects of the form, data model of the page, model and view, and completes the process during which client’s data is first disposed by Operation Logic and then displayed by view.

Tag library of the template

A common View module of Web application system based on MVC design pattern is a series JSP program files such as Struts, submitted to browser of the client. But a large amount of Java code or JSP Tag can complicate the page and weaken maintainability and readability. Due to the fact that Display Logic and the Operation Logic involved in user’s interaction page of E-government application software can be abstracted to many more commonly used workflows that have a relatively high development pack possibility than common Web application development. A perfect tag library can be totally used based on HTML and allow “No Program” come true while editing pages. This platform designs a set of userdefined tag library based on extended HTML. The userdefined tags of the template reveal their own display style, data source and so on. There are two kinds of user-defined tags levels:

(1) Page level

For example: operate_type:=modify; // It denotes that this page is provided for user to modify. form_type:=list; // It denotes that the form display on this page is a circulation display of multi-line data. loop_number:=3; // It denotes that three data lines is displayed on every page. <–GOVP define!> @GOVP_script1// It denotes the Java script of a certain section.

(2) Form level

Tags of form level are imbedded in Form object of HTLM and used in input object. For example, … GOVP_OperateType=“modify” denotes that this form is provided for user to modify; GOVP_action=“examine and approve”denotes that data submitted by this form is used in the operational workflow of “examine and approve”; GOVP_DataSource=[tableA.fieldB] denotes that data displayed here is picked up from fieldB, TableA.

Objects of Content Display Cell

The system employs the idea of composite mode to segment template page. It segments the page into several cells, each consists some page elements. There are several forms on one page, each form belongs to different cells.

In accordance with the above page segmentation, the controller disposes the cells into a group of view data objects, that is, making each segmentation cell object-oriented according to classification, and being stored in the system as tree-structure. Root joint stores template and information; Form joint is below root joint, correlating to forms on the template; below Form joint are page elements, which includes input box (text type, hidden type, checkbox type and select type). At present, tree structure of the view can only supports three layers, that is, embed is possible only below three layers among the segmentation cells. The following example takes the single line circulation and multi-line display as the display cell to show its realization. The realization of this two content cells uses the Factory design mode as showed in Fig.5. “Content display cell” is designed as Factory class, which can add new content display cell class as the user likes, only the code of Factory class need to be modified. Factory design mode brings more expandability, reducing amount of work.

Method and application example of using the platform

This platform can be used to conduct customized development of E-government system. Four parts are included, system allocation, establishing database model, program development and application development. Establishing database includes examplization customized system control form and establishing user-defined form of customized development; program development includes examplization system control model and examplization Operation Logic model; application development includes model creation, establishing role model, and establishing operation set model, as Fig. 6 indicates. Each part of the platform is a visual development.