Embodiment
At first before the explanation embodiments of the invention, what will illustrate earlier is when making webpage, can use some so-called component softwares (component), these assemblies can be one to produce menu (MENU) program code, and produce pull-down menu program code, and produce e-mail program code, an elegant figure program code or a plotter program code ... or the like the direct instrument of use can be for webpage design the time.And basis of the present invention is with an IIS (Internet Information Sever, internet information server) as Website server 2, it can carry out ASP (Active Sever Pages) file that contains html web page, ASP instruction and ActiveX assembly.
Consult shown in Figure 1ly, Fig. 1 is the process flow diagram of webpage making method of the present invention, and the method is applicable to single webpage or multiple web pages, no matter a website is made of several webpage, each webpage is all made in the manner as described below; In addition, each webpage has a sample (template), below the production process of explanation sample.
At first, as shown in Figure 2, the Web page maker makes a sample configuration table, comprising " sample ", " sample description ", " sample titles " reaches four fields such as " sample sources "; " sample " field is for record sample title; sample A for example; sample B ... etc.; " sample descriptions " field is for the respectively effect of this sample of description; the layout of webpage A for example; the layout of webpage B ... etc., " sample titles " field contents is similar with " sample " field, " sample source " field then writes down the storage location of the program code of sample own, and the program code of each sample is mainly described the layout of placing those blocks and this block in each webpage.
Then, as shown in Figure 3, make one sample-block configuration table, reach three fields such as " block sources " comprising " sample ", " block ", " sample " field record sample title, for example sample A, " block " field record block title, for example block A-1, block A-2... etc., the storage location of " block source " program code of field record block own, and the layout of placing those assemblies and this assembly in the main description block of the program code of each block.And, from sample-block configuration table, can learn to have block A-1, block A-2 among the sample A.
Then as shown in Figure 4, make one block-assembly configuration table, reach seven fields such as " assembly sources " comprising " ID ", " block ", " assembly ", " assembly IO ", " assembly incident title ", " assembly call back function (AtmCallback) "." ID " field gives each block the identification code that can not repeat 1,2,3,4..., the usefulness of convenient search.The a certain block title of " block " field record, the component Name of " assembly " field record in this block, " assembly IO " field record 0 or 1,0 presentation of events (event) is to issue web site server end (sever) by client (client), and 1 presentation of events is to issue client by server end.All contingent incidents of " assembly incident title " record component." assembly call back function (AtmCallback) " carries out the program code of above-mentioned incident, and " assembly source " field then writes down the storage location of the program code of this incident, and the program code of these incidents is present in the program code of each assembly usually.
Again as shown in Figure 5, set up an assembly configuration table, various component Names of " assembly " field record wherein, the function of " component description " field record assembly, the storage location of " assembly source " program code of record component own, and the assembly that uses in each block in Fig. 4 block-assembly configuration table is to be provided by the assembly in the assembly configuration table of Fig. 5.In addition, though the storage location of the component programs code in block-assembly configuration table in existing each block of record, ought to not need use the assembly configuration table to obtain the storage location of component programs code, but because essential record has the program code of all component to originate in the assembly configuration table, when carrying out webpage design, can make things convenient for index to take this assembly for the program designer, and make things convenient for follow-up portal management person's management, therefore still have necessity of its existence.
Fig. 6 is a message path (message router) table, reaches nine fields such as " parameters " comprising " coming source component ", " coming source event ", " source state ", " target element ", " object event ", " dbjective state ", " target sequences ", " parameter kenel ".Website server 2 can be according to " coming source component ", " come source event " and reach three fields such as " source states " to find corresponding parameters to carry out its work, and with execution result by with " coming source component ", " come source event " and reach " object event " of three field correspondences such as " source states " to pass to " target element ", allow target element upgrade the operation of (update) in good time, wherein in " parameter kenel " field be recorded as SQL the time, represent that this parameter is for wanting a SQL character string of data to database, if be recorded as CONST, represent that this parameter is a constant, Website server 2 can directly be passed to target element with it.
After above-mentioned sample configuration table, sample-block configuration table, block-object configuration table, object configuration table and message routing table are set up, it is stored in a sql server 41 of a database 4, and above-mentioned this sample program code, block program code and component programs code then leave in the Website server 2 that links with database 4.Therefore, after above-mentioned this configuration table is set up, representing the configuration of a webpage to set up and finishing, and other webpage that will be based upon in the website can follow above-mentioned construction mode to set up its configuration one by one equally.
Therefore, when the user links this Website server (IIS) 2 by the Internet, as shown in Figure 7, Website server 2 can load an assembly at user (client) end earlier, and this assembly comprises a customer incident allocator (client event dispatcher) 31, one user's message router (client msg.Router) 32 and one XML object (figure does not show).So, as shown in Figure 8, when a user sends a webpage requirement order to Website server 2, one comprises script (includescript) order (flow process 1) is transmitted to customer incident allocator 31, then customer incident allocator 31 sends this include script order to user's message router three 2 (flow process 2) with charge free, user's message router three 2 is packaged into this include script order a server message router (sever msg.Router) 21 of giving Website server 2 behind the one XML package (flow process 3) by the XML object, server message router two 1 is opened the XML package and is found that it is that a scrip (script) requires order, therefore find the sample configuration table of this webpage to the configuration table storage area 42 of database 4, take out the sample program code, find sample-block configuration table according to the sample configuration table then, take out the block program code, and find block-assembly configuration table according to sample-block configuration table, take out the component programs code, then with this sample program code, after block program code and component programs code are packaged into an XML package (flow process 4), pass to client (flow process 5) by user's message router three 2 and customer incident allocator 31, then, as shown in Figure 9, through flow process 6 and 7, client is with this sample program code, after block program code and component programs code are integrated the webpage file that forms a html format, these HTML archives automatically perform onload operation (flow process 8), give an order to each assembly (flow process 9) by customer incident allocator 31, the order of each assembly is collected via user's message router three 2 and is packaged into an XML package (flow process 11) after (flow process 10) and passes to Website server 2, Website server 2 is " the coming source component " in the root message routing table, " come source event " and reach " source state " three fields to find corresponding parameters, if this parameter is a SQL character string, mainly inform the thing that Website server 2 should be done, for example grasp data to the general data storage area 43 of database 4 or directly parameter is returned to assembly (program code) or the like (flow process 12), and as shown in figure 10, execution result is passed to " target element " (flow process 13) by " object event " of correspondence.Promptly finish initialization operation and produce an Initial page (flow process 14) after the data that this assembly transmits according to Website server 2 are carried out in client, and the generation of waiting event (event).Therefore, when event occurs on this webpage, Website server 2 promptly from the message routing table according to after coming source component, come source event and source state to find corresponding parameters kenel and parameter (instruction) and carrying out associative operation, execution result is passed to target element, make the info web that upgrades client.
Below will do more detailed description for an example:
Suppose demand according to the client, want a construction About You A as shown in figure 11, will cook up three block A-1, A-2, A-3 among the About You A, a menu A-1-1 will be arranged among the block A-1, a monthly calendar A-2-1 to be put among the block A-2, a picture A-3-1 will be put among the block A-3.Therefore, at the configuration table that needs in the database to set up in advance shown in Figure 12 (a)-12 (e).
Set up at this configuration table and to finish and all program codes have existed in the Website server all, when a user sends this About You A requirement order to Website server, Website server can find sample program code: TplA.asp in regular turn according to Figure 12 (a)-12 (e), block program code: wbkA-1.htm, wbkA-2.htm, wbkA-3.htm, and component programs code: menu .asp, monthly calendar .asp and picture .asp, and program code that should expansion .asp by name will be carried out and generation can be at client IE (internet explore through Website server (IIS), explorer) behind the program code of Zhi Hanging, these program codes are passed to client IE, client IE carries out the layout integration to these program codes makes formation one html format archives, these HTML archives can carry out the onload operation automatically then, want data by Website server to database, Website server is promptly according to the source component that comes in the message routing table, come three fields of source event and source state to obtain corresponding parameters, instruction decision according to the latent letter of parameter is wanted data to database, the literal on the menu for example, numeral on the monthly calendar and picture etc., then the data number of obtaining is returned to the target element that writes down in the message routing table, after making execution upgrade operation, About You's initial picture promptly is presented on client, as shown in figure 11.
And, when the user presses arbitrary option in the menu of block A-1, it transmits a click and orders to Website server, Website server will according to the message routing table find corresponding parameters and grasp a picture to the database carry out for the program code of picture assembly after, being about to this picture is attached among the block A-3, cover previous picture, and only need the data among the update blocks A-3 not need to change whole webpage.
In addition, what deserves to be mentioned is, the present invention is not limited in the foregoing description, that is the present invention is except by set up above-mentioned sample configuration table in the database that links with Website server, sample-block configuration table, the assembly configuration table, block-assembly configuration table and message routing table are to produce outside the webpage, it also can be by only set up the sample configuration table in database, the assembly configuration table, sample-assembly configuration table and message routing table produce webpage, wherein different with the foregoing description is, it has omitted sample-block configuration table and block-assembly configuration table, and substitute with sample-assembly configuration table, therefore Website server can be learnt the assembly that had the webpage and should (or these) assembly layout type (promptly having the sample program code in the Website server) on webpage from this sample configuration table, this way that is the first block of on webpage, not planning, and direct layout component on webpage, and obtain the program code of this assembly in this webpage according to sample-assembly configuration table, therefore, when server receives that a webpage from client requires message, after promptly correspondence obtains this sample program code and this component programs code and the original shelves of webpage with its integration formation one html format, be returned to client and produce webpage according to this message routing table execution.
As shown in the above description, the present invention is directed to each webpage, in the database of website server-side, make the corresponding sample configuration table, sample-block configuration table, block-assembly configuration table, behind assembly configuration table and the message routing table, can find the sample program code and the sample-block configuration table of this webpage by the query sample configuration table, and seek by query sample-block configuration table the program code and the block-assembly configuration table of each block, and obtain the program code of each assembly by inquiry each block-assembly configuration table, and by this sample program code, after the webpage source code of block program code and component programs code integration formation one html format is transferred to the IE execution of client, can produce a webpage in client, perhaps replace above-mentioned sample configuration table with sample configuration table and sample-assembly configuration table, when sample-block configuration table and block-assembly configuration table, also can similarly produce a webpage.And work as when having a selection operation to take place in this webpage that is produced, an event information of this selection operation generation can be passed to web site server end relatively, Website server is promptly according to coming source component, come source event and source state to find corresponding parameters on this message routing table, this parameter is a SQL character string, mainly inform the thing that Website server should be done, for example to database, grasp data or directly parameter is returned program code to assembly or the like.Therefore, by setting up above-mentioned configuration table, the program code of sample and block will become seldom and be easy to and write, and when needing additions and deletions or revising the function of webpage, the record that only need change in the relevant configuration table gets final product, the webpage that the present invention developed need not change program code itself, so more can be saved expending of human and material resources, time and financial resources widely except the functional demand that can satisfy the client.
Only be preferred embodiment of the present invention in sum, can not limit scope of the invention process with this, promptly all simple equivalent of doing according to claim scope of the present invention and description change and modify, and all should still belong in the scope that patent of the present invention contains.