CN106528104A - Method for portal layout rendering - Google Patents
Method for portal layout rendering Download PDFInfo
- Publication number
- CN106528104A CN106528104A CN201610928586.7A CN201610928586A CN106528104A CN 106528104 A CN106528104 A CN 106528104A CN 201610928586 A CN201610928586 A CN 201610928586A CN 106528104 A CN106528104 A CN 106528104A
- Authority
- CN
- China
- Prior art keywords
- pipeurl
- channel
- chanel
- handler
- information
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method for portal layout rendering. The method mainly comprises the steps that a client module establishes a channel for each pipeURL in layout at first, and raises a request to a service side; a server module on the service side will set a job for each pipeURL; forward of the pipeURL is conducted according to job information; after processing, the pipeURL is returned to the client module on the client side in a form of PostMessage; the client module re-calls a handler; and the channels will be closed when the jobs of all the channels are finished, so that page rendering can be completed. In this way, the defects in the prior art that certain idle wait time is generated between a browser and the service side due to working modes, and implementation of code transformation of an existing old system is difficult can be solved.
Description
Technical field
A kind of the present invention relates to door layout Rendering field, in particular it relates to door layout rendering intent.
Background technology
In enterprise, typically there are many application systems for which and management and IT services are provided, with growth and the letter of enterprise
The development of the technology of breath, has more systems and adds.A system can typically be provided using these system houses for the convenience of the user
One portal service gate system, user can operate the data of each operation system such as in door layout:Document, message,
Examination & approval task dispatching, door layout render performance directly affect user manipulation impression, especially substantial amounts of css files and
Js files need loading, traditional page stress model to be difficult to meet the demand of user satisfaction, and direct result is exactly that the page adds
Load slows, and under mass data, layout block region performs page response speed when complicated business is inquired about and further can decline.
In order to solve the performance issue that enterprise-level layout is rendered, improved mode, this side are combined using front and back end typically
Formula front end is substantially carried out:Resource file compression (carrying out G-zip to css and js files), css and js merge, front end caching
(LocalStorage), rear end is improved:Optimization service code, increase rear end caching etc..Although these modes can be to layout
Render performance to have been lifted, but its mode of operation also makes browser and service end have the necessarily idle waiting time, and to haveing been friends in the past
The code transformation of system implements relatively difficult.
The defect of this pattern:
1. the operation in flow process has strict order:If an operation above is not carried out terminating, operation below is just
Can not perform, that is, be to overlap between operating.
2. the bottleneck of performance is caused:When server generates the content of a page, browser is idle, is shown in blank
Hold;And when browser loading renders content of pages, server is idle, and thus the time is produced with the waste of performance again.
CN200710002299.4 solves relevant portal view and is presented not enough, the undesirable problem of response time.But make
The complicated realization mechanism such as portal server, response time remediation processor is coupled to response time monitor, it is unsuitable real
Apply and O&M cost is high.
CN200510081392.X caches dynamic portal page by a kind of senior cache component and reduces door
The family page access time, but using page rendering be still traditional handling process, it is inefficient.
The content of the invention
It is an object of the present invention to be directed to the problems referred to above, a kind of door layout rendering intent is proposed, can not only with realization
The code of original application system is not destroyed and changed, is quickly and easily implemented, the satisfaction of the user operation page can also be obviously improved
The advantage of degree.
For achieving the above object, the technical solution used in the present invention is:A kind of door layout rendering intent, mainly includes:
Step 1:Initialization, states Channel, including the title of statement Channel, the URL of BigpipeServlet and whether
It is cross-domain;
Step 2:A Handler is registered for pipeURL;
Step 3:Channel is opened, it is hidden including start to create for each Chanel in a form and iFrame.form one
Domain jobs is hidden, pipeURL addresses are switched to after json, arranged on jobs, and POST is to server end address;
Step 4:The Job lists of request are received in server end BigpipeServlet, pipeURL is carried out according to Job information
Forward, the onBlockReady of parent page is passed data to after the completion of process with PostMessage forms,
OnBlockReady searches Handler and is adjusted back;
Step 5:Check Channel all of Job whether be over, at the end of labelling Chanel have been switched off, destroy this
Form and iFrame that individual Chanel has been created.
Further, the step 1 also includes statement pipeURL.
Further, the forward of pipeURL is carried out in step 4 according to Job information, the Job information includes whether different
The eTag information of step information, precedence information and caching.
Further, if Job information carries eTag information, the rear end of pipeURL will receive If-None-Match, if
PipeURL returns the solicited status in step 4, then browser end is adjusted back using the caching in LocalStorage
Handler。
Further, if in step 1, first sending to home server during Chanel cross-domain requests and asking, home server
One token is encrypted according to key, timestamp and user name, a form is exported, is then submitted this form to Chanel to
On;BigpipeServlet on Chanel verifies this token, and verification calls the context of registration to process after passing through
Invocation RestoreHandler generate context;Front end is processed using PostMessage modes;
The home server includes a cross-domain Chanel list, the just generation Form only in this list.
Further, step 3 also includes the process to unexpected flow process in before, if when registration Handler
Channel has been switched off, if pipeURL is it is stated that mistake, if obtaining data from Channel and passing to Handler
The URL was not stated, re-creates a channel to process;
If Channel has been switched on when registration Handler, if no declare crosses this before Channel is opened
PipeURL, channel re-create a channel to process after terminating.
A kind of door layout rendering intent of various embodiments of the present invention, due to mainly including:Client components are cloth first
Each pipeURL in office sets up channel passages, initiates to ask to service end, can be each in service end server component
Individual pipeURL sets a job (comprising information such as priority, etag), carries out the forward of pipeURL according to job information,
With PostMessage forms to client component after the completion of process, client components are responsible for adjusting back handler, work as institute
Channel is closed at the end of having the job of channel and completes page rendering;Such that it is able to overcome mode of operation in prior art
Make browser and service end have the necessarily idle waiting time, and relatively difficult lacking is implemented in the code transformation to system of haveing been friends in the past
Fall into.
Other features and advantages of the present invention will be illustrated in the following description, also, partly be become from description
Obtain it is clear that or being understood by implementing the present invention.
Below by drawings and Examples, technical scheme is described in further detail.
Description of the drawings
Accompanying drawing is used for providing a further understanding of the present invention, and constitutes a part for description, the reality with the present invention
Applying example is used for explaining the present invention together, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the door layout rendering intent schematic diagram described in the embodiment of the present invention;
Fig. 2 is the door layout rendering intent flow chart described in the embodiment of the present invention;
Fig. 3 is the cross-domain handling principle figure described in the door layout rendering intent described in the embodiment of the present invention.
Specific embodiment
The preferred embodiments of the present invention are illustrated below in conjunction with accompanying drawing, it will be appreciated that preferred reality described herein
Apply example and be merely to illustrate and explain the present invention, be not intended to limit the present invention.
Specifically, a kind of door layout rendering intent, mainly includes:
Step 1:Initialization, states Channel, including the title of statement Channel, the URL of BigpipeServlet and whether
It is cross-domain;
Step 2:A Handler is registered for pipeURL;
Step 3:Channel is opened, it is hidden including start to create for each Chanel in a form and iFrame.form one
Domain jobs is hidden, pipeURL addresses are switched to after json, arranged on jobs, and POST is to server end address;
Step 4:The Job lists of request are received in server end BigpipeServlet, pipeURL is carried out according to Job information
Forward, the onBlockReady of parent page is passed data to after the completion of process with PostMessage forms,
OnBlockReady searches Handler and is adjusted back;
Step 5:Check Channel all of Job whether be over, at the end of labelling Chanel have been switched off, destroy this
Form and iFrame that individual Chanel has been created.
The step 1 also includes statement pipeURL.
Carry out the forward of pipeURL in step 4 according to Job information, the Job information includes whether asynchronous information, excellent
The eTag information of first level information and caching.
If Job information carries eTag information, the rear end of pipeURL will receive If-None-Match, if pipeURL is returned
The solicited status returned in step 4, then browser end adjust back Handler by using the caching in LocalStorage.
If in step 1, first sending to home server during Chanel cross-domain requests and asking, home server according to key,
Timestamp and user name encrypt a token, export a form, then submit on this form to Chanel;Chanel
On BigpipeServlet verify this token, verification calls the context of registration to process Invocation after passing through
RestoreHandler generates context;Front end is processed using PostMessage modes;
The home server includes a cross-domain Chanel list, the just generation Form only in this list.
Also include the process to unexpected flow process in before step 3, if Channel has been closed when registration Handler
Close, if pipeURL is it is stated that mistake, if obtain data from Channel and pass to Handler not stating this
URL, re-creates a channel to process;
If Channel has been switched on when registration Handler, if no declare crosses this before Channel is opened
PipeURL, channel re-create a channel to process after terminating.
Form and concept
1st, form
Bigpipe-server components are supplied to third party in the form of jar
Bigpipe-client components provide the browser client of bp.js.
2nd, concept
Passage(Channel)Channel is defined and is currently belonged to which channel (is corresponded approximately in application server
Context). such as/hr ,/portal or http://www.nccloud.com/ipu is because server end will be done
Forward. so configuring the server ends of bigpipe in needing each context
URL(pipeURL)PipeURL is the special network address of offer data, relative to common URL,
PipeURL has following difference:
1)GET modes are supported only
2)If URL must be started with channel. URL can not be matched with any one channel beginning, will be ignored, such as
Fruit has multiple matchings, takes the matching of maximum
3)Returning result must be that a JSON. is encoded to UTF-8. and only supports Etag/If-None-Match heads. other cachings
Head will be ignored.
4)If necessary to Asynchronous Request, need to add a parameter _ bp_async_=1 behind URL, such as
5)If necessary to the priority that adjustment is performed, need after URL, add a parameter _ bp_order_=0. parameter value higher
Priority is higher
Processor(Handler)Handler is the method for the processing data of client registers. adjusted back by bigpipe. only one of which
Parameter:data
Task(Job)Server end can set a Job for each pipeURL. pipeURL execution is contained in this Job
Priority, it is whether synchronous to perform. the eTag information of caching. BigpipeServlet according to these information processings each
pipeURL。
With reference to Fig. 1, in WEB exploitations, the chunked codings that HTTP/1.1 is supported can receive service by browser
After the chunked blocks that device sends, the block code is parsed immediately.Because chunked codings send source body in bulk, have per block
The size indicator of oneself, afterwards can an and then optional afterbody comprising entity header field at all of piece.This coding
Fill transmitting terminal dynamic perhaps and generate content, and can carry receiving terminal can be allowed to judge whether message receives complete useful information
The present invention improves rendering for layout by the way of " bigpipe-client "+" bigpipe-server " components are combined
Efficiency.Client components set up channel passages for each pipeURL in layout first, initiate to ask to service end, in clothes
Business end server components can set a job (comprising information such as priority, etag) for each pipeURL, according to job information
The forward of pipeURL is carried out, with PostMessage forms to client component, client components after the completion of process
It is responsible for readjustment handler, closes channel at the end of the job of all channel and complete page rendering.
With reference to Fig. 2, main process is as follows:
The handling process of this programme is presented herein below.
1. initialize:Statement Channel, including the title of Channel, the URL of BigpipeServlet, if cross-domain
2. initialization-statement in advance:Declare once pipeURL (this is to be not required .)
3. a Handler is registered for pipeURL
4. Channel is opened:Start to create a Hidden field jobs in a form and iFrame.form for each Chanel,
PipeURL addresses are turned after json, is arranged to .POST on jobs to server end address.
5. receive the Job lists of request in server end BigpipeServlet, according to Job information (it is whether asynchronous, it is excellent
First level) forward of pipeURL is carried out, data is delivered to by parent page with PostMessage forms after the completion of process
OnBlockReady methods, onBlockReady are searched Handler and are adjusted back.
Check Channel all of Job whether be over, at the end of labelling Chanel have been switched off. destroy this
Form and iFrame that Chanel has been created.
Caching, the process of cross-domain, unexpected flow process are the key steps of this programme, in terms of these three are described in detail below.
Caching
If stating eTag in the delivery of pipeURL, then this request will be stored in by onBlockReady methods
In localStorage. eTag information will be carried when bigPipe is processed in Job information, the rear end of pipeURL will
If-None-Match is received, if pipeURL returns 304 solicited status, then browser end will be used
Caching in LocalStorage is adjusting back Handler.
Some problems of caching:
1)Support and only support that the eTag. others cache instructions in http agreements ignore (with not caching process)
2)If outputing eTag, key will be done with user-pipeURL-etag in client, output content will be stored in
In localStorage. so different users is isolated, but potential risks be these information Stores in browser end,
So sensitive information should not be set to caching.
With reference to Fig. 3, when processing cross-domain. need to transmit a token information, transmit process to other side's server end
It is as follows:
First send to home server during 1.Chanel cross-domain requests and ask, home server is according to key, timestamp, user
Name encrypts a token. and exports a form. and then submit on this form to Chanel.
2. host includes a cross-domain Chanel list. the just generation Form only in this list
BigpipeServlet on 3.Chanel verifies this token, and verification calls the context of registration to process after passing through
InvocationRestoreHandler generates context.
4. PostMessage modes are used when front-end processing..
The process of unexpected flow process:
1st, when registering Handler, Channel has been switched off
If if pipeURL declare mistakes. obtaining data from Channel and passing to Handler does not have
Declare crosses the URL, re-creates a channel to process
2nd, when registering Handler, Channel has been switched on
If Channel open before no declare cross the pipeURL, etc. channel terminate to re-create one
Channel (connection number is limited) processing
Following beneficial effect can at least be reached:This scheme can not only be destroyed and change the generation of original application system
Code, quickly and easily implements, can also be obviously improved user operation page satisfaction.
Finally it should be noted that:The preferred embodiments of the present invention are the foregoing is only, the present invention is not limited to,
Although being described in detail to the present invention with reference to the foregoing embodiments, for a person skilled in the art, which still may be used
To modify to the technical scheme described in foregoing embodiments, or equivalent is carried out to which part technical characteristic.
All any modification, equivalent substitution and improvements within the spirit and principles in the present invention, made etc., should be included in the present invention's
Within protection domain.
Claims (6)
1. a kind of door layout rendering intent, it is characterised in that comprise the following steps:
Step 1:Initialization, states Channel, including the title of statement Channel, the URL of BigpipeServlet and whether
It is cross-domain;
Step 2:A Handler is registered for pipeURL;
Step 3:Channel is opened, it is hidden including start to create for each Chanel in a form and iFrame.form one
Domain jobs is hidden, pipeURL addresses are switched to after json, arranged on jobs, and POST is to server end address;
Step 4:The Job lists of request are received in server end BigpipeServlet, pipeURL is carried out according to Job information
Forward, the onBlockReady of parent page is passed data to after the completion of process with PostMessage forms,
OnBlockReady searches Handler and is adjusted back;
Step 5:Check Channel all of Job whether be over, at the end of labelling Chanel have been switched off, destroy this
Form and iFrame that individual Chanel has been created.
2. door layout rendering intent according to claim 1, it is characterised in that the step 1 also includes statement
pipeURL。
3. door layout rendering intent according to claim 2, it is characterised in that carried out according to Job information in step 4
The forward of pipeURL, the Job information include whether the eTag information of asynchronous information, precedence information and caching.
4. the door layout rendering intent according to right 3, it is characterised in that if Job information carries eTag information,
The rear end of pipeURL will receive If-None-Match, if pipeURL carries out forward, browser end will be used
Caching in LocalStorage is adjusting back Handler.
5. door layout rendering intent according to claim 4, it is characterised in that if in step 1, Chanel cross-domain requests
Shi Xianxiang home servers send request, and home server encrypts a token according to key, timestamp and user name, defeated
Go out a form, then submit on this form to Chanel;BigpipeServlet on Chanel verifies this token,
Verification is called the context of registration to process Invocation RestoreHandler and generates context after passing through;Front end adopts
PostMessage modes are processed;
The home server includes a cross-domain Chanel list, the just generation Form only in this list.
6. door layout rendering intent according to claim 2, it is characterised in that also include to accident in before step 3
The process of flow process, if Channel has been switched off when registration Handler, if pipeURL is it is stated that mistake, from Channel
If middle acquisition data and passing to Handler and not stating the URL, re-create a channel to process;
If Channel has been switched on when registration Handler, if no declare crosses this before Channel is opened
PipeURL, channel re-create a channel to process after terminating.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610928586.7A CN106528104B (en) | 2016-10-31 | 2016-10-31 | A kind of portal layout rendering method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610928586.7A CN106528104B (en) | 2016-10-31 | 2016-10-31 | A kind of portal layout rendering method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106528104A true CN106528104A (en) | 2017-03-22 |
CN106528104B CN106528104B (en) | 2019-08-16 |
Family
ID=58291682
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610928586.7A Active CN106528104B (en) | 2016-10-31 | 2016-10-31 | A kind of portal layout rendering method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106528104B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1643510A (en) * | 2002-03-28 | 2005-07-20 | 国际商业机器公司 | System and method for hierarchical layout specialization |
CN104573069A (en) * | 2015-01-26 | 2015-04-29 | 四川中电启明星信息技术有限公司 | Enterprise portal front-end rendering engine |
CN104572659A (en) * | 2013-10-14 | 2015-04-29 | 中兴通讯股份有限公司 | Method, device and terminal achieving webpage layout |
CN106020794A (en) * | 2016-05-10 | 2016-10-12 | 浪潮软件股份有限公司 | Layout method of complex page portal page |
-
2016
- 2016-10-31 CN CN201610928586.7A patent/CN106528104B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1643510A (en) * | 2002-03-28 | 2005-07-20 | 国际商业机器公司 | System and method for hierarchical layout specialization |
CN104572659A (en) * | 2013-10-14 | 2015-04-29 | 中兴通讯股份有限公司 | Method, device and terminal achieving webpage layout |
CN104573069A (en) * | 2015-01-26 | 2015-04-29 | 四川中电启明星信息技术有限公司 | Enterprise portal front-end rendering engine |
CN106020794A (en) * | 2016-05-10 | 2016-10-12 | 浪潮软件股份有限公司 | Layout method of complex page portal page |
Also Published As
Publication number | Publication date |
---|---|
CN106528104B (en) | 2019-08-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021004054A1 (en) | Certificate application method and apparatus, terminal device, gateway device and server | |
CN105100232B (en) | A kind of method of the serve end program smooth upgrade of continual service | |
US10554607B2 (en) | Heterogeneous cloud controller | |
CN104137520B (en) | A kind of information push method and device | |
FI105249B (en) | Procedure and arrangements for connecting information to network resources | |
US8302169B1 (en) | Privacy enhancements for server-side cookies | |
US8533453B2 (en) | Method and system for configuring a server and dynamically loading SSL information | |
CN110083783A (en) | A kind of method, apparatus, storage medium and computer equipment for sharing link | |
CN107463453B (en) | Method, device, equipment and storage medium for communication between different applications of same terminal | |
WO2015143855A1 (en) | Method, apparatus and system for accessing data resources | |
JP2004529410A (en) | Service gateway for interactive TV | |
JP2005505051A (en) | Distributed program execution method based on file type relationship in client-server network | |
WO2006043495A1 (en) | E-mail transmission system | |
CN110796466B (en) | Internet advertisement putting method and device | |
US9876776B2 (en) | Methods for generating and publishing a web site based on selected items and devices thereof | |
CN112583834B (en) | Method and device for single sign-on through gateway | |
CN105282095A (en) | Login verification method and device of virtual desktop | |
CN104158856B (en) | Local API calling method dispense with preset of secure session | |
CN106603388B (en) | Mail sending, viewing and viewing control method and equipment thereof | |
CN100465950C (en) | Web browser command button for client support | |
CN108989427A (en) | A kind of public service system and its construction method based on multi-source information polymerization | |
TWI294087B (en) | Systems and methods for file transfer management | |
US11095460B2 (en) | Certificate application operations | |
CN107770203A (en) | A kind of service request retransmission method, apparatus and system | |
CN106528104A (en) | Method for portal layout rendering |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |