CN110162299A - Web program and its Quick Development Framework, development approach and relevant device - Google Patents
Web program and its Quick Development Framework, development approach and relevant device Download PDFInfo
- Publication number
- CN110162299A CN110162299A CN201910464915.0A CN201910464915A CN110162299A CN 110162299 A CN110162299 A CN 110162299A CN 201910464915 A CN201910464915 A CN 201910464915A CN 110162299 A CN110162299 A CN 110162299A
- Authority
- CN
- China
- Prior art keywords
- page
- module
- web program
- json
- business
- 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
Links
- 238000011161 development Methods 0.000 title claims abstract description 105
- 238000013459 approach Methods 0.000 title abstract description 31
- 238000012545 processing Methods 0.000 claims abstract description 94
- 238000013507 mapping Methods 0.000 claims description 36
- 238000012986 modification Methods 0.000 claims description 5
- 230000004048 modification Effects 0.000 claims description 5
- 238000000034 method Methods 0.000 abstract description 24
- 230000006870 function Effects 0.000 description 80
- 238000012795 verification Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 239000000203 mixture Substances 0.000 description 5
- 238000013461 design Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000007689 inspection Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- PWPJGUXAGUPAHP-UHFFFAOYSA-N lufenuron Chemical compound C1=C(Cl)C(OC(F)(F)C(C(F)(F)F)F)=CC(Cl)=C1NC(=O)NC(=O)C1=C(F)C=CC=C1F PWPJGUXAGUPAHP-UHFFFAOYSA-N 0.000 description 1
- 238000000465 moulding Methods 0.000 description 1
- 239000002674 ointment Substances 0.000 description 1
- 230000008569 process Effects 0.000 description 1
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
-
- 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
Abstract
The present invention relates to web development technique fields, and in particular to a kind of web program and its Quick Development Framework, development approach and relevant device, it is intended to improve the development efficiency of web program.Development Framework of the invention includes web program generating module, interface module, control module and frame kernel module;Wherein, web program generating module, which is configured that, generates target web program based on interface module, control module and frame kernel module;Interface module is configured to the page of displaying target web program;Control module is configured to receive page request and be forwarded to frame kernel module to be handled, and obtains the processing result of return, and shown by interface module;Frame kernel module is configured to load target web program, is handled according to data/logic business of the page request to target web program, and processing result is returned to control module.Present invention reduces the time of repeated work cost and reduce artificial caused mistake.
Description
Technical field
The present invention relates to web development technique fields, and in particular to a kind of web program and its Quick Development Framework, exploitation side
Method and relevant device.
Background technique
With the development of internet technology, enterprise is all widely used when servicing towards internal control and user oriented
Web technology.
Traditional web business development requirements of process Pages Design, database structure design, building B/S framework platform, number
According to library end written in code, business logic codes exploitation, the exploitation of control flow code development, user interface layer, deployment testing and debugging
A series of cumbersome steps such as the page.Therefore, it is necessary to write a large amount of code, development efficiency is lower, and the volume of a large amount of codes
It writes and necessarily be easy to cause more mistake, need longer debug time.
Summary of the invention
In order to solve the above problem in the prior art, the invention proposes a kind of web program and its Quick Development Framework,
Development approach and relevant device improve development efficiency or reduce mistake caused by human factor.
First aspect of the present invention it is proposed a kind of web program Quick Development Framework, the Development Framework includes: web program
Generation module, interface module, control module and frame kernel module;
The web program generating module is configured that based on the interface module, the control module and the frame kernel
Module generates target web program;
The interface module is configured that the page for showing the target web program, receives the data of page input, and to
The control module issues page request;
The control module, which is configured that, receives the page request, and is forwarded to the frame kernel module and is handled;
The processing result that the frame kernel module returns is obtained, and is shown by the interface module;
The frame kernel module is configured that the load target web program;According to the page request to the target
Data/logic business of web program is handled, and processing result is returned to the control module.
Preferably, web program generating module includes: elementary item generation unit;
The elementary item generation unit is configured that creation database, and according to preset tables of data in the database
Middle generation master database table;The target web program is generated according to preset basic function component and the database.
Preferably, the web program generating module further include: business function module generation unit;
The business function module generation unit is configured that according to customized data list structure, generates business function group
Part, and the business function component is added in the target web program.
Preferably, each described basic function component and each described business function component include: JSON configuration
File and business processing class;
The JSON configuration file includes: a Schema Json file, and one or more Mapping Json text
Part;
Wherein, the Schema Json file is the basic function component or the business function component corresponding page
Configuration file;Each Mapping Json file corresponds to a list in the page;The business processing class is used for
Execute corresponding service processing function in the page.
Preferably, the frame kernel module includes: component recognition and loading unit, page request processing unit;
The component recognition and loading unit, which are configured that, carries out the component under preset path according to preset attribute tags
Identification and load;
The page request processing unit is configured that the JSON configuration text parsed in corresponding component according to the page request
Part is written and read and/or calls the business processing class of corresponding component to carry out to the database according to parsing result
Access result and/or processing result are sent the control module by logic business processing.
Preferably, the control module includes: retransmission unit, binding unit;
The retransmission unit, which is configured that, receives the page request that the interface module issues, and is forwarded to the frame
Frame kernel module is handled;
The binding unit is configured that the corresponding JSON configuration file of the page request and the frame kernel mould
The data or processing result that block obtains are bound, and are shown by the interface module.
Preferably, the master database table includes: log form, authority list, menu sheet, position table, department table, Yi Jichu
Beginning data.
Preferably, the elementary item generation unit is additionally configured to: preset Universal page is copied to the target web
The correspondence catalogue of program;
The preset Universal page includes: query page, new added pages, updates the page, deletes the page and preview page.
Preferably, the elementary item generation unit is additionally configured to: being arranged in the SchemaJson file customized
Local page.
Preferably, in the business processing class include: one or more preset processing functions and/or to described preset
Obtained processing function and/or the processing function of extension after processing function modification.
Preferably, the page request processing unit is additionally configured to: being cached to page configuration file.
Preferably, the page request processing unit is additionally configured to: according to preset verification rule and/or the verification of extension
Rule carries out misarrangement to the data that current page inputs.
The second aspect of the present invention proposes a kind of web program quick development method, fast based on web program recited above
Fast Development Framework is developed, and the development approach includes:
Database is created, and master database table is generated according to preset tables of data in the database;
The target web program is generated according to preset basic function component and the database.
Preferably, the development approach further include:
Business function component is generated according to customized data list structure, and the mesh is added in the business function component
It marks in web program.
Preferably, the basic function component and the business function component include: at JSON configuration file and business
Manage class;
The JSON configuration file includes: a Schema Json file, and one or more Mapping Json text
Part.
Preferably, the development approach further include:
The preset Universal page is copied to the correspondence catalogue of the target web program.
Preferably, the development approach further include:
Customized local page is set in the Schema Json file.
Preferably, the development approach further include:
Modify to processing function preset in the business processing class and/or increase extension processing function.
Preferably, the development approach further include:
Increase the verification rule of extension.
The third aspect of the present invention proposes that a kind of web program, the development approach of the web program are web recited above
Program quick development method.
The fourth aspect of the present invention proposes a kind of storage equipment, wherein being stored with program, described program is suitable for by processor
It loads and executes, to realize web program quick development method recited above.
A kind of the fifth aspect of the present invention, it is also proposed that processing equipment, comprising:
Processor is adapted for carrying out program;
Memory is suitable for storing said program;
Described program is suitable for being loaded and being executed by the processor, to realize the web program recited above quickly side of exploitation
Method.
Compared with the immediate prior art, the invention has the following beneficial effects:
It is prefixed the operation of some General Pages in Quick Development Framework of the invention, and supports to expand and develop, both may be used
To quickly generate Unified frame and not lose its flexibility.Therefore, the present invention substantially reduces web application developer some heavy
The time spent in multiple cumbersome work, and reduce artificial caused mistake and significantly mentioned to promote product Quick thread
High working efficiency.
Scheme 1, a kind of web program Quick Development Framework, which is characterized in that the Development Framework includes: web Program Generating
Module, interface module, control module and frame kernel module;
The web program generating module is configured that based on the interface module, the control module and the frame kernel
Module generates target web program;
The interface module is configured that the page for showing the target web program, receives the data of page input, and to
The control module issues page request;
The control module, which is configured that, receives the page request, and is forwarded to the frame kernel module and is handled;
The processing result that the frame kernel module returns is obtained, and is shown by the interface module;
The frame kernel module is configured that the load target web program;According to the page request to the target
Data/logic business of web program is handled, and processing result is returned to the control module.
Scheme 2, Development Framework according to scheme 1, which is characterized in that
Web program generating module includes: elementary item generation unit;
The elementary item generation unit is configured that creation database, and according to preset tables of data in the database
Middle generation master database table;The target web program is generated according to preset basic function component and the database.
Scheme 3, the Development Framework according to scheme 2, which is characterized in that the web program generating module further include: industry
Business functional module generation unit;
The business function module generation unit is configured that according to customized data list structure, generates business function group
Part, and the business function component is added in the target web program.
Scheme 4, Development Framework according to scheme 3, which is characterized in that each described basic function component and each
A business function component includes: JSON configuration file and business processing class;
The JSON configuration file includes: a Schema Json file, and one or more Mapping Json text
Part;
Wherein, the Schema Json file is the basic function component or the business function component corresponding page
Configuration file;Each Mapping Json file corresponds to a list in the page;The business processing class is used for
Execute corresponding service processing function in the page.
Scheme 5, Development Framework according to scheme 4, which is characterized in that the frame kernel module includes: that component is known
Not with loading unit, page request processing unit;
The component recognition and loading unit, which are configured that, carries out the component under preset path according to preset attribute tags
Identification and load;
The page request processing unit is configured that the JSON configuration text parsed in corresponding component according to the page request
Part is written and read and/or calls the business processing class of corresponding component to carry out to the database according to parsing result
Access result and/or processing result are sent the control module by logic business processing.
Scheme 6, the Development Framework according to scheme 5, which is characterized in that the control module includes: retransmission unit, ties up
Order member;
The retransmission unit, which is configured that, receives the page request that the interface module issues, and is forwarded to the frame
Frame kernel module is handled;
The binding unit is configured that the corresponding JSON configuration file of the page request and the frame kernel mould
The data or processing result that block obtains are bound, and are shown by the interface module.
Scheme 7, the Development Framework according to scheme 2, which is characterized in that the master database table include: log form,
Authority list, menu sheet, position table, department table and primary data.
Scheme 8, Development Framework according to scheme 4, which is characterized in that the elementary item generation unit also configures
Are as follows: preset Universal page is copied to the correspondence catalogue of the target web program;
The preset Universal page includes: query page, new added pages, updates the page, deletes the page and preview page.
Scheme 9, the Development Framework according to scheme 8, which is characterized in that the elementary item generation unit also configures
Are as follows: customized local page is set in the Schema Json file.
Scheme 10, Development Framework according to scheme 9, which is characterized in that include: in the business processing class one or
Multiple preset processing functions and/or to the place of obtained processing function and/or extension after the preset processing function modification
Manage function.
Scheme 11, the Development Framework according to scheme 5, which is characterized in that the page request processing unit also configures
Are as follows: page configuration file is cached.
Scheme 12, the Development Framework according to scheme 11, which is characterized in that the page request processing unit also configures
Are as follows: misarrangement is carried out to the data of current page input according to the verification rule of preset verification rule and/or extension.
Scheme 13, a kind of web program quick development method, which is characterized in that based on described in any one of scheme 1-12
Web program Quick Development Framework is developed, and the development approach includes:
Database is created, and master database table is generated according to preset tables of data in the database;
The target web program is generated according to preset basic function component and the database.
Scheme 14, development approach according to scheme 13, which is characterized in that the development approach further include:
Business function component is generated according to customized data list structure, and the mesh is added in the business function component
It marks in web program.
Scheme 15, the development approach according to scheme 14, which is characterized in that the basic function component and the business
Functional unit includes: JSON configuration file and business processing class;
The JSON configuration file includes: a Schema Json file, and one or more Mapping Json text
Part.
Scheme 16, development approach according to scheme 15, which is characterized in that the development approach further include:
The preset Universal page is copied to the correspondence catalogue of the target web program.
Scheme 17, development approach according to scheme 16, which is characterized in that the development approach further include:
Customized local page is set in the Schema Json file.
Scheme 18, the development approach according to scheme 17, which is characterized in that the development approach further include:
Modify to processing function preset in the business processing class and/or increase extension processing function.
Scheme 19, the development approach according to scheme 18, which is characterized in that the development approach further include:
Increase the verification rule of extension.
Scheme 20, a kind of web program, which is characterized in that the development approach of the web program is any in scheme 13-19
Web program quick development method described in.
Scheme 21, a kind of storage equipment, wherein being stored with program, which is characterized in that described program is suitable for being added by processor
It carries and executes, with web program quick development method described in any one of implementation 13-19.
Scheme 22, a kind of processing equipment, comprising:
Processor is adapted for carrying out program;
Memory is suitable for storing said program;
It is characterized in that, described program is suitable for being loaded and being executed by the processor, with any one of implementation 13-19
The web program quick development method.
Detailed description of the invention
Fig. 1 is a kind of composition schematic diagram of web program Quick Development Framework embodiment of the invention;
Fig. 2 is the composition schematic diagram of another web program Quick Development Framework embodiment of the invention;
Fig. 3 is the key step schematic diagram of web program quick development method embodiment of the invention.
Specific embodiment
The preferred embodiment of the present invention described with reference to the accompanying drawings.It will be apparent to a skilled person that this
The a little technical principles of embodiment for explaining only the invention, it is not intended that limit the scope of the invention.
The present invention uses the JSON configuration solution from wound, compared to generation cumbersome when page development in traditional technology
Code is write, and it is few that development interface not only writes step, but also developer can change default code according to demand, has very strong
Consistency and flexibility.Development interface is one of the bright spot of the development kit almost without code, only need to write a few row JSON codes,
It can realize that (if necessary to customized, programmer also can be used required mode to rewrite default generation for the web page of a standard
Code).Web program Quick Development Framework of the invention mainly uses development language: PHP, Python, Javascript, PL/SQL.
Fig. 1 is a kind of composition schematic diagram of web program Quick Development Framework embodiment of the invention.As shown in Figure 1, this reality
The web program Quick Development Framework 10 for applying example includes: interface module 11, control module 12, frame kernel module 13 and web program
Generation module 14.
Wherein, interface module 11 is configured that the page of displaying target web program, receives the data of page input, and to control
Molding block issues page request;Control module 12 is configured that reception page request, and is forwarded at frame kernel module
Reason;The processing result that frame kernel module returns is obtained, and is shown by interface module;Frame kernel module 13 configures
Are as follows: load target web program;It is handled according to data/logic business of the page request to target web program, and will processing
As a result control module is returned to;Web program generating module 14 is configured that based on interface module, control module and frame kernel mould
Block generates target web program.
In the present embodiment, web program generating module 14 includes: elementary item generation unit 141.Elementary item generation unit
141 concrete configurations are as follows: creation database, and master database table is generated according to preset tables of data in the database;According to pre-
The basic function component and database set generate target web program.Wherein, master database table include: log form, authority list,
Primary data in menu sheet, position table, department table etc. and these tables.
Optionally, elementary item generation unit 141 is additionally configured to: preset Universal page is copied to target web program
Correspondence catalogue.Preset Universal page includes: query page, new added pages, updates the page, deletes the page and preview page
Deng.
Each basic function component includes: JSON configuration file and business processing class.Wherein, JSON configuration file packet
It includes: a Schema Json file, and one or more Mapping Json file;Schema Json file is basic function
The configuration file of energy component corresponding page;Each Mapping Json file corresponds to a list in the page;Business processing
Class is for executing corresponding service processing function in the page.One or more processing functions are prefixed in business processing class, I
Can also modify to wherein preset processing function, can also in addition write the processing function of extension.
In the present embodiment, web program generating module 14 is actually a web project Core Generator matched with frame,
Basic web project after being prefixed compiling in the Core Generator, content includes basic function component and resource file.Utilize the work
When having grassroot project, empty database is created first, then in the tool database link address configuration, and selects corresponding number
According to library type, corresponding solution title is filled in, and needs to generate the virtual directory of program, tool will record these information
To be used in subsequent operation.It is clicked in the tool and generates button, tool can database link according to configuration and institute
The type of database of category, using the sql script file preset in tool generate in the database system needs use it is basic
Database table, such as: log form, authority list, menu sheet, position table etc. and some primary datas such as default power user
And initial System menu (logging in management, position management, menu management and division management etc.).Tool is by preset basic function
Then energy component copy generates virtual site into the catalogue of user configuration, user may have access to basis web application, wherein
Comprising basic system function, such as log in management, position management, menu management and division management.
In traditional web project development, Query, View, Modify page of each entity are troublesome, need weight
Code is write again, wastes a large amount of manpower, and the frame of the present embodiment solves this problem using the method for Universal page.
The Universal page of the present embodiment specifically includes that query page (QueryPage), new added pages (CreatePage), updates the page
(ModifyPage), preview page (ViewPage) etc., by adding entity name used in Url when accession page
Path parameter (for example, QueryPage? Path=Signature/SignList, i.e., under acquisition Schema Json catalogue
SignList Schema Json object under Signature file, Schema Json reference Mapping Json are obtained in turn
Take entity object), a Schema Json file can correspond to multiple Mapping Json files, can load in the same page
Different entities.After getting Schema Json path parameter, program removes to find corresponding JSON file, i.e. under Module
JSON file.By every attribute in parsing Schema Json and Mapping Json, the current page built in frame is used
Face (QueryPage CreatePage ModifyPage ViewPage) to generate for the function interface unified pattern control or
Person's list.
When Universal page is unable to complete our demand, we can also be arranged in Schema Json file
Customized local page.The content that we need is write in the customized page, by Schema Json file
Customized local page is arranged in the attributes such as QueryButtonCustom, QueryButtonBottom, QueryButtonExcel
Path, Universal page can read these attribute values, if it is the empty page then defaulted with frame, if be not it is empty if using from
The local page of definition, then reloads in Universal page, thereby realizes the customized extension page of discrete function.
In the present embodiment, frame kernel module 13 includes: component recognition and loading unit 131, page request processing unit
132。
Wherein, component recognition and loading unit 131 are configured that according to preset attribute tags to the component under preset path
It is identified and is loaded;Page request processing unit 132 is configured that the JSON configuration parsed in corresponding component according to page request
File is written and read to database and/or calls the business processing class of corresponding component to carry out logic industry according to parsing result
Access result and/or processing result are sent control module by business processing.
Even if the procedure set text that Schema Json and the Mapping Json of disparity items and business processing class are generated
Part is put into the project of another identical frames, and component recognition and loading unit 131 can also obtain automatically dynamic base information simultaneously
Registration.It only needs to configure menu in menu management, so that it may which normal use can plug and play as component.It solves
In traditional development system the drawbacks of overprogram, each module can be assembled freely.
Optionally, page request processing unit 132 is additionally configured to: being cached to page configuration file.
The Quick Development Framework of the present embodiment has largely used caching technology, improves system performance, but not
Exploitation debugging efforts are influenced, operational efficiency is not only increased using Cache technology and has also accomplished exploitation and operation seamless connection.
Optionally, page request processing unit 132 is additionally configured to: according to preset verification rule and/or the verification of extension
Rule carries out misarrangement to the data that current page inputs.
In the present embodiment, more than 20 kinds of common verification rules are prefixed in frame kernel module, as long as by it and needing to examine
The field association looked into.At the same time, CLIENT PROGRAM can also expand and develop the pact suitable for this frame according to user demand
Beam class.Page request processing unit 132 can do some data inspections according to the data type configured in Mapping Json automatically
It tests.For example, then automaticly inspecting its data when certain field type is integer Int in newly-built or modification and being necessary for integer, otherwise
User is reminded to re-enter;For another example, when the Len attribute of certain field is 50, then the length of its logging data is automaticly inspected not
It can exceed that 50.
In addition we can also create the constraint class (adding the verification rule of extension) of oneself, and inherit in frame
BaseDataValid realizes the inspection logic of oneself;In the corresponding business processing class in interface for needing to use the constraint
The constraint class is added in AddDataValids method.
In the present embodiment, control module 12 includes: retransmission unit 121, binding unit 122.
Wherein, retransmission unit 121 is configured that the page request that reception interface module 11 issues, and is forwarded to frame kernel
Module 13 is handled;Binding unit 122 is configured that the corresponding JSON configuration file of page request and frame kernel module
13 data obtained or processing result are bound, and are shown by interface module 11.
Fig. 2 is the composition schematic diagram of another web program Quick Development Framework embodiment of the invention.As shown in Fig. 2, this
The web program Quick Development Framework 20 of embodiment includes: interface module 21, control module 22, frame kernel module 23 and web journey
Sequence generation module 24.
Wherein, interface module 21, control module 22, frame kernel module 23 configuration respectively with the interface module in Fig. 1
11, control module 12, the correspondence of frame kernel module 13 are identical, and details are not described herein again.
Difference is, the web program generating module 24 of the present embodiment other than including elementary item generation unit 241,
Further include: business function module generation unit 242.
Wherein, the configuration of elementary item generation unit 241 is identical as the elementary item generation unit 141 in Fig. 1, herein not
It repeats again.Business function module generation unit 242 is configured that according to customized data list structure, generates business function component,
And business function component is also added in target web program, thus the target web program after being expanded.With basic function group
Part is the same, each business function component also includes: JSON configuration file and business processing class.Wherein, JSON configuration file packet
It includes: a Schema Json file, and one or more Mapping Json file.Schema Json file is business function
The configuration file of energy component corresponding page;Each Mapping Json file corresponds to a list in the page.
Business function module generation unit 242 can import Data Base Design Document (designed table knot in the present embodiment
Structure), tables of data can also be directly imported from database.Then can every table of automatic identification each field data type,
And according to data type Auto-matching control type, for example the time is Time type, gender is Radio control, city is Select
Type (combobox), we can also manually adjust control type, and frame provides 10 several common controls, after configuration is complete, point
Generation button is hit, tool can automatically generate Schema Json and Mapping Json file, refer in Schema Json
Mapping Json parses JSON file according to the path JSON of the various menu configuration when frame is run and caches, user's access
When query page or edit page, frame can render corresponding html and css control according to the control type of these fields
Part.
In addition to two JSON files, business function module generation unit 242 can also generate a business processing class
(DataHandler), such is labeled with the TableReloverAttribute attribute tags that frame defines, the Attribute packet
Containing attributes such as RegisterName (login name), Author (author).One group of class can be placed under a module/program collection, project
When starting, the component recognition and loading unit of frame kernel module possess TableReloverAttribute by reflecting identification
The class of attribute is loaded, and is then mapped according to login name and is cached corresponding configuration file.When receiving service request, frame
The page request processing unit of frame kernel module can by the RegisterName (login name) that is configured in Schema Json from
Corresponding business processing class is found in mapping table and is instantiated.Preset processing function is contained in the business processing class,
Such as: current time is assigned to the modification time field of table, programmer can rewrite the function according to the actual situation and reach extension
The purpose of exploitation.Increase under normal circumstances, delete, modifying and the function of inquiry data does not need to rewrite the function, it is only in need
It is just rewritten when realizing specific logical.
In view of the importance of Mapping Json and Schema Json in the present invention, below specially to both files
It is illustrated.
(1) Mapping Json:
In the embodiment of Fig. 1 and Fig. 2, Mapping Json is most important JSON formatted file, it is stored in web
The Json of mesh root under the path Mapping.
Each Mapping Json file is actually the field mapping of a list of background data base table.It is by frame
Frame kernel module, control module and interface module are used in conjunction with, all shared Mapping Json text in data processing and display
Part, this is done so that exploitation web programs to become more convenient.
In Mapping Json file, by DataName, ColumnName, DisplayString, Len,
The labels such as CloumnKey, ColumnType, IsEmpty, Default provide necessary data information, journey for framing program
Sequence, automatically to relevant attribute assignment, the corresponding data check of addition etc., is not needed in this way in JSON text by these information
It writes one time, and is write into program one time in part, greatly reduce size of code.
Meanwhile in Mapping Json, by DataName, ColumnName, DisplayString,
The labels such as DisplayData, ExtensionData, CtrlType provide enough display information for interface module.Boundary
Face mould block automatically generates the interfaces such as Create, Modify, View and Query by analyzing this JSON file, it is generally the case that
Interface module can be completed to show without writing any code.
CtrlType control type include: TextBox, Hide, View, CheckBox, File, Password, Select,
TextArea、Radio、ViewHide、RadioList、MultiCheck、UploadFile、ViewUploadFile、
ViewMultiCheck,HtmlCtrl,DetailHtmlCtrl,ViewTextArea.Frame configures different classes according to JSON
Type generates corresponding html control, for example, the corresponding html control type generated of TextBox be < input type=" text "/
>;The corresponding html control type generated of Hide is<input type=" hidden "/>;The corresponding html generated of CheckBox
Control type is<input type=" checkbox "/>.
The full format of Mapping Json is all defined in Mapping.info and Mapping.json,
Mapping.info and Mapping.json is deposited under the path Json.
Here is the example of a Mapping Json file, it is directly generated by auxiliary Core Generator, and basic herein
On be finely adjusted after obtain.
(2) Schema Json:
In the embodiment of Fig. 1 and Fig. 2, Schema Json is a most and more complex JSON format of function.
It is stored in web root Json under the path Schema.
Schema Json file is serviced for the DataCollection of system registry, its each file is actually
It is the explanation of a function, is used in conjunction with by frame kernel module, control module and interface module.
The DataProcessor label of Schema Json, which has indicated, to use the DataProcessor of any registration,
Corresponding DataProcessor just can read the information in Schema Json, then generate corresponding behavior.Different
DataProcessor indicates edit page different mode, such as single table, multilist, master-salve table.
Meanwhile in Schema Json, by DataHandler, Style, Query, MasterSlave, Main,
The labels such as Type, define whether every table needs to show, and the format of display.Interface module is by analyzing this JSON in this way
File is combined into required interface automatically.
Schema Json is exactly to be formed by combination Mapping Json and business processing class DataHandler respectively
Kind function.The Development Framework of the present embodiment provides ten kinds or so of list model, covers common Web page surface model.This
Outside, functionally, related only by configuration without programming because Schema Json is also that program and display are shared
Schema Json, it is then parsed by frame, so that it may complete functional development.
The mode that Schema Json is mainly supported in the present embodiment is as shown in table 1:
Table 1
Here is the example (single table schema) of a Schema Json file:
It is based on same technical concept with above-mentioned web program Quick Development Framework, the present invention also proposes a kind of web program
Quick development method.Fig. 3 is the key step schematic diagram of web program quick development method embodiment of the invention.Such as Fig. 3 institute
Show, as long as the development approach of the present embodiment includes step S10-S20:
Step S10 creates database, and generates master database table in the database according to preset tables of data;
Step S20 generates target web program according to preset basic function component and database in Core Generator.
So far, we have been realized in a basic web program, it can star operation, wherein it is pre- to contain frame
The basic function set.
Optionally, the development approach of the present embodiment can also include:
Preset Universal page is copied to the correspondence catalogue of target web program by step S30.
Optionally, the development approach of the present embodiment can also include:
Customized local page is arranged in Schema Json file in step S40.
Optionally, the development approach of the present embodiment can also include:
Step S50 generates business function component according to customized data list structure, and mesh is added in business function component
It marks in web program.
After being added to the target web program starting of business function component, " the menu pipe that can include in infrastructure component
A menu corresponding with business function component is created in reason ";Then by newly-built menu and button permissions in " position management "
It configures, then logging in again can the normal use business function.
Optionally, the development approach of the present embodiment can also include:
Step S60, modify to processing function preset in business processing class and/or increase extension processing function.
Optionally, the development approach of the present embodiment can also include:
Step S70 increases the verification rule of extension.
Although each step is described in the way of above-mentioned precedence in above-described embodiment, this field
Technical staff is appreciated that the effect in order to realize the present embodiment, executes between different steps not necessarily in such order,
It (parallel) execution simultaneously or can be executed with reverse order, these simple variations all protection scope of the present invention it
It is interior.
Based on development approach embodiment above, the present invention also proposes a kind of embodiment of web program, which is
It is obtained using web program quick development method recited above.
Further, the present invention also proposes a kind of embodiment for storing equipment, wherein being stored with program, described program is suitable for
It is loaded by processor and is executed, to realize web program quick development method recited above.
Further, the present invention also proposes a kind of embodiment of processing equipment, comprising: processor and memory.Wherein, locate
Reason device is adapted for carrying out program, and memory is suitable for storing said program, and described program is suitable for being loaded and being executed by the processor, with
Realize web program quick development method recited above.
Those skilled in the art should be able to recognize that, side described in conjunction with the examples disclosed in the embodiments of the present disclosure
Method step, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate electronic hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is executed actually with electronic hardware or software mode, specific application and design constraint depending on technical solution.
Those skilled in the art can use different methods to achieve the described function each specific application, but this reality
Now it should not be considered as beyond the scope of the present invention.
So far, it has been combined preferred embodiment shown in the drawings and describes technical solution of the present invention, still, this field
Technical staff is it is easily understood that protection scope of the present invention is expressly not limited to these specific embodiments.Without departing from this
Under the premise of the principle of invention, those skilled in the art can make equivalent change or replacement to the relevant technologies feature, these
Technical solution after change or replacement will fall within the scope of protection of the present invention.
Claims (10)
1. a kind of web program Quick Development Framework, which is characterized in that the Development Framework includes: web program generating module, boundary
Face mould block, control module and frame kernel module;
The web program generating module is configured that based on the interface module, the control module and the frame kernel module
Generate target web program;
The interface module is configured that the page for showing the target web program, receives the data of page input, and to described
Control module issues page request;
The control module, which is configured that, receives the page request, and is forwarded to the frame kernel module and is handled;It obtains
The processing result that the frame kernel module returns, and shown by the interface module;
The frame kernel module is configured that the load target web program;According to the page request to the target web
Data/logic business of program is handled, and processing result is returned to the control module.
2. Development Framework according to claim 1, which is characterized in that
Web program generating module includes: elementary item generation unit;
The elementary item generation unit is configured that creation database, and is given birth in the database according to preset tables of data
At master database table;The target web program is generated according to preset basic function component and the database.
3. Development Framework according to claim 2, which is characterized in that the web program generating module further include: business function
It can module generation unit;
The business function module generation unit is configured that according to customized data list structure, generates business function component, and
The business function component is added in the target web program.
4. Development Framework according to claim 3, which is characterized in that each described basic function component and each institute
Stating business function component includes: JSON configuration file and business processing class;
The JSON configuration file includes: a Schema Json file, and one or more Mapping Json file;
Wherein, the Schema Json file is matching for the basic function component or the business function component corresponding page
Set file;Each Mapping Json file corresponds to a list in the page;The business processing class is for executing
Corresponding service processing function in the page.
5. Development Framework according to claim 4, which is characterized in that the frame kernel module include: component recognition with
Loading unit, page request processing unit;
The component recognition is configured that with loading unit and is identified according to preset attribute tags to the component under preset path
With load;
The page request processing unit is configured that the JSON configuration file parsed in corresponding component according to the page request,
The database is written and read and/or is called according to parsing result the business processing class of corresponding component carry out logic
Access result and/or processing result are sent the control module by business processing.
6. Development Framework according to claim 5, which is characterized in that the control module includes: retransmission unit, binding list
Member;
The retransmission unit, which is configured that, receives the page request that the interface module issues, and is forwarded in the frame
Core module is handled;
The binding unit, which is configured that, obtains the corresponding JSON configuration file of the page request and the frame kernel module
The data or processing result taken are bound, and are shown by the interface module.
7. Development Framework according to claim 2, which is characterized in that the master database table includes: log form, permission
Table, menu sheet, position table, department table and primary data.
8. Development Framework according to claim 4, which is characterized in that the elementary item generation unit is additionally configured to: will
Preset Universal page is copied to the correspondence catalogue of the target web program;
The preset Universal page includes: query page, new added pages, updates the page, deletes the page and preview page.
9. Development Framework according to claim 8, which is characterized in that the elementary item generation unit is additionally configured to:
Customized local page is set in the Schema Json file.
10. Development Framework according to claim 9, which is characterized in that include: one or more in the business processing class
Preset processing function and/or to obtained processing function and/or the processing letter of extension after the preset processing function modification
Number.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2018112448765 | 2018-10-24 | ||
CN201811244876.5A CN109614084A (en) | 2018-10-24 | 2018-10-24 | Web program and its Quick Development Framework, development approach and relevant device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110162299A true CN110162299A (en) | 2019-08-23 |
Family
ID=66002367
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811244876.5A Pending CN109614084A (en) | 2018-10-24 | 2018-10-24 | Web program and its Quick Development Framework, development approach and relevant device |
CN201910464915.0A Pending CN110162299A (en) | 2018-10-24 | 2019-05-30 | Web program and its Quick Development Framework, development approach and relevant device |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811244876.5A Pending CN109614084A (en) | 2018-10-24 | 2018-10-24 | Web program and its Quick Development Framework, development approach and relevant device |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN109614084A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112068827A (en) * | 2020-07-31 | 2020-12-11 | 广东飞企互联科技股份有限公司 | Method, device, system, equipment and medium for generating accessory control |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110297636B (en) * | 2019-07-03 | 2023-06-27 | 广州鲁邦通物联网科技股份有限公司 | Page automatic generation and parameter management method, system and device based on page configuration file |
-
2018
- 2018-10-24 CN CN201811244876.5A patent/CN109614084A/en active Pending
-
2019
- 2019-05-30 CN CN201910464915.0A patent/CN110162299A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112068827A (en) * | 2020-07-31 | 2020-12-11 | 广东飞企互联科技股份有限公司 | Method, device, system, equipment and medium for generating accessory control |
Also Published As
Publication number | Publication date |
---|---|
CN109614084A (en) | 2019-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9904522B2 (en) | Web development system | |
US7917815B2 (en) | Multi-layer context parsing and incident model construction for software support | |
US6941546B2 (en) | Method and apparatus for testing a software component using an abstraction matrix | |
CN108959076A (en) | A kind of API on-line debugging method | |
US20160004516A1 (en) | Code Generation Framework for Application Program Interface for Model | |
US20080250392A1 (en) | Content management system for computer software with dynamic traceability between code and design documents | |
US10445675B2 (en) | Confirming enforcement of business rules specified in a data access tier of a multi-tier application | |
CN104375808B (en) | interface display method and device | |
CN106648682B (en) | A kind of dynamic data general framework of embedded system exploitation | |
US20150066977A1 (en) | Method and system for managing digital resources | |
US20080276221A1 (en) | Method and apparatus for relations planning and validation | |
US20120266131A1 (en) | Automatic program generation device, method, and computer program | |
CN102566984B (en) | Method and device for configuring parameters | |
US8108768B2 (en) | Improving efficiency of content rule checking in a content management system | |
CN106776314A (en) | A kind of test system | |
CN102236544A (en) | Method and device for designing skins | |
US8615729B2 (en) | Extending existing model-to-model transformations | |
CN109783107B (en) | Visual rule generation method and device and electronic equipment | |
CN105589959A (en) | Form processing method and form processing system | |
CN110705237A (en) | Automatic document generation method, data processing device, and storage medium | |
CN108509199A (en) | Automatically generate the method, apparatus, equipment and storage medium of Chinese annotation | |
CN112860260A (en) | Web-based cross-platform application construction tool and method in college scene | |
US7069542B2 (en) | Method and system for incremental actions relating to notify and target models | |
KR101877828B1 (en) | User interface integrated platform system based on artificial intelligence | |
Wei et al. | Partial loading of XMI models |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20200907 Address after: Susong Road West and Shenzhen Road North, Hefei Economic and Technological Development Zone, Anhui Province Applicant after: Weilai (Anhui) Holding Co., Ltd Address before: 30 Floor of Yihe Building, No. 1 Kangle Plaza, Central, Hong Kong, China Applicant before: NIO NEXTEV Ltd. |
|
TA01 | Transfer of patent application right | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |