CN102012821A - Secondary development adaptation method - Google Patents

Secondary development adaptation method Download PDF

Info

Publication number
CN102012821A
CN102012821A CN2010105810187A CN201010581018A CN102012821A CN 102012821 A CN102012821 A CN 102012821A CN 2010105810187 A CN2010105810187 A CN 2010105810187A CN 201010581018 A CN201010581018 A CN 201010581018A CN 102012821 A CN102012821 A CN 102012821A
Authority
CN
China
Prior art keywords
engine
template
controller
script
development
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.)
Pending
Application number
CN2010105810187A
Other languages
Chinese (zh)
Inventor
朱馗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CENTFOR INFORMATION TECHNOLOGY Co Ltd
Original Assignee
CENTFOR INFORMATION TECHNOLOGY Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by CENTFOR INFORMATION TECHNOLOGY Co Ltd filed Critical CENTFOR INFORMATION TECHNOLOGY Co Ltd
Priority to CN2010105810187A priority Critical patent/CN102012821A/en
Publication of CN102012821A publication Critical patent/CN102012821A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a secondary development adaptation method, which comprises the following steps that: 1, a controller acquires original page data contents; 2, the controller establishes a document parsing interface and puts the interface into a script engine library simultaneously; 3, the controller calls a script engine to extract effective data, and in the process of calling the script engine, the engine automatically loads a corresponding script file for parsing, writing and executing work; and 4, the controller calls a template engine. By using the script engine and the template engine to extract data and generate a page, the adaptation method avoids a chaotic development mode and can greatly improve the development efficiency of secondary development personnel. Because the development of the data extraction and page generation is performed in different files, the development coupling is reduced, and the expansibility and maintainability of the system are improved.

Description

A kind of secondary development adaptation method
Technical field
The present invention relates to a kind of exploitation adaptation method, be specifically related to a kind of secondary development adaptation method.
Background technology
At present at the B/S system transplantation in the process of mobile phone mobile platform, need that secondary development is adaptive to be write on data extract and page layout code among the same XML.So just cause two kinds of different business logics of data extract and page layout to combine closely, cause code confusion in the adaptive process, extendability and maintainability have also fallen at the end simultaneously in the error rate height.
The page generates and need carry out from top to bottom, and this has just lost the maximum characteristics that data are applied in a flexible way.Can not carry out intercommunication with internal system, can't add other external informations.
Prior art has adopted DOM to add the principle that template instruction generates the page, but the technology that adopts data extract and page layout to combine closely can cause confusion, the error rate height, and can not carry out inter access to system.Simultaneously, data extract and page layout element are combined closely, and page layout has been lost dirigibility.DOM adds template instruction, and to generate the mode of the page higher to the cost of being familiar with development language.Data generate and page layout is finished in identical file, have lost extendability and maintainability fully.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of secondary development adaptation method, data are extracted for script engine and template engine and the page generates, and has avoided chaotic development mode, can improve the development efficiency that secondary is opened personnel greatly.
The present invention is by the following technical solutions:
A kind of secondary development adaptation method comprises the steps:
Step 1 gets access to original page data content by controller;
Step 2, controller is created document and is resolved interface, simultaneously interface is put into the script engine storehouse;
Step 3, controller invoke script engine comes extracted valid data, and in the process of invoke script engine, engine loads automatically that the corresponding script file is resolved, compiling, execution work;
Step 4, controller calls template engine, and template engine obtains the template corresponding file by loading the template file storehouse, and template engine generates the new page by template file and corresponding data.
The invention has the beneficial effects as follows:
The present invention uses script engine and template engine is extracted by data and the page generates, and has avoided chaotic development mode, can improve the development efficiency that secondary is opened personnel greatly.
Script and template instruction have adopted Rhino and two frameworks of increasing income commonly used of Freemarker respectively, do not need important study just can develop, and have therefore reduced secondary development personnel's study threshold, have saved the cost of personnel training.
Because data extract is carried out in different files with the exploitation that the page generates, reduced the coupling of exploitation, improved the extendability and the maintainability of system.
Other advantages of the present invention, target and feature will be set forth to a certain extent in the following description, and to a certain extent, based on being conspicuous to those skilled in the art, perhaps can obtain instruction from the practice of the present invention to investigating hereinafter.Target of the present invention and other advantages can realize and obtain by specifically noted structure in following instructions or the accompanying drawing.
Description of drawings
Fig. 1 is a schematic diagram of the present invention.
Embodiment
Below in conjunction with drawings and Examples the present invention is further described:
As shown in Figure 1, the present invention includes script engine, template engine and document and resolve three modules of interface, script engine is to resolve interface by the script language calling document to extract data content.Script has adopted dynamic language storehouse Rhino to carry out script and has resolved.
Template engine has used template instruction Freemarker framework that the Page Template model is resolved.
Document is resolved interface and is converted original content of pages the label of standard to by HTMLParser, and is defined as good data extraction interface.
It can also be seen that by Fig. 1 the inventive method step is as follows:
Step 1 gets access to original page data content by controller;
Step 2, controller is created document and is resolved interface, simultaneously interface is put into the script engine storehouse;
Step 3, controller invoke script engine comes extracted valid data, and in the process of invoke script engine, engine loads automatically that the corresponding script file is resolved, compiling, execution work;
Step 4, controller calls template engine.Template engine obtains the template corresponding file by loading the template file storehouse, and template engine generates the new page by template file and corresponding data.

Claims (1)

1. a double-network communication method is characterized in that: comprise the steps:
Step 1 gets access to original page data content by controller;
Step 2, controller is created document and is resolved interface, simultaneously interface is put into the script engine storehouse;
Step 3, controller invoke script engine comes extracted valid data, and in the process of invoke script engine, engine loads automatically that the corresponding script file is resolved, compiling, execution work;
Step 4, controller calls template engine, and template engine obtains the template corresponding file by loading the template file storehouse, and template engine generates the new page by template file and corresponding data.
CN2010105810187A 2010-12-09 2010-12-09 Secondary development adaptation method Pending CN102012821A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010105810187A CN102012821A (en) 2010-12-09 2010-12-09 Secondary development adaptation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105810187A CN102012821A (en) 2010-12-09 2010-12-09 Secondary development adaptation method

Publications (1)

Publication Number Publication Date
CN102012821A true CN102012821A (en) 2011-04-13

Family

ID=43842997

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105810187A Pending CN102012821A (en) 2010-12-09 2010-12-09 Secondary development adaptation method

Country Status (1)

Country Link
CN (1) CN102012821A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365847A (en) * 2012-03-27 2013-10-23 腾讯科技(深圳)有限公司 Generation method and device for user-defined webpage file
WO2014134934A1 (en) * 2013-03-04 2014-09-12 优视科技有限公司 Method and system for displaying customized webpage on double webview
CN104657138A (en) * 2015-02-10 2015-05-27 上海创景计算机系统有限公司 Script-based report generation system and script-based report generation method
WO2015078231A1 (en) * 2013-11-26 2015-06-04 优视科技有限公司 Method for generating webpage template and server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101178717A (en) * 2007-12-05 2008-05-14 优视动景(北京)技术服务有限公司 Method for adaptation processing web page and web page adaptation device
CN101334728A (en) * 2008-07-28 2008-12-31 北京航空航天大学 Interface creating method and platform based on XML document description
CN101807209A (en) * 2010-04-14 2010-08-18 深圳市同洲电子股份有限公司 Method and system for manufacturing webpage, client and server
CN101815093A (en) * 2010-03-11 2010-08-25 深圳市嘉讯软件有限公司 Method for adapting webpage to mobile terminal and mobile terminal page adaptation device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101178717A (en) * 2007-12-05 2008-05-14 优视动景(北京)技术服务有限公司 Method for adaptation processing web page and web page adaptation device
CN101334728A (en) * 2008-07-28 2008-12-31 北京航空航天大学 Interface creating method and platform based on XML document description
CN101815093A (en) * 2010-03-11 2010-08-25 深圳市嘉讯软件有限公司 Method for adapting webpage to mobile terminal and mobile terminal page adaptation device
CN101807209A (en) * 2010-04-14 2010-08-18 深圳市同洲电子股份有限公司 Method and system for manufacturing webpage, client and server

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365847A (en) * 2012-03-27 2013-10-23 腾讯科技(深圳)有限公司 Generation method and device for user-defined webpage file
WO2014134934A1 (en) * 2013-03-04 2014-09-12 优视科技有限公司 Method and system for displaying customized webpage on double webview
US10754917B2 (en) 2013-03-04 2020-08-25 Alibaba Group Holding Limited Method and system for displaying customized webpage on double webview
WO2015078231A1 (en) * 2013-11-26 2015-06-04 优视科技有限公司 Method for generating webpage template and server
US10747951B2 (en) 2013-11-26 2020-08-18 Uc Mobile Co., Ltd. Webpage template generating method and server
CN104657138A (en) * 2015-02-10 2015-05-27 上海创景计算机系统有限公司 Script-based report generation system and script-based report generation method

Similar Documents

Publication Publication Date Title
CN103970736A (en) Method for converting Excel sheet to database table
CN102163233A (en) Method and system for converting webpage markup language format
CN102207873B (en) Realizing method of JavaScript extended object based on Android platform, and binding interface structure
CN103019726A (en) Management method and device of software system service rules
CA2690081A1 (en) Migration of legacy applications
CN104391826A (en) Data format conversion method and data format converter
CN102012821A (en) Secondary development adaptation method
CN104408150A (en) Data import/ export method and device adapted to a plurality of data formats of databases
CN105975446A (en) Method and system for displaying word document content by modules in mobile phone terminal
CN109445773A (en) A kind of language based on programming promotes the method and electronic equipment of browser performance
CN102915344B (en) SQL (structured query language) statement processing method and device
CN103116503A (en) Implement method and implement device of multiple windows
CN102385527A (en) Device and method for improving execution efficiency of service scripts
CN103309849A (en) Docx document creating and modifying method based on OpenXML (open extensive markup language)
CN103246503A (en) Application development framework for enterprise management software
CN103645895B (en) Method of automatic configuration and cloud compiling system
CN109116828A (en) Model code configuration method and device in a kind of controller
CN107547944A (en) Interface realizing method and device, set top box
CN105574164B (en) The data analysis method and device of Excel document
CN101295245B (en) Intelligent extracting method based on model information
CN102722367A (en) Method for data processing, processor and terminal
CN108170659A (en) A kind of external finance software data integration method
CN111399900B (en) API document automatic generation method and system based on python and regular expression
CN102724591A (en) Set top box page displaying method and set top box device
CN102129386A (en) Mobile widget and method for realizing terminal transplantation for same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20110413