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 Web Development of Software efficient 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 UML (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 said 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 confirmed the display properties and the page layout of the page elements of representation model to the description of interaction models and to the demand that the page shows; 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 said user customized information with the document storing of XML form at server end, convert customized information into the displayable Web page through page translation engine again.
Wherein, further comprise after the said step C:
If the Web page that is shown can not satisfy the expected effect requirement; Then generate custom-modification information through 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 said functional mode generation internal model in the steps A is:
A1, through said functional mode is analyzed; Confirm scope and the relation between each function of the function that the interface provided of Web application system; The function of the page, quantity, title; And find the page object set and be used for representing the relation between the Web page of systemic-function, obtain the framework of user interface;
A2, extract the page object set according to said 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 said 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 accomplishing systemic-function.
The said 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 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; Confirm the hierarchical relationship between the page object according to this hierarchical relationship, 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 said page object set, then increase page object with said node.
The display properties of the page elements of the said 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 said 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 is just preserved customized information XML document separately for all users in beginning.
The said page translation engine of step C is for expanding the single CSS+JavaScript of appearance table code-switching XSLT+ CSS.
Is that the form of expression of the displayable Web page has following three types through said 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 type: only have the page object of page service attribute, object of extra increase does not show on the Web page with the control form for the integrality that guarantees page business function to liking for these;
The 3rd type: the page object that has page display properties and page service attribute simultaneously.
The mode of wherein, through client said generation customization being made amendment has:
A kind of is according to user's new demand or to the adjustment information of a certain demand, direct modification XML customized information document; Another kind be through the user with the reciprocal process of Web software in the custom-modification information that produces, submit custom-modification information through 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 through the employing increase; In the present invention through 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 through the inventive method.
2) the inventive method has both helped Web application system function expansion with being stored in server end in the document sets of user customized information with the XML form, has improved the efficient of customized information being made amendment through 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 through 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 done further detailed explanation.
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 extendability, the structuring of XML and the characteristics that are easy to manage, generate function (Function) model, inside (Model) model, database interface (Database Interface) model and expression (Presentation) model of Web application system respectively, then with being kept on the server in the document sets of user customizable information that generates with the XML form; Through 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 with mode and make amendment and preserve with the customized information same structure through user end to server.
Fig. 1 generates the schematic flow sheet of method for the embodiment of the invention towards the page of Web application system automatically, 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, confirm system interface the scope of function, the relation between each function will be provided, and obtain the framework of preliminary user interface.
Here; The function that said this functional mode provided comprise contents such as accomplishing 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, through 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 said 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, said static model figure, as: type figure; Said dynamic model figure, as: activity diagram.Said 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.Said interaction models belongs to dynamic model, mainly describes a series of dynamic dependence of page object when accomplishing 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 said 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 augment and adjust object model, some be only relevant with business function and show the object that has nothing to do with the page but generally need increase.Said object just is used to guarantee the integrality of page business function, thereby generally need on the page, not show.
Step 104: according in the step 102 to the description of interaction models and demand that the page is shown, confirm 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, said 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 said 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 from the Page Template storehouse, to choose a plurality of Page Templates.
Step 105: according to the analysis result of object model, database interface model and representation model; Generate complete user customized information; And said user customized information preserved with the document of XML form, convert customized information into the displayable Web page through page translation engine.
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 a kind table transform language (XSLT, ExtensibleStylesheet Language Transformations) through using at last.The said 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 Sheets)+JavaScript; And can an XML document be translated into a plurality of Web pages according to the needs of systemic-function, also a plurality of XML documents are 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 submitted the modification information of oneself to server, server only belonged 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, through 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 type: only have the page object of page service attribute, object of extra increase does not show on the Web page with the control form for the integrality that guarantees page business function to liking for these;
The 3rd type: the page object that has page display properties and page service attribute simultaneously.
Step 106: according to the Web page that is shown 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; Said 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 said 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, direct modification XML customized information document; Another kind of mode be through the user with the reciprocal process of Web software in the custom-modification information that produces, submit custom-modification information through 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, confirms the information such as function, quantity, title of the Web page with the functional mode of said 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 through the analysis of functional mode the process of page object.As shown in Figure 3, comprise two use-cases in the said functional mode, promptly use-case 1 and use-case 2 are found the page object set through the analysis of functional mode, 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 a doublet r.As shown in Figure 4, object 1 and object 2 are the model relation between the object 3, because object 2 all is the class object in the object 1 with object 3; 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, and clear and definite ordinal relation is arranged between them, and object 2 does not show in the page if be illustrated in; Object 4 can not show with object 5; Another kind of ordinal relation also possibly 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 also is a kind of neighborhood with object 6, 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; 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 practical application, 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 generate customized information separately for each user 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, and realizes the accurate control to layout, font, color, background and other effect of the page.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 said 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 customized type software well, thereby also improve the whole development efficient of Web application system.
The above is merely preferred embodiment of the present invention, is not to be used to limit protection scope of the present invention.