Embodiment
As shown in Figure 1, application program provided by the invention generates the schematic flow sheet of embodiment of the method one.As shown in the figure, described method comprises:
Step 101, obtain at least one rule definition language.
Particularly, described rule definition language is stored in the component base as standard member.In the practical application, structure storehouse developer passes through the analysis to the application of current system, design rule definitional language.This rule definition language pack contains the contextual definitions such as dynamic logic is expressed, nested, cascade, template.More specifically, described rule definition language comprises numeric field data, service logic rule and component mark.The Application developer selects required rule definition language by human-computer interaction interface in component base after analyzing operation flow.Then, the application program generating apparatus obtains at least one rule definition language that the Application developer selects.
Step 102, resolve each rule definition language successively, generate corresponding program code.
Particularly, the application program generating apparatus is resolved each the rule definition language that gets access to successively, generates corresponding program code.That is: at first, described application program generating apparatus carries out data to the numeric field data of rule definition language and processes according to default reflex mechanism model, the first data result after obtaining to process.Then, described application program generating apparatus is resolved the formation logic computation model according to default syntax parsing model to the service logic rule of described rule definition language.Subsequently, described application program generating apparatus according to described logic computation model, calculates the second data result with the parameter of described the first data result as described logic computation model.At last, described application program generating apparatus generates corresponding program code according to the component mark of described the second data result and described rule definition language.Repeat above steps, until described application program generating apparatus has all generated till the corresponding program code after the strictly all rules definitional language has been carried out resolving.
Adopt the described method of the present embodiment, the developer only need focus on Business Process Analysis, then set up the rule definition language to consist of operation flow according to analysis result, resolve the generator program code by the application program generating apparatus at last, the process of whole application development, need not the coding code, simplified the business module software development process, being convenient to the software developer dynamically updates timely to business platform, even if the developer that Experiences in Developing Software is less also can finish fast.
Further, after the described step 102 of above-described embodiment, also comprise: all program codes that will generate are sent to server, so that described server is carried out described program code.Particularly, all program codes that described application program generating apparatus will generate are sent to server, so that described server is carried out described program code, draw execution result.Wherein, described server is the actuating equipment of any executable program.
Be described further below in conjunction with the structure of instantiation to rule definition language of the present invention.
The numeric field data of described rule definition language: in the numerous and diverse business procedure of reality, have various incidence relation, often need to call mutually, just need to have this time individual mode to realize the transmission of business datum.Be used for the incidence relation between characterization data, as call, quote the numeric field data that is the rule definition language described in above-described embodiment with transitive relation.As shown in table 1, described numeric field data can for the table described in several.
Table 1 numeric field data type and embody the table of comparisons
The service logic rule of described rule definition language: the logic that is used for this rule definition language of description provides unified rudimentary algorithm rule, such as string operation, and file operation, ordering, the XML document operation.Particularly, several concrete service logic rule of listing as shown in table 2.Expression formula.
Table 2 partial service logic rule expression
The component mark of described rule definition language: component mark in conjunction with data definition the ways of presentation of concrete business.Particularly, such as the program development of business form, the component base developer is with the abstract component mark that becomes of business form element.Component mark in conjunction with data definition the ways of presentation of business form element.Embodied combination between data and the forms pages with component mark.
Again further, as shown in Figure 2, the described method of the various embodiments described above also comprises except comprising above steps:
Step 103, the described rule definition language of structure.
Particularly, the rule language member interface that the component base developer provides by the application program generating apparatus, the parameter of input link rule definition language.Then described application program generating apparatus makes up described rule definition language according to described parameter.
The described rule definition language that step 104, storage have made up.
Particularly, the rule definition language that described application program generating apparatus will make up is stored in the component base, uses for the software developer.
By the present embodiment, the application program generating apparatus can make up rule definition language and storage according to the parameter of component base developer input, constantly to improve component base, further improve the practicality of application program generating apparatus, more convenient developer's use.
Below in conjunction with the list developing example, the described application program generation of embodiment of the invention method is described in detail.
Suppose to store in the component base the proprietary rule definition language of the Base on Web page.Described rule definition language is that the component base developer analyzes by the element to list, input analytical parameters by the exchange interface that the application program generating apparatus provides, described application program generating apparatus makes up the rule definition language according to described analytical parameters, and is stored in the described structure storehouse.
At first, the application program generating apparatus obtains at least one rule definition language.Wherein, this at least one rule definition language is that the forms pages developer passes through the analysis to operation flow, elects from described component base.
Then, described application program generating apparatus creates a new example, and for this example creates the numeric field data stack, the access rights of this storage space only are this example.Simultaneously, described application program generating apparatus is stored in described at least one the rule definition language that reads in the described form fields space for this example creates the form fields space.
Subsequently, described application program generating apparatus is loaded into described form fields space with the template of acquiescence, if having custom block, then this self-defined template is loaded into described form fields space.
Subsequently, described application program generating apparatus reads a rule definition language in the form fields space, adopt default reflex mechanism model, the numeric field data of this rule definition language is carried out the data such as data acquisition, checking and data processing and process, the first data result that obtains after processing is stored in the described numeric field data stack.Described application program generating apparatus adopts default syntax parsing model, regular service logic rule to this rule definition language is carried out syntax parsing, the formation logic computation model, the first data result that is stored in the described numeric field data stack is brought in the described logic computation model, calculate the second data result, and this second data result is carried out buffer memory.Described application program generating apparatus resolves to the code that can be used for the forms pages demonstration according to default member analytic model with the second data result of buffer memory and the component mark of described rule definition language.
Again, the code that described application program generating apparatus shows described forms pages is written to the corresponding position of described template in the described form fields space.Described application program generating apparatus reads next rule definition language in the form fields space, repeat above-mentioned steps, until the strictly all rules definitional language all resolves to the code that forms pages shows at last in the form fields space, and be written to till the corresponding position of described template in the described form fields space.
At last, described application program generating apparatus is with the template in the described form fields space, and namely complete application code is sent to server, so that described server is carried out described template.
One of ordinary skill in the art will appreciate that: all or part of step that realizes above-mentioned each embodiment of the method can be finished by the relevant hardware of programmed instruction.Aforesaid program can be stored in the computer read/write memory medium.This program is carried out the step that comprises above-mentioned each embodiment of the method when carrying out; And aforesaid storage medium comprises: the various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
As shown in Figure 3, the structural representation of application program generating apparatus embodiment one provided by the invention.As shown in the figure, described application program generating apparatus comprises: acquisition module 1 and parsing module 2.Wherein, described acquisition module 1 is used for obtaining at least one rule definition language.Described parsing module 2 is used for resolving successively each rule definition language, generates corresponding program code.Particularly, the generating apparatus of application program described in the present embodiment can be realized the step among the said method embodiment.The specific implementation principle of acquisition module described in this enforcement and described parsing module can referring to disclosed related content among the said method embodiment, repeat no more herein.
Adopt the described application program generating apparatus of embodiment, the developer only need focus on Business Process Analysis, then set up the rule definition language to consist of operation flow according to analysis result, resolve the generator program code by the application program generating apparatus at last, the process of whole application development, need not the coding code, simplified the business module software development process, being convenient to the software developer dynamically updates timely to business platform, even if the developer that Experiences in Developing Software is less also can finish fast.
Further, as shown in Figure 4, above-described embodiment one described application program generating apparatus also comprises sending module 3.All program codes that described sending module is used for generating are sent to server, so that described server is carried out described program code.
Again further, as shown in Figure 4, the described application program generating apparatus of the various embodiments described above also comprises: make up module 4 and memory module 5.Wherein said structure module is used for making up described rule definition language.Described memory module is used for the described rule definition language that storage has made up.
Particularly, the rule definition language described in the various embodiments of the present invention comprises numeric field data, service logic rule and component mark.As shown in Figure 5, described parsing module 2 comprises: data processing unit 201, resolution unit 202, computing unit 203 and generation unit 204.Wherein, described data processing unit 201 is used for according to default reflex mechanism model, the numeric field data of rule definition language is carried out data process, the first data result after obtaining to process.Described resolution unit 202 is used for the service logic rule of described rule definition language being resolved the formation logic computation model according to default syntax parsing model.Described computing unit 203 is used for the parameter of described the first data result as described logic computation model, according to described logic computation model, calculates the second data result.The component mark that described generation unit 204 is used for according to described the second data result and described rule definition language, the generator program code.
As shown in Figure 6, business description provided by the invention and analytics engine example structure schematic diagram.The present embodiment comprises: rule definition language generation engine 1 and rule parsing engine 2.Wherein, described rule definition language generation engine 1 is used for according to the analysis of Form Element and abstract in preset rules create-rule definitional language.Described rule parsing engine 2 is used for the rule definition language that receives is carried out rule parsing.
The present invention has designed a kind of rule-based proprietary business description of page form definition and analytics engine, provides under the development mode with business-driven, when the developer develops business module, does not need to consider how application system framework, framework make up.The developer focuses on service application in Business Process Analysis, designs corresponding data model, and general simple application can be finished.For complicated business, can adopt script mode that Function Extension is provided.Introduce the design philosophy of model-driven (MDA), realize the automatic or Semi-Automatic Generation of using by business model.
Wherein, in above-described embodiment, described rule definition language comprises: numeric field data, service logic rule or component mark.
Further, in above-described embodiment, described rule parsing engine comprises rule parsing processing module and data processing module.Wherein, described rule parsing processing module be used for the resolution rules definitional language and will resolve after the data that draw export.Described data processing module is used for receiving the data of described rule parsing processing module output, and the data that receive are carried out logic and/or computing and result is stored.
As shown in Figure 7, the process flow diagram of business description provided by the invention and analytic method embodiment.The present embodiment comprises:
Step S1, according to the analysis of each element of business form and abstract result according to preset rules create-rule definitional language;
Step S2, the rule definition language that receives is carried out rule parsing.
Adopt the described method of the present embodiment easily to realize and the business information easy care.
Further, the rule definition language that generates for improving, the present embodiment be based on above-described embodiment one, and a kind of described foundation of above-described embodiment is implemented as follows the analysis of Form Element and abstract in preset rules create-rule definitional language:
Analyze the business form element, the incidence relation that analyzes is generated as the numeric field data of rule definition language according to preset rules;
Analyze the business form element, the business tine information that analyzes is generated as the service logic rule of rule definition language according to preset rules;
Abstract business form element identifies the information that takes out according to the structure that preset rules is generated as the rule definition language.
Further, associative list single-page developing example in the various embodiments described above, is describedly carried out rule parsing to the rule definition language that receives and is elaborated.Process flow diagram as shown in Figure 8 is implemented as follows:
At first, regulation engine creates a new example, and for this example creates the numeric field data stack, the access rights of this storage space only are this example, and creates the form fields space.
Then, add back(ing) board, if exist self-defined template to load, to the form fields space, otherwise the load default template is to the form fields space with it.
Subsequently, read a defined item in the form fields, comprise the whole numeric field datas that comprise in service logic rule definition and the rule.Adopt reflex mechanism to carry out data acquisition, checking and data processing to numeric field data, net result is deposited in the numeric field data stack.Logical expression is carried out syntax parsing, and in resolving, with the numeric field data value that processes, the computing of substitution respective logic and arithmetical operation are carried out buffer memory with the result.
Subsequently, if there is component mark in the defined item, engine will be enabled the member resolver, and the buffered results of above-mentioned steps is become with the component mark dynamic analysis, can be used for the code that forms pages shows.
Again, the code that parses of above-mentioned steps is write the form fields space of correspondence, be about to code and write the self-defined template that loads in the described form fields space or the assigned address of giving tacit consent to template.Continue to read list with in next definition to, until travel through defined item in all form fields.
At last, engine returns to server program with the data in form fields space, by server final list is represented to client.Not shown in this step content graph 8.
Resolve numeric field data described in the various embodiments described above, be implemented as follows:
Adopt reflex mechanism to carry out data acquisition, checking and data processing to numeric field data, net result is deposited in the numeric field data stack; And in resolving, with the numeric field data value that processes, the computing of substitution respective logic and arithmetical operation, and the result carried out buffer memory.
In sum, the invention provides contractual interface, to using system's reusable function, business information is encapsulated as the standard functions member, can directly in the rule description language, adopt, or custom tailored satisfies different user's requests fast in addition, has shielded on the other hand the difference of first floor system, and a mature and stable running environment is provided.The rule definition language has designed the proprietary rule definition language of a kind of Base on Web page by the element of list is analyzed with abstract.Comprise the contextual definitions such as dynamic logic is expressed, nested, cascade, template in the rule definition language.For the rule definition language, the present invention has designed the set of rule analytics engine, can automatically finish the processing to the rule definition language, realizes institute's logic function that requires and Security Check in the practical business.For the rule definition language, adopt the dynamic script framework to support dissection process in the engine.When operation, seek, read and the executing rule definitional language, utilize dynamic function when operation, adopt reflex mechanism to carry out data verification, data processing, thereby realize the logic function of application program.
It should be noted that at last: above each embodiment is not intended to limit only in order to technical scheme of the present invention to be described; Although with reference to aforementioned each embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment puts down in writing, and perhaps some or all of technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the scope of various embodiments of the present invention technical scheme.