Summary of the invention
In view of this, fundamental purpose of the present invention is to provide a kind of page towards the page (Web) application system to generate method automatically, with the development efficiency of the Web software of raising demand customization type.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of page generation method towards the Web application system, this method may further comprise the steps:
A, according to the illustration of using of unified modeling language (UML) model, set up the functional mode of Web application system, generate internal model by functional mode then;
B, according to the object model and/or the described content of interaction models of described internal model, utilize the STRUCTURE DECOMPOSITION figure of data base manipulation statement, generate the tree figure of page business object, and give the data-interface attribute for the object relevant with page business function;
C, basis are to the description of interaction models and display properties and the page layout of the demand that the page shows being determined the page elements of representation model, obtain representation model, and according to the analysis result of object model, database interface model and representation model, generate complete user customized information, then with described user customized information with the document storing of XML form at server end, by the page translation engine customized information is converted to the displayable Web page again.
Wherein, further comprise after the described step C:
If the shown Web page can not satisfy the expected effect requirement, then generate custom-modification information by client, again amended customized information is submitted to the modification that server end carries out the Web page, and this information is kept in the customized information of relative users.
Process by described functional mode generation internal model in the steps A is:
A1, by described functional mode is analyzed, determine the scope of the function that the interface provided of Web application system and the relation between each function, the function of the page, quantity, title, and find the page object set and be used for representing relation between the Web page of systemic-function, obtain the framework of user interface;
A2, extract the page object set according to described functional mode, and utilize the relation between static model figure and dynamic model map analysis page object in the uml model, generate internal model then, wherein, internal model comprises object model and interaction models.
Relation between steps A 2 described page object comprises: belong to model relation, set membership, brotherhood and neighborhood between each object in the object model of static model; The interaction models that belongs to dynamic model is used to describe a series of dynamic dependence of page object when finishing systemic-function.
The described decomposition chart according to data base manipulation statement of step B generates the tree figure of page business object, and the process of giving the database interface attribute for the object relevant with page business function is:
The Structured Query Language (SQL) SQL statement is split into a kind of tree-like hierarchical structure, every layer of part of representing SQL statement, every layer of corresponding page object is endowed the database interface attribute, this hierarchical relationship of foundation is determined the hierarchical relationship between the page object, wherein, be in being brotherhood or set membership between the object of one deck.
Wherein, before giving the data-interface attribute to the object relevant with page business function, need set up the database interface model, its process is: utilize data base manipulation statement is decomposed the tree figure that obtains, for all nodes in the tree distribute corresponding page object set, if do not have the object corresponding in the described page object set, then increase page object with described node.
The display properties of the page elements of the described definite representation model of step C and the process of page layout are:
According to the description of interaction models and demand that the page is shown, extract the display properties and the page layout properties of page object, from the Page Template storehouse, select corresponding Page Template to show according to the page function and the relation of the navigation between the page of Web application system again, thereby set up representation model.
The process that the described analysis result according to object model, database interface model and representation model of step C generates user customized information has following dual mode:
First kind: the Web application system only generates the user customized information of a acquiescence, and user's customized information separately all generates in back that the customized information of this acquiescence is made amendment;
Second kind: the server of Web application system just is all users' preservations customized information XML document separately in beginning.
The described page translation engine of step C is for expanding the single CSS+JavaScript of sample table code-switching XSLT+ CSS (cascading style sheet).
Is that the form of expression of the displayable Web page has following three classes by described page translation engine with customizable information translation:
The first kind: only have the page object of page display properties, these objects only are responsible for the form of expression of control page control on the Web page;
Second class: only have the page object of page service attribute, these do not show on the Web page with the control form liking the extra object that increases for the integrality that guarantees page business function;
The 3rd class: the page object that has page display properties and page service attribute simultaneously.
Wherein, the mode of described generation customization being made amendment by client has:
A kind of is according to user's new demand or to the adjustment information of a certain demand, directly revises XML customized information document; Another kind be by the user with the reciprocal process of Web software in the custom-modification information that produces, submit custom-modification information by network to server end, revise the XML document that belongs to this user by server according to the modification information that the user submits to.
The page towards the page (Web) application system provided by the present invention generates method automatically, has the following advantages:
1) the present invention has increased the customizable operation to system database on the function of existing Web application system, because the current Web application system all has close ties with the application of Database Systems, the mode of the customizable operation of system database has been significantly improved the dirigibility of Web software development process by the employing increase; In the present invention by adopting the database interface model to realize this function, make the Web application system have the customizable and customizable two kinds of character of webpage representation of business function simultaneously, further strengthened the customizable scope and the Web application system function diversity of Web application system, promptly can design all Web pages that need in the Web application system simultaneously by the inventive method.
2) the inventive method will be stored in server end in the document sets of user customized information with the XML form, has both helped Web application system function expansion, has improved the efficient of customized information being made amendment by client again.
3) the customizable Web application system that adopts the inventive method to generate, owing to adopt the database interface model to make the Web application system possess customizable and customizable these the two kinds of character of webpage representation of business function simultaneously, and by the function that Web page customization information is made amendment is provided in client, the adjustment that realizes under the prerequisite of total system system requirements can avoided recompilating, so this method also has the advantage of the versatility of exploitation customization type Web application system.
Embodiment
Below in conjunction with accompanying drawing and embodiments of the invention method of the present invention is described in further detail.
The customizable page towards the Web application system of the present invention generates method automatically, can represent with the FMDP model, it is based on the UML modeling technique, and utilized the extendability of XML, structuring and the characteristics that are easy to manage, generate function (Function) model of Web application system respectively, inner (Model) model, database interface (Database Interface) model and expression (Presentation) model, to be kept on the server in the document sets of user customizable information that generate then with the XML form, by utilizing page translation engine to translate, finally the form with the Web page is presented at client end interface again; In addition, when needs are revised this Web page, can submit modification information to, be submitted to server end in mode and make amendment and preserve with the customized information same structure by user end to server.
Fig. 1 generates the schematic flow sheet of method for the embodiment of the invention automatically towards the page of Web application system, and as shown in Figure 1, this method comprises the steps:
Step 101: by the illustration of using among the uml model figure, generate the functional mode of Web application system, according to the analysis result that functional mode is analyzed, determine that system interface will provide the scope of function, the relation between each function, and obtain the framework of preliminary user interface.
Here, the function that described this functional mode provided, comprise contents such as finishing the required Web page quantity of systemic-function, title, and definite page is to the demand of data message, in addition, also comprise the contact between the various functions that realize at this interface, by the relation between this systemic-function, the relation between can each Web page of clear and definite construction system.
Step 102: extract the page object set according to described functional mode, and utilize static model figure and the relation between dynamic model map analysis page object among the uml model figure to generate internal model, wherein, internal model comprises object model and interaction models, then execution in step 103 or step 104.
Here, described static model figure, as: class figure; Described dynamic model figure, as: activity diagram.Described object model belongs to static model, is a kind of tree, and the relation between its object has four kinds of forms of expression usually: model relation, set membership, brotherhood and neighborhood.Described interaction models belongs to dynamic model, mainly describes a series of dynamic dependence of page object when finishing systemic-function.
Step 103: according to the content of object model and/or interaction models description, STRUCTURE DECOMPOSITION figure based on data base manipulation statement, generate the tree figure of page business object, and give the database interface attribute for the object relevant with page business function, execution in step 105 then.
Here, in the described process because the tree of the object model that generates in the tree of business object and the step 102 is possible different, also need object model is augmented and adjusted, some are only relevant with business function and show the object that has nothing to do with the page but generally need to increase.Described object just is used to guarantee the integrality of page business function, thereby generally need not show on the page.
Step 104: according in the step 102 to the description of interaction models and demand that the page is shown, determine the display properties and the page layout of the page elements of representation model, promptly set up representation model, execution in step 105 then.
Here, the summation of all Page Templates constitutes the Page Template storehouse, and when the Web application software was moved, described system selected corresponding Page Template to show from the Page Template storehouse according to the relation of the navigation between the page function and the page.A described Page Template is not necessarily represented the Web page function that certain is single, if a certain page function needs a plurality of Web pages to unite expression, then needs to choose a plurality of Page Templates from the Page Template storehouse.
Step 105: according to the analysis result of object model, database interface model and representation model, generate complete user customized information, and described user customized information preserved with the document of XML form, by the page translation engine customized information is converted to the displayable Web page.
Here, because XML has can expansion, structuring and management flexible characteristic, can embody the customizable characteristic of system well, can expand the document form that XML translated into the page in sample table transform language (XSLT, ExtensibleStylesheet Language Transformations) by using at last.The described XML document that is used for preserving user customized information can be one or more.In the embodiment of the invention, the page translation engine of using is the single (CSS of XSLT+ CSS (cascading style sheet), Cascading Style Sheets)+JavaScript, and can be according to the needs of systemic-function, an XML document can be translated into a plurality of Web pages, also a plurality of XML document be united and be translated as a Web page.In page loading procedure,, can also adopt the asynchronous loading mode of Ajax to some part in order to reach favorable user experience.
Detailed process can be carried out according to following dual mode: a kind of is the user customized information that the Web application system generates a acquiescence, can make amendment to the customized information of acquiescence when using the Web application system first, generation meets the customized information of own demand and use habit, after the user submits the modification information of oneself to server, server only belongs to this customization information of user for this user preserves portion, and this user can only make amendment to this customized information later on; Another kind is to be that at system design stage each user is provided with customized information separately, and when the user used the Web application system first, whois lookup belonged to this customization information of user, by after the translation of page translation engine to showing.
Above-described Web page object can be divided three classes according to the difference of the form of expression:
The first kind: only have the page object of page display properties, these objects only are responsible for the form of expression of control page control on the Web page;
Second class: only have the page object of page service attribute, these do not show on the Web page with the control form liking the extra object that increases for the integrality that guarantees page business function;
The 3rd class: the page object that has page display properties and page service attribute simultaneously.
Step 106: according to the shown Web page and the effect comparison of anticipation, judging whether needs to revise customized information, if do not need to revise, then finishes Web page generative process; Otherwise, execution in step 107.
Step 107: generate custom-modification information in client, be submitted in the customized information of server end relative users and preserve, finish this Web page generative process then.
Here, described customized information is modified the modification information that the back generates, and its structure should be identical with the structure of former customization information, so that can navigate to the part that needs modification rapidly and accurately, and customized information is modified the modification information that the back generates, and its representation can be XML form or other forms.The modification of described customized information can have dual mode:
A kind of is system development personnel or maintainer according to user's new demand or to the adjustment information of a certain demand, directly revises XML customized information document; Another kind of mode be by the user with the reciprocal process of Web software in the custom-modification information that produces, submit custom-modification information by network to server end, revise the XML document that belongs to this user by server according to the modification information that the user submits to.
Fig. 2 is the functional mode synoptic diagram of Web application system in the embodiment of the invention, determines the information such as function, quantity, title of the Web page with the functional mode of described Web application system; As shown in Figure 2, this example can provide four kinds of systemic-functions, and promptly user 1-1 uses the function of use-case 1-1; User 1-2 uses the function of use-case 1-2; User 1-2 uses the function of use-case 1-1; User 1-2 uses the function of use-case 1-2.Use four Web pages to express the function of this use-case respectively, the title of these four pages is called after respectively: user 1-1 use-case 1-1; User 1-1 use-case 1-2; User 1-2 use-case 1-1; User 1-2 use-case 1-2.
Fig. 3 is the process synoptic diagram that is produced object set in the embodiment of the invention by functional mode, is used to represent to find by the analysis of functional mode the process of page object.As shown in Figure 3, comprise two use-cases in the described functional mode, promptly use-case 1 and use-case 2 are found the page object set by the analysis of functional mode, and wherein, page object can be divided into different set according to the page function that it was subordinate to.
Fig. 4 is the object tree type structural representation that is identified by object model in the embodiment of the invention, and as shown in Figure 4, the relation between page object has four kinds of forms of expression, as, model relation, set membership, brotherhood, neighborhood.The static relation of object is that (O1, O2), this relation comprises model relation between the object, set membership, brotherhood, neighborhood etc. to one two tuple r.As shown in Figure 4, object 1 and object 2 are the model relation between the object 3, because object 2 and object 3 all are the class objects in the object 1; The relation of object 2 and object 3 belongs to brotherhood, the relation of object 2 and object 4 is a kind of set memberships, clear and definite ordinal relation is arranged between them, object 2 does not show in the page if be illustrated in, object 4 and object 5 can not show, another kind of ordinal relation also may occur between object 4 and the object 5, is illustrated in when showing on the page, and object 4 shows earlier before coming object 5; Relation between object 4 and the object 5 is a neighborhood, and object 4 and object 6 also are a kind of neighborhoods, and the distance that is this neighborhood is different.In addition, it should be noted that the identical object of title here, should be used as two different object handles owing to be associated with different systemic-functions.
Fig. 5 is the tree synoptic diagram that data base manipulation statement decomposes gained in the embodiment of the invention, as shown in Figure 5, Structured Query Language (SQL) (SQL) statement is split into a kind of tree-like hierarchical structure, every layer of part of representing SQL statement, every layer of corresponding page object is endowed a kind of database interface attribute, this hierarchical relationship has also just determined a kind of hierarchical relationship between the page object, and being between the object with one deck is a kind of brotherhood or set membership.
The principle of design of this hierarchical structure is: according to object and user's level of interaction, object decides the position of object in hierarchical structure in the variational size that shows on the page.Those and user are directly mutual, can be arranged at the bottom of this hierarchical structure by the frequent object of revising of user, such as: those allow the page object of user input query conditions just to belong to this object that is in the structure bottom.
Between layer and the layer to liking set membership, claim relation of inclusion again.The object of expression action type is positioned at the top of object model; Representing between the object of each correlation table is brotherhood, and in actual applications, all correlation tables are often used an object representation; Between the object of the object of expression display field and expression condition field is neighborhood, is neighborhood or set membership between each display field object or each condition field object; The object of expression conditional value is in the bottom in object model, be brotherhood or set membership between each conditional value object.
Fig. 6 generates the FMDP model structure synoptic diagram of method automatically for the page of customizable Web application system in the embodiment of the invention, the customizable page towards the Web application system of the present invention generates method automatically, can be abstract for to represent with FMDP model shown in Figure 6, but the inventive method is not limited to the customizable demand of the different user of same software inhouse, and is suitable equally to the customizable exploitation of the demand of similar software.
The above generates the process of the Web page automatically for the present invention utilizes the FMDP model, because in the automatic generative process of the Web page, can be each user's generation customized information separately according to the different demands of different user, and the customized information that is generated can be concentrated preservation at server end with the document of XML form, and the page translation engine that can utilize XSLT realizes the automatic generation of the Web page, but also can use the CSS technology that the display properties of page object is replenished, realize layout to the page, font, color, the accurate control of background and other effect.In this process, can also use the script such as JavaScript the incident that some page object trigger is handled, thereby improve the flexibility ratio that the Web page provides interactive function greatly.Make that in the Web page and user's reciprocal process the user can see the customization effect of the Web page intuitively, can also make amendment to customized demand before simultaneously.In addition, for user's modification information, can submit to server with a kind of structurized form equally, the structure of described modification information is identical with the structure of customized information, so that server can accurately navigate to the node that needs modification in XML document.
Thereby use the inventive method can realize like a cork that the page of customizable Web application system generates automatically, also can adapt to the development trend of current customization type software well, thereby also improve the whole development efficient of Web application system.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.