CN102033754A - Method for building middleware multi-resolution version codes by configuration files - Google Patents

Method for building middleware multi-resolution version codes by configuration files Download PDF

Info

Publication number
CN102033754A
CN102033754A CN2010106200253A CN201010620025A CN102033754A CN 102033754 A CN102033754 A CN 102033754A CN 2010106200253 A CN2010106200253 A CN 2010106200253A CN 201010620025 A CN201010620025 A CN 201010620025A CN 102033754 A CN102033754 A CN 102033754A
Authority
CN
China
Prior art keywords
resolution
code
middleware
variable
relevant
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
CN2010106200253A
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.)
SHANGHAI WONDERTEK SOFTWARE CO Ltd
Original Assignee
SHANGHAI WONDERTEK SOFTWARE 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 SHANGHAI WONDERTEK SOFTWARE CO Ltd filed Critical SHANGHAI WONDERTEK SOFTWARE CO Ltd
Priority to CN2010106200253A priority Critical patent/CN102033754A/en
Publication of CN102033754A publication Critical patent/CN102033754A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a method for building middleware multi-resolution version codes by configuration files, which comprises the steps of: replacing the values of all parameters related to resolutions in original application codes with variables to generate a master codes; setting layout configuration files corresponding to different resolutions, and respectively recording corresponding values of parameters related to a corresponding resolution under the resolution; and replacing corresponding variables in the master codes according to corresponding values of all parameters which are recorded in the layout configuration file corresponding to a certain resolution and related to the resolution, and generating a new application code which can run in the resolution. The method can reduce the amount of codes in development process and lower the adaptation working threshold, the division of labor can be more reasonable, the project is easy to maintain, and the labor cost can be saved at the same time.

Description

Make up the method for middleware multiresolution edition code by configuration file
Technical field
The invention belongs to middleware utilization development technique field, relate to a kind of method that makes up code, specifically is a kind of method that makes up middleware multiresolution edition code by configuration file.
Background technology
Current hand-held mobile terminal is of a great variety, also has numerous resolution based on the equipment of same system platform, as 176x208,176x220,240x320,240x400,320x240,320x320,320x480,480x640,480x800 etc.The scheme of generally taking is that same each resolution of application identical platform is all safeguarded a code separately, then need safeguard 10 parts of codes if any 10 resolution, upgrades synchronously, revises, deletes and safeguard.
Similarly, the middleware scheme is also like this.Middleware engine is identical under the same system platform, and the business that operates in the same application on the engine is also identical, for move out of desirable effect under each resolution, needs to adjust the control coordinate that relates to UI (User Interface, user interface) in using.As shown in Figure 1, the development phase, all programmers participate in simultaneously, develop the application of each resolution version, and carry out adaptive; Bug (leak) repairing phase need be revised synchronously to the code of each resolution version when the bug on service logic of appearance; In the new demand stage, when the user proposes new business demand, need carry out business to the code of each resolution version and add; In the product maintenance stage, need the code of each resolution version is safeguarded.No matter whether all developers skillfully touch all codes, participate in each stage of project, this has brought very big human risks into for project.Suppose to have n resolution, then exploitation, adaptive, safeguard and all to need n part code is changed, thereby produce the workload of n part, the version of a resolution of every increase simultaneously just increases a workload.When the application code amount is huge, safeguard so many parts of codes again simultaneously, careless omission can appear unavoidably.Whole process must be careful, any one little change all must be accomplished synchronous renewal, modification, the deletion of each version, otherwise the inconsistent situation of the professional appearance of each version may occur, the overall acceptability that has influence on application product is checked and accepted, and finally causes the failure of project.
Summary of the invention
The objective of the invention is at the deficiencies in the prior art, a kind of method by configuration file structure middleware multiresolution edition code is provided, reduce the size of code in the performance history, reduce adaptive work threshold, make the division of labor more reasonable, project is easy to safeguard, saves human cost simultaneously.
For achieving the above object, the invention provides a kind of method by configuration file structure middleware multiresolution edition code, it comprises:
The numerical value of each relevant with resolution in original application code parameter is replaced with variable respectively, generated a mother matrix code;
Setting is write down the corresponding numerical value of each parameter relevant with resolution under the corresponding resolution respectively corresponding to the layout configurations file of different resolution;
According to the corresponding numerical value of each parameter relevant that writes down in the pairing layout configurations file of a certain resolution with resolution, replace variables corresponding in the mother matrix code, generate the new application code that can move under this resolution.
Further, before the described step that the numerical value of each parameter relevant with resolution is replaced with variable respectively in the original application code, also comprise: formulate variable Substitution Rules, making variable replace the mother matrix code that the back generates can not directly move.
Further, described variable Substitution Rules are for to be replaced the numerical value of each relevant with resolution in original application code parameter with the form of variable { $var$}, and wherein, var is the unique identification of each parameter relevant with resolution in the original application code.
Further, the described layout configurations file file that is the XML form.
Further, described each parameter relevant with resolution comprises the control coordinate relevant with resolution, and/or the list items relevant with resolution.
Further, the step of variables corresponding in the described replacement mother matrix code is carried out by a variable replacement instrument.What described variable was replaced instrument is input as layout configurations file, mother matrix code, is output as the new application code that can move.
Adopt the method that makes up middleware multiresolution edition code by configuration file of the present invention, same application different resolution (240x320,240x400,320x240,480x800 etc.) version can be shared a model (being the original application code), only replacing by variable can be new application code under the different resolution with the original application code conversion, therefore no matter be renewal to code, revise, deletion is still safeguarded, all only need carry out at the original application code, finally reach the purpose of safeguarding a service code, and business development and adaptive work have been separated, allowing a small amount of senior programmer be absorbed in than complicated service develops, allow most junior programmers carry out the adaptive work of better simply UI, optimized the division of labor, reduced project risk, improve work efficiency, also saved the project cost of development simultaneously.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the model synoptic diagram that prior art makes up the method for middleware multiresolution edition code.
Fig. 2 be the embodiment of the invention provide pass through the schematic flow sheet that configuration file makes up the method for middleware multiresolution edition code.
Fig. 3 be the embodiment of the invention provide pass through the model synoptic diagram that configuration file makes up the method for middleware multiresolution edition code.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, the present invention is described in more detail with reference to the accompanying drawings.
The invention provides a kind of method by configuration file structure middleware multiresolution edition code, as shown in Figure 2, concrete steps comprise:
Step S1, the numerical value of each relevant with resolution in original application code parameter is replaced with variable respectively, generated a mother matrix code;
Before above-mentioned steps S1, can further include: formulate variable Substitution Rules, the mother matrix code that makes variable replace the back generation can not directly move.
The parameter relevant with resolution can be the control coordinate relevant with resolution, or the list items relevant with resolution, or control coordinate relevant with resolution and the list items relevant with resolution.
Step S2, the layout configurations file corresponding to different resolution is set, writes down the numerical value of each parameter relevant under the corresponding resolution respectively with resolution;
Described layout configurations file is the file of XML form, is used for some control coordinate figures relevant with resolution that recording step S1 replaced and/or some and the relevant key-value pair of list items numerical value under current resolution of resolution.
Step S3, according to the numerical value of each parameter relevant that writes down in the pairing layout configurations file of a certain resolution with resolution, replace variables corresponding in the mother matrix code, generate the new application code that can move under this resolution.
Replace variables corresponding in the mother matrix code, carry out by a variable replacement instrument.Described variable replacement instrument is output as the instrument of the new application code that can move for being layout configurations file and mother matrix code based on the input parameter.
Explain embodiment below in conjunction with Fig. 3.
At first, determine a kind of variable Substitution Rules, adopt the form of { $var$} such as, variable, wherein, var is the unique identification of each parameter relevant with resolution in the original application code, promptly needs certain the control coordinate that is replaced, the unique identification of list items.Variable format with { $var$} extracts control coordinate figure relevant with resolution in the original application code and list items numerical value, the application code that only comprises variable is called the mother matrix code, because variable has adopted the form of { $var$}, therefore this mother matrix code can not directly move, thereby can avoid maloperation.
Further, each resolution is used for writing down the key-value pair of list items numerical value under current resolution that previous step some control coordinate figures relevant with resolution and some and resolution are correlated with to the file of an XML form should be arranged.As the layout configurations file, is 240x320.xml as the layout configurations file of 240x320 resolution with this XML formatted file, and the layout configurations file of 240x400 resolution is 240x400.xml, by that analogy.
Further, can develop a general variable and replace instrument,, variables corresponding in the mother matrix code be replaced with numerical value, finally generate the new application code that can move under this resolution according to the variable key-value pair in the layout configurations file of certain resolution.
As shown in Figure 3, different with traditional scheme, the developer is divided into two groups of business development and adaptive exploitations in the method for the present invention.The function that the business development personnel are responsible for using is developed a cover original application code, and is generated the mother matrix code; Adaptive personnel are responsible for adaptive work, mix the layout configurations file according to resolution, replace instrument by the mode of mother matrix code and layout configurations combination of files with Replace Tool at last, generate new application code corresponding resolution, that comprise concrete coordinate and numerical value, that finally can move.Among app1...app n among Fig. 3 and Fig. 1 is corresponding, app1...app n among Fig. 1 is the code of directly safeguarding in all developer's entire product life cycles, and the app1...app n among Fig. 3 be by with a mother matrix code in conjunction with the layout configurations file of different resolution by the code that is used to move that the replacement instrument generates, do not need the developer directly to safeguard.
Can roughly find out the overall flow of this method from Fig. 3, the place of Fig. 1 increase is the making of layout configurations file and the step that variable is replaced relatively, but can simplify follow-up code update process greatly by increasing these two steps.At first the developer is according to customer demand, at a certain specified resolution (as 240x320), exploitation has the original application code of complete function, and the numerical value (as coordinate figure) of each parameter that will be relevant with resolution after finishing extracts with variable and replaces, just generated a mother matrix code like this.Adaptive then personnel adjust numerical value (as coordinate figure) according to different resolution, form the layout configurations file of corresponding each resolution.Again according to mother matrix code and the pairing layout configurations file of each resolution, generate the new application code of the moved version of corresponding each resolution at last, thereby realize the structure of multiresolution edition code by the replacement instrument.
In sum, the invention provides a kind of method by configuration file structure middleware multiresolution edition code, the developer does not need directly to safeguard the code of each version, but and as long as generate operation code by the replacement instrument.This replacement instrument is an input value with the layout configurations file of mother matrix code and certain resolution correspondence, exports the moved version of this resolution correspondence by the mode of variable replacement.When certain resolution version of needs, add the mode of this resolution layout configurations file by the mother matrix code, can generate with variable replacement instrument.
Method by structure middleware multiresolution edition code of the present invention has reduced adaptive work threshold, makes adaptive personnel not need to understand in the adaptive work that concrete service logic just can participate in different resolution.Make the business development programmer concentrate on service logic simultaneously, and need not require efforts in the adaptive work of the bigger numerous resolution of workload.Personnel divide the work clearly, later maintenance is simple, have reduced project risk and input.
More than a kind of method that makes up middleware multiresolution edition code by configuration file provided by the present invention is described in detail, herein principle of the present invention and embodiment are elaborated.More than explanation only is used for helping to understand the solution of the present invention, for one of ordinary skill in the art, according to thought of the present invention, all can change to some extent in specific embodiments and applications, so this description should not be construed as limitation of the present invention.

Claims (7)

1. the method by configuration file structure middleware multiresolution edition code is characterized in that, comprising:
The numerical value of each relevant with resolution in original application code parameter is replaced with variable respectively, generated a mother matrix code;
Setting is write down the corresponding numerical value of each parameter relevant with resolution under the corresponding resolution respectively corresponding to the layout configurations file of different resolution;
According to the corresponding numerical value of each parameter relevant that writes down in the pairing layout configurations file of a certain resolution with resolution, replace variables corresponding in the mother matrix code, generate the new application code that can move under this resolution.
2. according to claim 1ly make up the method for middleware multiresolution edition code, it is characterized in that by configuration file, described in the original application code numerical value of each parameter relevant with resolution also comprise respectively before the step with the variable replacement:
Formulate variable Substitution Rules, the mother matrix code that makes variable replace the back generation can not directly move.
3. the method that makes up middleware multiresolution edition code by configuration file according to claim 2, it is characterized in that, described variable Substitution Rules are for to be replaced the numerical value of each relevant with resolution in original application code parameter with the form of variable { $var$}, wherein, var is the unique identification of each parameter relevant with resolution in the original application code.
4. the method by configuration file structure middleware multiresolution edition code according to claim 1 is characterized in that described layout configurations file is the file of XML form.
5. the method by configuration file structure middleware multiresolution edition code according to claim 1 is characterized in that described each parameter relevant with resolution comprises control coordinate relevant with resolution and/or the list items relevant with resolution.
6. the method by configuration file structure middleware multiresolution edition code according to claim 1 is characterized in that the step of variables corresponding in the described replacement mother matrix code is carried out by a variable replacement instrument.
7. according to claim 6ly make up the method for middleware multiresolution edition code by configuration file, it is characterized in that, what described variable was replaced instrument is input as layout configurations file and mother matrix code, is output as the new application code that can move.
CN2010106200253A 2010-12-29 2010-12-29 Method for building middleware multi-resolution version codes by configuration files Pending CN102033754A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010106200253A CN102033754A (en) 2010-12-29 2010-12-29 Method for building middleware multi-resolution version codes by configuration files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010106200253A CN102033754A (en) 2010-12-29 2010-12-29 Method for building middleware multi-resolution version codes by configuration files

Publications (1)

Publication Number Publication Date
CN102033754A true CN102033754A (en) 2011-04-27

Family

ID=43886690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010106200253A Pending CN102033754A (en) 2010-12-29 2010-12-29 Method for building middleware multi-resolution version codes by configuration files

Country Status (1)

Country Link
CN (1) CN102033754A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412742A (en) * 2013-07-01 2013-11-27 深圳Tcl新技术有限公司 Method and device for application program to be configured with UI

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030140333A1 (en) * 2001-12-20 2003-07-24 Hitachi, Ltd. Integration of computer system components
CN101238427A (en) * 2005-08-02 2008-08-06 索尼株式会社 System and method for dynamic resizing of web-based GUIS
CN101393529A (en) * 2008-11-07 2009-03-25 用友软件股份有限公司 Method for implementing multi language support for computer software
CN201489516U (en) * 2009-09-01 2010-05-26 卡斯柯信号有限公司 Multi-lingual support processing system based on resource identifiers

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030140333A1 (en) * 2001-12-20 2003-07-24 Hitachi, Ltd. Integration of computer system components
CN101238427A (en) * 2005-08-02 2008-08-06 索尼株式会社 System and method for dynamic resizing of web-based GUIS
CN101393529A (en) * 2008-11-07 2009-03-25 用友软件股份有限公司 Method for implementing multi language support for computer software
CN201489516U (en) * 2009-09-01 2010-05-26 卡斯柯信号有限公司 Multi-lingual support processing system based on resource identifiers

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412742A (en) * 2013-07-01 2013-11-27 深圳Tcl新技术有限公司 Method and device for application program to be configured with UI
CN103412742B (en) * 2013-07-01 2018-04-10 深圳Tcl新技术有限公司 Application program can configure UI method and device

Similar Documents

Publication Publication Date Title
CN101645010B (en) System and method for automatically generating code
CN102508669A (en) Automatic program code generating method
CN106293863B (en) The method and system of system function dynamic expansion replacement are realized in multilingual cloud compiling
CN111061638B (en) iOS system debugging method, device and server
CN101477462A (en) Model-driven software development method used for dynamically changing system behavior
CN101477463A (en) Software platform and software development platform used for digital television set-top box
CN104281906A (en) Process engine achieving method and system in service process
CN105094818A (en) Construction method and system for comprehensive application of natural resources based on SOA
CN101872305A (en) UI (User Interface) performance and service logic separation method and system
CN104375818A (en) System and method for achieving general data form inputting through configuration files
US9304838B1 (en) Scheduling and executing model components in response to un-modeled events detected during an execution of the model
CN110427182A (en) A kind of template type construction APP method and device
CN103426192A (en) Animated character constructing method capable of modifying binding mode
CN102289428A (en) Method and device for generating forms in bulk
CN102156640A (en) Method for generating data operation code
CN104598233A (en) Code generation method
Benouda et al. MDA approach to automate code generation for mobile applications
CN110928531A (en) Electromagnetic spectrum monitoring system software platform construction method
CN103530134A (en) Configurable software platform structure
US20140288888A1 (en) Energy management system and a screen generation method thereof
CN102375743B (en) SOA(Service-Oriented Architecture) system development method based on model and template
CN102662662A (en) Embedded graphics interface generation system and method
CN103500099A (en) Method for achieving quick software secondary development through expansion points and expansion
CN102750177A (en) Script realization method using compiler
CN111125451B (en) Data production processing method and device, electronic 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
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 201206 B unit, West Third, building 27, new Jinqiao Road, No. 13, Shanghai, Pudong

Applicant after: Shanghai Wondertek Software Co., Ltd.

Address before: 201206 B unit, West Third, building 27, new Jinqiao Road, No. 13, Shanghai, Pudong

Applicant before: Shanghai Wondertek Software Co.,Ltd.

C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20110427