CN101030228B - Page navigation method and device - Google Patents
Page navigation method and device Download PDFInfo
- Publication number
- CN101030228B CN101030228B CN2007100888126A CN200710088812A CN101030228B CN 101030228 B CN101030228 B CN 101030228B CN 2007100888126 A CN2007100888126 A CN 2007100888126A CN 200710088812 A CN200710088812 A CN 200710088812A CN 101030228 B CN101030228 B CN 101030228B
- Authority
- CN
- China
- Prior art keywords
- page
- rule
- navigation
- request
- regulation engine
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
A method for navigating page generates and executes navigation logic by regularizing match. The device and application server for realizing said method are also disclosed.
Description
Technical field
The present invention relates to the dynamic page technical field, be specifically related to a kind of page navigation method and device.
Background technology
In-depth day by day and expansion along with internet, applications, in a lot of application scenarios, situation such as large-scale corporation's level application for example, generally change client/server (C/S:Client/Service) into and use, and begin gradually to use from C/S application changing into browser/server (B/S:Browser/Server) from desktop application.The user navigates to the different pages by hyperlink in B/S uses, and obtains the various services that server provides.
The user was the page from the minimum complete unit that server obtains during B/S used, and the user sends request to server, and obtained a response page that can supply browser-presented from server.Along with the increase day by day of using complicacy, the internet, applications page is showed the dynamic page technology that develops based on navigational logic by the page of static state gradually.Industry mainly contains following two kinds of modes that realize navigational logic at present:
One, with the page is the navigation at center
This mode is representative with Active Server Pages (ASP:Active Server Pages) technology.A kind of navigation of ASP moves as shown in Figure 1: navigational logic 11 directly is hard-coded in the server page 1, the user navigates to 1 request of the server page by browser 2, the code of navigational logic 11 accepts request and navigates according to user's solicited message in the server page 1, the code of showing logical one 2 then provides processing such as content format, layout, and the response page content displaying that obtains navigating is to user browser 2; Navigational logic 11 also can be according to user's processing of request result is being transmitted request each other.
The defective of this scheme is: though simple in structure, but navigational logic and page displaying logic are obscured in the server page, along with the increase of project complexity, show that logical code and navigational logic code twine mutually, cause the maintainability of server page code to descend; And, owing to the form of navigational logic with code exists, exist than higher customization threshold, make the client be difficult to use.
Two, use the front controller navigation
This mode is representative with the java server page (JSP:Java Server Pages) technology.A kind of navigation of JSP moves as shown in Figure 2: accept the request of user browser 4 by a front controller 3, front controller 3 mates according to the definition and the solicited message of the configuration of the navigational logic in the navigation configuration file 5 51, find corresponding navigational logic, call navigational logic real in the navigational logic order 6 then and carry out computing, obtain navigation results, the possibility of result is the corresponding server page 7, also may be the forwarding of request.
In this manner, navigation procedure is divided in the command object, navigation configuration file 5 of front controller 3, navigational logic order 6.Wherein real navigational logic is packaged in the command object of navigational logic order 6, and navigation configuration file 5 provides the look-up table of navigational logic command object for front controller 3; Only need to comprise displaying logic 71 in the server page 7.
This scheme has realized navigational logic and has showed separating of logic, but defective is: the just registration table that in fact the navigation configuration file serves as or the effect of look-up table, real navigational logic is present in the navigational logic command object, the modification of navigational logic command object need be passed through processes such as exploitation, compiling, packing, deployment, can not or be difficult in the runtime customization; And, therefore can't accomplish good navigational logic configuration owing to do not have real navigational logic in the navigational logic configuration file.
Summary of the invention
In view of this, on the one hand, provide a kind of page navigation method that is easy to carry out runtime navigational logic customization, comprise step: receive page request; Resolve described page request and obtain solicited message, comprise the uniform resource address that is requested the page in the described request information; Call regulation engine according to described request information and carry out rule match, wherein, the described rule match of carrying out comprises: mate in the rule bag of address according to described uniform resource address, select corresponding navigation logic rules bag; Call regulation engine and in selected navigational logic rule bag, carry out rule match according to described request information; According to the result of the regular executing rule that matches, transmit page request or navigate to the corresponding server page.
And a kind of page navigation method comprises step: receive page request; Resolve described page request and obtain solicited message, call regulation engine according to described request information and carry out rule match, wherein, the described rule match of carrying out comprises: according to described request information searching navigation configuration file, select corresponding universal navigation order; Carry out rule match by selected universal navigation command calls regulation engine according to described request information; According to the result of the regular executing rule that matches, the result of described rule comprises the forwarding page request or navigates to the corresponding server page.
Simultaneously, also provide corresponding several page navigation device:
One comprises: front controller and regulation engine; Described front controller is used to receive page request; Resolve described page request and obtain solicited message, comprise the uniform resource address that is requested the page in the described request information; Mate in the rule bag of address according to described uniform resource address, select corresponding navigation logic rules bag; Described regulation engine is used for carrying out rule match at the selected navigational logic rule bag of described front controller according to described request information; According to the result of the regular executing rule that matches, transmit page request or navigate to the corresponding server page.
One comprises again: front controller, navigation configuration module, generic command module and regulation engine; Described front controller is used to receive page request; Resolve described page request and obtain solicited message; According to described request information to described navigation configuration module searches navigation configuration file; From described generic command module, select and the corresponding universal navigation order of described request information according to described navigation configuration file; Described navigation configuration module is used to provide the navigation configuration file; Described generic command module is used to provide the universal navigation order; The described regulation engine of universal navigation command calls according to described front controller selection; Carry out the result of the rule that described regulation engine returns, transmit page request or navigate to the corresponding server page; Described regulation engine is used for carrying out rule match according to calling of described generic command module, and the result of the rule that matches is returned to described generic command module.
Adopt technique scheme, the embodiment of the invention generates and carries out navigational logic by rule match, avoided direct with true navigational logic encode, the standardization of rule-based collocation form, the ability that can provide visualization tool to support, the user can carry out the runtime customization of navigational logic easily by the modification to the rule configuration; Simultaneously, because the navigational logic that directly influence coupling of rule configuration obtains, so the user can well safeguard navigational logic.
Description of drawings
Fig. 1 is existing ASP technology page navigation operation synoptic diagram;
Fig. 2 is existing JSP technology page navigation operation synoptic diagram;
Fig. 3 is an embodiment of the invention page navigation method basic procedure synoptic diagram;
Fig. 4 is the embodiment of the invention one page air navigation aid schematic flow sheet;
Fig. 5 is the embodiment of the invention two page navigation method schematic flow sheets;
Fig. 6 is the embodiment of the invention three page navigation method schematic flow sheets;
Fig. 7 is the embodiment of the invention four page navigation device synoptic diagram;
Fig. 8 is the synoptic diagram of the embodiment of the invention one method by embodiment four device operations;
Fig. 9 is the embodiment of the invention six page navigation device synoptic diagram;
Figure 10 is the synoptic diagram of the embodiment of the invention three methods by embodiment six device operations;
Figure 11 is the embodiment of the invention seven application server synoptic diagram.
Also the present invention is described in further detail in conjunction with the accompanying drawings below by embodiment.
Embodiment
The embodiment of the invention provides a kind of page navigation method, adopts rule match to generate and carry out navigational logic, and basic step comprises as shown in Figure 3:
A1, reception page request;
Page request can be directly from the user, also can be from the result of navigation before;
A2, carry out rule match according to described page request;
In embodiments of the present invention, the navigation rule that the navigational logic of code-type is described by regularization replaces, and the process of carrying out page navigation becomes the process that is configured into the line discipline coupling according to rule;
A3, according to the result of the regular executing rule that matches, transmit page request or navigate to the corresponding server page;
The result of rule promptly needs the navigational logic carried out, and concrete outcome can be divided into two classes, and a class is to navigate to certain page, and then navigation procedure finishes; Another kind of is to transmit page request, then continues to repeat said process and finishes up to navigation.Certainly, in the process of rule match, also may be because the reason of request itself, for example parameter error or user right deficiency etc., cause to mate or mating unsuccessful, these situations can be considered and match the navigational logic of showing the corresponding wrong page, cause navigation to finish equally, and the page that is responded is the specific wrong page.
The embodiment of the invention also provides corresponding page navigation device and application server.Respectively embodiment of the invention method and apparatus is elaborated with concrete example below.
Embodiment one, a kind of page navigation method, flow process comprises as shown in Figure 4:
B1, reception page request;
B2, the described page request of parsing obtain solicited message;
The solicited message that comprises in the page request can comprise the content of the uniform resource address (URL:Universal Resource Locator), required parameter, Cookie, browser environment variable and the request that are requested the page etc.; These information provide condition for follow-up rule match of carrying out;
B3, call regulation engine according to described request information and carry out rule match;
Usually, rule comprises four chief components: title, condition, qualification and result, and namelist is understood the friendly name of rule, can remember this rule by name, is convenient to user's use; The condition of rule is one group of Boolean expression, is used for the service regeulations factor and mates the fact of importing into, carries out regular computing; The qualification of rule has been represented regular weight, information such as grouping; The result of rule is the content that expectation obtains, and can be assignment, and expression formula also can be action.Carrying out rule match generally includes:
1, loading rule bag; Comprised configuration in the rule bag, formed by one group of relevant rule usually rule, the rule bag that is loaded can be acquiescence also can be appointment, rule is not specifically classified in the present embodiment, therefore rule bag that only need load default;
2, create-rule work context; Context (Working Context) is the running environment of rule; Usually, rule needs to apply for internal memory in calculating process, sets up, stores and the destruction temporary variable, all carries out in this running environment; The fact of importing in the rule computing can pass to rules context, and rule is obtained factural information from context in computing; In addition, a rule match also may relate to the computing of a plurality of rules, and context can guarantee shared data in the calculating process of a plurality of rules;
3, according to the content of described request information, the conditional expression by rule mates;
B4, according to the result of the regular executing rule that matches, transmit page request or navigate to the corresponding server page; If the result is for navigating to certain page, then navigation procedure finishes; If the result for transmitting page request, then continues to repeat said process and finishes up to navigation.
Embodiment two, a kind of page navigation method, flow process as shown in Figure 5, the characteristics of present embodiment are rule is classified according to URL, method comprises:
C1, reception page request;
C2, the described page request of parsing obtain solicited message, comprising the URL that is requested the page;
The URL that C3, basis are requested the page mates in the rule bag of address, selects corresponding navigation logic rules bag;
Relevant in the present embodiment rule adopts URL to be divided into different navigational logic rule bags.The corresponding relation of URL and navigational logic rule bag constitutes address rule bag.When carrying out navigation,, carry out the rule match of navigational logic again, thereby reach modular effect earlier according to URL information matches corresponding navigation logic rules bag.
C4, call regulation engine and in selected navigational logic rule bag, carry out rule match according to described request information;
The process of step B3 is similar among the process of rule match and the embodiment one, and the rule bag that is loaded when just carrying out rule match in the present embodiment is the navigational logic rule bag of appointment;
C5, according to the result of the regular executing rule that matches, transmit page request or navigate to the corresponding server page; If the result is for navigating to certain page, then navigation procedure finishes; If the result for transmitting page request, then continues to repeat said process and finishes up to navigation.
Embodiment three, a kind of page navigation method, flow process as shown in Figure 6, the characteristics of present embodiment are the method based on existing " searching the navigation configuration file; call the navigational logic command object ", by the navigational logic in the navigational logic command object is extracted as rule, increase is to the customization capability of navigational logic, and method comprises:
D1, reception page request;
D2, the described page request of parsing obtain solicited message;
D3, according to described request information searching navigation configuration file, select corresponding universal navigation order;
D4, carry out rule match according to described request information by selected universal navigation command calls regulation engine;
In the present embodiment, no longer comprise actual navigational logic in the pairing navigation command of navigation configuration file, therefore be called the universal navigation order; Navigational logic is extracted into rule, generates complete navigational logic by universal navigation command calls regulation engine;
The process of step B3 is similar among the process of rule match and the embodiment one, and the rule bag that is loaded when carrying out rule match in the present embodiment can be selected the rule bag given tacit consent to, promptly rule is not classified; Also can specify and load corresponding rule bag according to the universal navigation order of selecting;
D5, according to the result of the regular executing rule that matches, transmit page request or navigate to the corresponding server page; If the result is for navigating to certain page, then navigation procedure finishes; If the result for transmitting page request, then continues to repeat said process and finishes up to navigation.
The benefit of present embodiment is to directly apply to the existing dynamic page of front controller framework that adopts and provides in the scheme, and does not need to carry out too big change, helps the popularization of embodiment of the invention scheme.
Several page navigation device embodiment that the embodiment of the invention is provided are elaborated below.
Embodiment four, a kind of page navigation device as shown in Figure 7, comprise front controller 101 and regulation engine 102;
Present embodiment page navigation device can adopt the page navigation method among the embodiment one, the operation signal as shown in Figure 8, accept the request of user browser a1 by front controller 101, front controller 101 imports solicited message into regulation engine 102, regulation engine 102 carries out rule match according to rule configuration 1021, the result of the rule that execution matches, the possibility of result is to navigate to corresponding server page a2, also may be the forwarding of request.
Embodiment five, a kind of page navigation device, structure and embodiment four are similar, comprise front controller and regulation engine;
Front controller is used to receive page request; Resolve described page request and obtain solicited message, comprise the uniform resource address that is requested the page in the described request information; Mate in the rule bag of address according to described uniform resource address, select corresponding navigation logic rules bag;
Regulation engine is used for carrying out rule match at the selected navigational logic rule bag of front controller according to described request information; According to the result of the regular executing rule that matches, transmit page request or navigate to the corresponding server page.
Present embodiment page navigation device can adopt the page navigation method among the embodiment two, and the operation signal is similar with Fig. 8, and just front controller is that elder generation determines that through matching addresses calling regulation engine again after the navigational logic rule that loads is wrapped carries out rule match.For better understanding the foregoing description, below provide a concrete operational process, comprising:
C1, user send page request by the application server of browser to page navigation device place, ask certain service;
C2, front controller receive that the user asks, and analysis request obtains information such as URL, required parameter, Cookie and browser environment variable;
C3, front controller building work stream engine execution environment load the URL matched rule and carry out the URL coupling from rule base or buffer memory;
If the c4 matched rule can't find, request finishes, and returns business to browser and can't find the wrong page;
If the c5 matched rule finds, enter in the navigational logic rule match processing procedure, according to the call by result regulation engine loading corresponding navigation logic matched rule bag of URL rule match;
C6, regulation engine carry out the navigational logic rule match, and as finding coupling, request finishes, and return user's service and can't use the wrong page;
C7, as finding matched rule, the executing rule result action, the rules results action will cause navigating to certain page and show, perhaps asks to transmit;
C8, navigate to certain page after, whole Request Processing process finishes;
C9, when rules results when transmitting, reenter step c2.
Below illustrate the coupling of URL rule and navigational logic rule, the field in the quotation marks is represented configurable object in the rule:
Suppose that in the rule configuration URL rule to be set as follows:
One, rule name: " customer information function "
Rule condition: if " URL " of " request " " equals " " customer information "
Rules results: " use and show customer information rule bag " so
Two, rule name: " enumerating client's function "
Rule condition: if " URL " of " request " " equals " " customer list "
Rules results: " use the rule bag that shows the customer information tabulation " so
After front controller is received request, suppose that the URL that parses is " customer information ", when then mating in URL rule bag, " customer information function " this rule will be matched, and the result points to " use and show customer information rule bag ".
It is regular as follows to suppose that rule is provided with in disposing in " showing customer information rule bag ":
One, rule name: " tabulation of big customer's details "
Rule condition: if " type " of " client " " equals " " big customer "
Rules results: " navigation " so (" big customer's information list page ")
Two, rule name: " tabulation of client's details "
Rule condition: if " type " of " client " " equals " " common customer "
Rules results: " navigation " so (" customer information original list ")
Regulation engine loads " showing customer information rule bag " according to the result of front controller URL coupling, suppose that the data presentation user type of importing in the solicited message is " big customer ", then " tabulation of big customer's details " this rule will be matched, regulation engine executing rule result, user will be navigate to " big customer's information list page ".
Embodiment six, a kind of page navigation device as shown in Figure 9, comprise front controller 201, navigation configuration module 202, generic command module 203 and regulation engine 204;
Present embodiment page navigation device can adopt the page navigation method among the embodiment three, the operation signal as shown in figure 10, accept the request of user browser b1 by front controller 201, corresponding universal navigation order is determined in the navigational logic configuration that front controller 201 is searched in the navigation configuration module 202; Call corresponding universal navigation order 2031 in the generic command module 203 then, universal navigation order 2031 is called regulation engine 204 again and is carried out rule match, the result of the rule that execution matches, the possibility of result is to navigate to corresponding server page b2, also may be the forwarding of request.
Embodiment seven, a kind of application server as shown in figure 11, comprise page navigation unit 100 and page display unit 200;
More than page navigation method that the embodiment of the invention provided and device and application server are described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.
Claims (4)
1. page navigation method comprises step:
Receive page request;
Resolve described page request and obtain solicited message, comprise the uniform resource address that is requested the page in the described request information;
Call regulation engine according to described request information and carry out rule match, wherein, the described rule match of carrying out comprises: mate in the rule bag of address according to described uniform resource address, select corresponding navigation logic rules bag; Call regulation engine and in selected navigational logic rule bag, carry out rule match according to described request information;
According to the result of the regular executing rule that matches, the result of described rule comprises the forwarding page request or navigates to the corresponding server page.
2. a page navigation method is characterized in that, comprises step:
Receive page request;
Resolve described page request and obtain solicited message, call regulation engine according to described request information and carry out rule match, wherein, the described rule match of carrying out comprises: according to described request information searching navigation configuration file, select corresponding universal navigation order; Carry out rule match by selected universal navigation command calls regulation engine according to described request information;
According to the result of the regular executing rule that matches, the result of described rule comprises the forwarding page request or navigates to the corresponding server page.
3. a page navigation device is characterized in that, comprising: front controller and regulation engine;
Described front controller is used to receive page request; Resolve described page request and obtain solicited message, comprise the uniform resource address that is requested the page in the described request information; Mate in the rule bag of address according to described uniform resource address, select corresponding navigation logic rules bag;
Described regulation engine is used for carrying out rule match at the selected navigational logic rule bag of described front controller according to described request information; According to the result of the regular executing rule that matches, transmit page request or navigate to the corresponding server page.
4. a page navigation device is characterized in that, comprising: front controller, navigation configuration module, generic command module and regulation engine;
Described front controller is used to receive page request; Resolve described page request and obtain solicited message; According to described request information to described navigation configuration module searches navigation configuration file; From described generic command module, select and the corresponding universal navigation order of described request information according to described navigation configuration file;
Described navigation configuration module is used to provide the navigation configuration file;
Described generic command module is used to provide the universal navigation order; The described regulation engine of universal navigation command calls according to described front controller selection; Carry out the result of the rule that described regulation engine returns, transmit page request or navigate to the corresponding server page;
Described regulation engine is used for carrying out rule match according to calling of described generic command module, and the result of the rule that matches is returned to described generic command module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007100888126A CN101030228B (en) | 2007-03-28 | 2007-03-28 | Page navigation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007100888126A CN101030228B (en) | 2007-03-28 | 2007-03-28 | Page navigation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101030228A CN101030228A (en) | 2007-09-05 |
CN101030228B true CN101030228B (en) | 2010-10-27 |
Family
ID=38715571
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2007100888126A Expired - Fee Related CN101030228B (en) | 2007-03-28 | 2007-03-28 | Page navigation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101030228B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102236682A (en) * | 2010-05-06 | 2011-11-09 | 深圳市金蝶中间件有限公司 | Method and device for maintaining user state information |
CN101894138B (en) * | 2010-06-25 | 2012-11-07 | 优视科技有限公司 | Visual page content subscription processing method and system thereof |
CN103914479B (en) * | 2013-01-06 | 2017-12-01 | 北京金山安全软件有限公司 | Resource request matching method and device |
CN105336222B (en) * | 2015-10-27 | 2017-12-05 | 民航成都信息技术有限公司 | A kind of airport ground intelligence command dispatching system and method |
CN108710630A (en) * | 2018-04-02 | 2018-10-26 | 阿里巴巴集团控股有限公司 | A kind of page navigation method, device and equipment |
CN117290016B (en) * | 2023-11-24 | 2024-01-26 | 本溪钢铁(集团)信息自动化有限责任公司 | Page configuration method and device for view |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6397246B1 (en) * | 1998-11-13 | 2002-05-28 | International Business Machines Corporation | Method and system for processing document requests in a network system |
-
2007
- 2007-03-28 CN CN2007100888126A patent/CN101030228B/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6397246B1 (en) * | 1998-11-13 | 2002-05-28 | International Business Machines Corporation | Method and system for processing document requests in a network system |
Also Published As
Publication number | Publication date |
---|---|
CN101030228A (en) | 2007-09-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101030228B (en) | Page navigation method and device | |
US6182123B1 (en) | Interactive computer network and method of operation | |
CN101436148B (en) | Integrated client end and method for performing interaction of desktop application and network WEB application | |
CN100580672C (en) | Context based navigation assembly and method | |
US20030226110A1 (en) | Method for dynamically generating structured documents | |
US20080140803A1 (en) | Configurable Continuous Web Service Invocation on Pervasive Device | |
CN102185901A (en) | Client message conversion method | |
CN111638923B (en) | Method and device for data routing based on Java annotation | |
CN111026634A (en) | Interface automation test system, method, device and storage medium | |
CN100481002C (en) | Web interface extending method and device | |
CN102087594A (en) | Management method and device for extension point and plugins | |
CN103092602A (en) | Software development kit and terminal apparatus | |
KR20070053127A (en) | Message oriented construction of web service | |
KR100901281B1 (en) | Ubiquitous Web Service Method | |
CN112073511B (en) | System and method for generating application page | |
CN100504877C (en) | Method and device for collecting web page action | |
CN101196812A (en) | Method for script language calling multiple output parameter interface by component software system | |
CN112947900A (en) | Web application development method and device, server and development terminal | |
CN101616501A (en) | A kind of application memory, compiler server, access system and method and client terminal | |
US8214745B2 (en) | Methods, systems and computer program products for assisted browser navigation | |
CN111158661A (en) | System interface docking method, device, medium and electronic equipment | |
US8949779B2 (en) | Service combination support apparatus, service combination support method, and storage medium | |
CN110188842A (en) | Robot calling method and device | |
JP2005301985A (en) | Information processor, object generation method, object conversion method, object generation program, object conversion program, and recording medium | |
CN115576624A (en) | Programming framework optimization method, system, terminal equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20101027 Termination date: 20150328 |
|
EXPY | Termination of patent right or utility model |