CN104049957A - Rapid modeling frame of general business model based on star structure - Google Patents

Rapid modeling frame of general business model based on star structure Download PDF

Info

Publication number
CN104049957A
CN104049957A CN201310079249.1A CN201310079249A CN104049957A CN 104049957 A CN104049957 A CN 104049957A CN 201310079249 A CN201310079249 A CN 201310079249A CN 104049957 A CN104049957 A CN 104049957A
Authority
CN
China
Prior art keywords
model
view
node
framework
data
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
CN201310079249.1A
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.)
Chengdu Tai Jutai Science And Technology Ltd
Original Assignee
Chengdu Tai Jutai Science And Technology 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 Chengdu Tai Jutai Science And Technology Ltd filed Critical Chengdu Tai Jutai Science And Technology Ltd
Priority to CN201310079249.1A priority Critical patent/CN104049957A/en
Publication of CN104049957A publication Critical patent/CN104049957A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention designs a rapid modeling frame of a general business model based on a star structure. According to the basic thoughts, after the frame carries out semantic analysis according to information provided by a background business model and a foreground view model, a series of resource codes are generated to realize user-oriented code resources with basic application functions of adding, deleting, checking, changing and displaying. These code resources comprise code and database persistent layer service, database table and the like for business data processing by background, list views and editing and checking views with foreground default style, logic for generating the control style of the foreground to complete conversion of foreground and background, and multilingual resource files and automated testing codes of a related support system. According to the rapid modeling frame, the code resources complied with human power traditionally are generated by the frame, so that the man power cost is reduced, and the development efficiency is improved.

Description

The rapid modeling framework of the general service model based on star structure
Technical field:
The present invention has designed a kind of rapid modeling instrument that meets domain model driving principle of design, its basic ideas are: developer only needs manual definition Batch Processing model, after framework is analyzed business model, the information providing according to business model, generation user can use fast, can complete increasing, delete, look into, change, show, the code of the basic functions such as automatic test and resource, remove originally need to consume a large amount of manpowers to the code resource of the basic function of writing, allow framework automatically generate, reduce on the one hand the cost of development of manpower, improve the speed of modeling, make developer can be absorbed in the exploitation of specific function simultaneously.
This framework based on data core be a kind of universal model based on hub-and-spoke configuration, we are called " service entities (Service Entity) ".Describe different service logics by star-like data structure, the structure of model has been realized unitized, make unified frame data processing, automation modeling becomes possibility.Our business model based on this star structure, has invented this robotization rapid modeling framework.Provide common interface on the one hand, can process the demand of different business model.The 2nd, the information providing based on model itself, can generate the program code relevant with model structure automatically, resource file, user interface of automatic test code and default style etc.With respect to the mode of traditional artificial exploitation code, development efficiency further improves.
Background technology:
The general service model brief introduction of star structure: the proposition of domain-driven development mode, making to have introduced each department in traditional OO software development can use, and the unified domain model that can exchange makes software development more towards practical business demand.But, under the framework that does not have unified business model to support, actual development model is generally the JAVA master data class (JAVA POJO class) of anaemia, and development model and business model have no small difference, require a high expenditure of energy and realize the conversion of two kinds of models; On the other hand, actual business model structure varies, and at different business scenarios, needs diverse ways to process different business models, the difficulty that has increased exploitation and safeguarded.General service model based on star structure, adopt general structure to describe the business model of different scenes, on the one hand, make development model and domain model realize merging, directly realize modeling by domain model, embody and carry out the thought of domain-driven modeling (DDD), simultaneously, unitized model makes the processing of data and maintenance become simplification, and further making Unified frame realize data processing becomes possibility.
The present invention is based on the platform of JAVA, the universal model " service entities " based on hub-and-spoke configuration is core.Develop the Core Generator of a set of robotization code and resource, the information that can provide based on user-defined model, automatically generate code and the related resource based on J2EE platform software, realized the production line formula of software development and produced, improved the efficiency of software development.
B/S software based on J2EE platform has several part compositions below conventionally:
1. User (UI): the page that user can have access to by IE browser, is generally the JSP page or the htm1 page.In the software of J2EE, user shows and service data by view.The feature of view is taking certain or some data models as basis, carries out displaying or the processing of data, the data model here, different with our business data model of above-mentioned star structure, it is flat structures, for the demonstration service of view, is called " view model ".
Most User, can be divided into two types: List View and editing view.The feature of List View is that data source is the set of view model, be used for showing a series of data that meet the demands, the data acquisition that user meets the demands with List View search, and can select some data wherein, edit in more detail and check work.Editing view, data source is some specific view models, editing view is edited, is checked this model, or newly-built operation.
2. represent key-course: support the class that user interface shows, it has realized the conversion of two kinds of models, the mutual conversion of the business model of labyrinth and smooth graph model, shows to offer view, and back-end data processing.On the other hand, expression key-course is distributed foreground request, by the request on foreground, is distributed to background logic service layer and is further processed after simple process.
3. logical services layer: for algorithm and the business processing control of core.In the basic framework of service entities, the method providing by basic framework of logic control layer, can realize the base conditioning to service entities model data.
4. data base persistence layer, refers to the database table in concrete relational database, for persistence store data.Under the framework of star business model, the data of each node of model, corresponding a relation database table is stored.
5. data access layer, in application software, data access layer is responsible for database to operate, and it has isolated the concrete operations to database to application layer above, provides the additions and deletions of data to look into and has changed operation.In the ORM of some JAVA Open Framework, as hibernate and ibatis, database access layer has also comprised the Map Profile of database and data model.
6. the modeling of the view model of the modeling of the business model of labyrinth, and flat structures.
7. other resource, in view layer, controls the resource file of the multilingual demonstration of view, automatic test program of various piece etc.
In brief description of the drawings figure bis-described traditional based on J2EE platform, the software development flow that the POJO class based on JAVA is data model and the situation of workload.
In traditional development scheme, developer is except completing the work of modelling, and above-described various piece all needs manually to write code, need to consume a large amount of time and efforts.After observation and analysis, we find that such development also exists repeatability: the function that the software of our exploitation is realized, basic function remain taking data model as core increasing, delete, look into, change, data show and data between the operation of mutual relationship, the logical relation of these codes can obtain by the structure of data model and relation.We develop can determining by the structure of data model and view model and relation of most of code and resource file.According to such principle, we have designed the rapid modeling framework that is core round business model, the information obtaining by model, and robotization generates relevant code and resource file.Developer only need to, by energy flower in the design of model, also improve the speed of modeling greatly, once modelling completes, just can directly generate the operable application of user.
The workflow of this rapid modeling framework can be divided into two stages: backstage resource generates and foreground resource generates.During backstage resource generates, the business model of user's manual definition star, and based on this model, generate resource, as the generation of database table, the generation of database table mapped file, the generation of the generation of data access layer identification code and logical services layer identification code, simultaneously for foreground generates the view model of giving tacit consent to.Subordinate phase is foreground resource: first user manually adjusts the view model of automatic generation, removes unwanted field, adjusts the name of field.After view model determines, by automation modeling instrument, generate acquiescence JSP List View and editor, check view, generate simultaneously and represent to control class, change with the dress of realizing view model and Batch Processing model, meanwhile, generate the resource file of the multilingual control of view and the automatic test code of various piece based on view model.
Summary of the invention:
The universal model of star structure: the introduction of service entities (Service Entity)
The rapid modeling frame foundation of the present invention's design is the universal model of hub-and-spoke configuration, and we are called " service entities (Service Entity) ".By unified hub-and-spoke configuration, different service logics is described.Drive in the development scheme of exploitation at domain model, changeable for practical business model, the model that enclosed structure is different, need to consume a large amount of manpowers, the problem of time, and we are under the pattern of domain-driven exploitation, a kind of universal model of star structure has been proposed, we are called " service entities ", model is described and model essential information by unique root node, can connect one to one below root node, or the child node of one-to-many, the additional information of descriptive model.Mutual adduction relationship between different models, can realize by quoting pattern type.The proposition of service entities generic data model, has realized the unitized of model structure, has reduced the difficulty of modeling, also makes the unification of data be treated as possibility.
In brief description of the drawings, figure mono-, has described a simple sales order model based on service entities structure.Comprise order number with the closely-related essential information of order itself, the order date of formation, handler, priority level etc., is defined as the root node information of order.The additional information of sales order, and order itself presents 1 many-many relationship, such as the information of participant, we are as the child node of sales order.Conventional sales order has comprised two participants, the buyer and the buyer, and the information that the child node of participant comprises, should have: participant, main name of contact person.Contact phone, Email, participant role (such as the buyer, the seller, supplier, delivery of cargo side, paying party etc.).
Sales order has also comprised the information of " merchandising ", and order presents the relation more than 1 pair, is also defined as child node " merchandising ".Commodity self information in merchandising should be from " commodity " this independently model outside sales order, such as the title of commodity, feature of commodity etc., " merchandising " is for quoting type node, quote from " commodity " this outside service entities model, " merchandising " is self-contained is the information relevant with marketing activity in order, such as user's quantity purchase, buyer etc.
The introduction of service entities basic framework function:
Around the universal architecture model of service entities, the framework that we provide the foundation is supported modeling and basic data processing.The foundation class that developer can provide by framework, the definition of implementation model, the description of model structure.
The foundation class that can provide by inheriting framework, by a small amount of code, realizes the function to the access of database different types of data, and the rudimentary algorithm of data processing.
In figure tri-in brief description of the drawings, can find out, with respect to traditional OO J2EE software development, introducing after the basic framework of service entities, the workload of modeling developing has obtained reduction, due to unitizing of model structure, make the processing of data also realize unitized, developer is for each self-defining model, in service layer, and data access layer, the structure that only needs little size of code descriptive model, the base conditioning of data is given framework and is realized.But at presentation layer, User still needs to develop many codes and realizes user's demand.
In brief description of the drawings, Fig. 3 has described the development mode under data model and the basic framework based on service entities, compare with the development scheme of traditional J2EE in Fig. 2, the unitized processing of data, the cost of development of data access class and service class is reduced greatly, and basic data processing is given framework and is carried out.But the exploitation of presentation layer and view layer, still needs a large amount of h codings.
Rapid modeling framework based on service entities is introduced:
In order to solve artificial code development inefficiency, the problem of the duplication of labour, we have invented the rapid modeling framework based on service entities, and the basic function that can provide in service entities basic framework is supported outside modeling fast and effectively and basic skills.Also increase more rapid modeling instrument, be mainly manifested in: the generation of robotization code and related resource.Rapid modeling instrument, can be according to user-defined service entities model, and the view model of user oriented interface (UI), carries out semantic analysis, generates code and the related resource of a series of default rules, further improves the efficiency of rapid modeling.The code of robotization and resource generate and are divided into two aspects: 1, and be the generation of bottom code, i.e. user model structure coded description, data access code, the generation of database table and service layer identification code.The 2nd, the generation of user interface code, has comprised the JSP page, properties resource file, and the code of presentation layer controller class generates.
Basic functional principle and the flow process of framework fast:
The workflow of rapid modeling framework can be divided into two stages: bottom code resource generates, and presentation layer, view layer code resource generate.
The automatic generation of bottom code and resource:
First developer is according to business demand, and manual definition service entities model, comprises model which node is made up of, and which field node comprises, internodal relation, and the quoting etc. of external node.
Automatic modeling framework is first by the dynamic reflective function of JAVA, all fields of the each node definition of service entities are parsed respectively, node can generate background data base table, a node, it is also just in time two-dimentional relation structure, be mapped to a database table, all fields of node, become the field that database forms.Framework, according to these information, dynamically generates building of a SQL " create table " to each node and shows order, and framework operation SQL builds table instruction, sets up a series of relation database tables in target database.In brief description of the drawings, Fig. 4 has represented that framework is according to the corresponding relation of the dynamic generating database table of each node in model.Simultaneously according to current ORM framework, the Map Profile of generating database table: each service entities, generates the Map Profile of a database table, the mapping relations that comprised all node classes of model and database table.
Meanwhile, framework generates corresponding data model configuration class ConfigProxy class, is used for describing the structure of service entities: service entities which node is made up of, internodal mutual relationship.The model structure information that model configuration class provides can be used by other classes in the time of run mode, to realize the processing of data.
On the other hand, framework generates the corresponding data access class DAO class of service entities with new definition, is written into model configuration class class as Custom Attributes, and inherits the normal data access DAO class that basic framework provides.
To service layer, generate new service class, and be written into DAO class and ConfigureProxy class as Custom Attributes, inherit the standards service class that basic framework provides.Realize basic data algorithm.
The code resource of presentation layer, view layer generates:
With respect to bottom code, the changes in demand of user interface is larger, and the automatic generation difficulty of code and resource is larger.On the one hand user is larger to the changes in demand of view interface, various informative, on the other hand, view based on data model with respect to bottom, total class is abundanter, such as a lot of view models are to be combined by multiple bottom models.
After summing up by long-term observation, we find that the user interface overwhelming majority of B/S software can be divided into two kinds: 1 List View, 2 editing views.List View feature be it based on data source be the set of view model, show and meet a series of data that user search requires in the mode of gathering, user can inquire about, and chooses some data in set, further edits and checks.Editing view is based on some specific view models, edits, checks or newly-built operation.
These two views can be mutually nested, such as, can the nested List View for child node in an editing view.
The data source of view is view model, the business model of the labyrinth of it and bottom is different, in order to support to show, data model is all smooth structure, but then, view model and business model have close relationship: view model is all by bottom " service entities " model is split and combined.In the time of node that view model comprises multiple bottom models, always, by certain corresponding relation of one to one, each node strings is received together.
List View in different business scenarios and editing view are mutually different, but in fact, view model has determined their form: the basic function of List View and editing view fundamentally or view model is carried out to additions and deletions and look into and change.No matter be List View or edit substance, as long as can determine their view model, just can determine the display format of view.Based on above-mentioned theory, we can simply define work by developer, and the formation of definition view model, based on such information, generates acquiescence display layer, view layer resource based on this view model.And view model is to be combined by each node of business model, based on such principle, framework can be the business model of a service entities, and node carries out " planarization " combination, generates the view model of acquiescence.
Flow process and principle that presentation layer, view layer code resource generate are as follows:
1. the generation of " view model ".
First developer will define view model, and the corresponding relation of definite and Batch Processing model.
Because view model is to be come by the node combination of business model, developer does not need complete manual definition view model, framework can be according to business model, generate the view model of the acquiescence being combined by all nodes " planarization ", and the corresponding relation of automatic foundation and business model node.After the view model of acquiescence generates, developer can manually adjust, and deletes unwanted field, naming method of amendment field etc.
The effect of the controller Controller of presentation layer is the demonstration of supporting view class, its effect, be on the one hand that demand that view is submitted to is carried out being distributed to backstage after simple process and is further processed, on the other hand, controller has been realized the mutual conversion of view model and business model.And in view model, comprised and the transformational relation of business model, framework can be according to these information, automatically generates the controller code of acquiescence, completes view model and business model conversion.With support to view model additions and deletions look into the operation changing.
In rapid modeling framework, the transformational relation of view model and Batch Processing model comprises such information: the node that view model has comprised those solid models, which node sets out for " base node (host node) ", how to pass through certain man-to-man relation, traverse next backstage node.We are called " being related to route map ".In the default view model generating at framework, developer can submit to " being related to route map " to framework, and framework is from " base node " of route map definition.Custom Attributes is parsed, as the attribute of view model, and the note providing by framework (annotation), show the mapping relations of each nodal community and backstage nodal community.Simultaneously, framework also can generate one and the man-to-man configuration mapping class of view model (ConfigureMap) automatically, describe this view model and comprised the node of those backstage models and the corresponding relation of each node, such is for the auxiliary presentation layer view layer code resource that automatically generates.The view model that framework generates is the view model of acquiescence, and developer also needs according to actual business requirement, and the solid model of acquiescence is adjusted, and deletes unwanted field, adjusts name etc.
2. the generation of the resource such as presentation layer controller and view.
After view model generation is adjusted, developer calls quick framework, generates each code and the resource of presentation layer, view layer, and after generation, the exploitation of acquiescence is complete, just can use through simple mode.
Core and difficult point that the code of the controller (Controller) of presentation layer generates are two parts: the one, based on backstage " service entities ", the extraction part of the back-end data of this business model, obtain the raw data source on backstage, the 2nd, the conversion portion of back-end data and view model data, is converted to element business datum the data of view model.
Back-end data extracts part: need to determine current viewdata, how the element data that need to use, obtain from backstage, needs the node data of which " service entities ", and how the data of each node are together in series.
The realization of the extraction part of back-end data:
According to noted earlier, view model is in the time of definition, developer needs definition " being related to route map ", set out according to " base node " that be related to route map definition, each node of describing in pass course figure and the transformational relation of next node, progressively convenient all nodes, obtain all element datas.
Be related to that route map " base node " sets out, by man-to-man mapping relations, be constantly connected to next node, this man-to-man relation, in our quick framework, has several forms below, the different transcode of corresponding generation:
A. " TO_PARENT ": represent, from the viewpoint of measures of destination node, source node to the mapping relations of destination node is: source node is father node, and destination node is child node.In general, the relation of father node and child node can be one-to-many, but because view model is flat structures, the corresponding relation here must be also man-to-man, so the corresponding relation of " TO_PARENT ", can only process man-to-man father and son's node relationships.The view transcode that system generates under this relation: equal the attribute UUID of source node by the attribute parentUUID of destination node, according to the example of source node, obtain destination node example.
Provide the example code of a generation below: destination node is VehicleHost (owner information), source node: VhicleInfoRoot is the root node of information of vehicles, also be the father node of VehicleHost, they are father and son's corresponding relations of one to one.Adopt from VhicleInfoRoot node to VehicleHost node " TO_PARENT ", the code of generation is as follows.
VehicleHost?vehiclehost=(VhicleHost)vehicleInfoManager.getEntityByKey(vehicleInfoRoot.getUuid(),“parentUUID”,“VhicleHost”,null);
In the code generating, by the registration service Solid Tools of framework, obtain service class VehicleManager corresponding to service view VehicleInfo, by calling its method getEntityByKey, using the uuid of father node vehicleInfoRoot as input competition, obtain the example of child node.
In addition, in the time that father and son's nodal community is one-to-many, should adopt extra restrictive condition to obtain one to one destination node example, need developer's hand-coding, should adopt " OTHERS " corresponding relation of mentioning below.
B. " TO_CHILD ": represent, from the viewpoint of measures of destination node, source node is to the mapping relations of destination node, and source node is child node, and destination node is father node.This pass ties up in the service entities of hub-and-spoke configuration, must be man-to-man, the view transcode of generation: equal the attribute parentUUID of source node by the attribute UUID of destination node, according to the example of source node, obtain destination node example.
Based on example above, if be connected to from VehicleHost the example code that VehicleInfoRoot generates: VehicleInfoRoot vehicleInfoRoot=(VehicleInfoRoot) vehicleInfoManager.getEntityByKey (vehicleInfoRoot.getParentUuid (), " UUID ", " Root ", null).
C. " REF_TO_SOURCE ": what this mapping relations had represented that source node adopts to destination node is adduction relationship, need to call the method universal method getRefTarget of service layer, using the instance variable of source node as input parameter, obtain the instance variable of destination node.
D. " OTHERS ": other conversion regime, need developer that restrictive condition is manually set, during such as the set membership of one-to-many, need developer that restrictive condition is manually set, utilize the instance variable of source node, obtain man-to-man destination node instance variable.Framework can generate note here, and prompting developer adds the transcode of oneself below explaining.
The realization of the conversion portion of back-end data and view model data:
In the self-defining view model class of developer, all view model attributes, by annotation, have described and the relation of Batch Processing model, i.e. which node of attribute and business model, and which Attribute Relative should.In the time of automatic formation controller code, the view model class of framework meeting News Search developer definition, by all attribute traversals, according to the note of setup of attribute, finds the attribute of corresponding service entities node, realizes the conversion logic of AM/BAM code.In brief description of the drawings, Fig. 5 has described framework " being related to route map " based on developer's definition, generates the process flow diagram of view model.
3. the generation of foreground view resource.
Framework can be analyzed view model, generates List View and editing view, the field in view model, can be reacted in view, each field is shown or edited, and developer, to the view generating is adjusted, deletes unwanted field etc.
Simultaneously, framework each attribute based on view model, generate the multi-language source file of properties, the field in resource file, the field of the view model of controlling is in the demonstration of client, during acquiescence can generate at present, English resource file, framework also can mate with existing resources bank, finds out the multilingual label of the field of existing acquiescence, other field needs developer's manual translation, and configures in resource file.
After the code of all exploitations generates, developer opens and can generate relevant automatic test class by framework, such as the module on backstage, framework utilization can be read the method for service layer and data access layer class, and generates the automatic test class of JUnit or UnitilsJUnit4 based on method.On the other hand, framework can pass through view model, generates the corresponding test code of view class.
In brief description of the drawings, Fig. 4 has provided the workflow diagram of the universal model rapid modeling framework based on service entities star structure.By comparison diagram 2, Fig. 3, can find out, under rapid modeling framework, a large amount of h codings' of all needs work is all given framework and is realized, as long as developer sets up data model, and providing configuration information, framework just can be realized business demand by generating code, has greatly improved the efficiency of modeling.
Brief description of the drawings
Fig. 1 has described the star structure of the service entities model that simple " sales order " is example.
Fig. 2 has described development process and the development mode of traditional J2EE software, and the situation of workload.
Fig. 3 has described development process and the development mode of the J2EE software based on service entities universal model and basic framework, and the situation of workload.
Fig. 4 has described rapid modeling framework, based on each node of business model, generates the schematic diagram of the resources such as underlying database table, ORM mapped file.
Fig. 5 has described rapid modeling framework, according to service entities model and " being related to route map ", sets up out the schematic diagram of corresponding view model.
Fig. 6 has described whole workflow and the principle of rapid modeling framework.
Embodiment
1. system is prepared: first need in JAVA engineering, introduce the engineering bag service.platform.jar of basic framework, to support modeling and basic function, on this basis, introduce the engineering bag of rapid modeling framework: service.installation.jar.
2. service entities model modeling: the business model of design service entities, designer need to, by demand analysis, set up domain model, it is service entities model, determine service entities which node is made up of, the mutual relationship between these nodes, and and the relation of extraneous node.Then each node is set up to service entities class, inherit the foundation class that framework provides: ServiceEntityNode.
3. generate backstage code and related resource: write one section of test case code, call method ServiceEntityInstallationComProxy.registerSE (List < ServiceEntityInstallModule > seInsList) the throws ServiceEntityInstallationException of rapid modeling framework
Provide one section of code sample below, for calling this fast modeling method:
In this section of code sample, developer has defined a service entities: " booking note " (BookingNote), formed by three nodes respectively: root node BookingNote, child node: BookingNoteCargo and child node: BookingNotePayment.Statement: selnstall2.setSeNode (new BookingNoteCargo ()); The father node that selnstall2.setParentNodeName (BookingNote.NODENAME) has described Node B ookingNoteCargo is BookingNote.
We look ahead and adopt visual interface to generate backstage resource, at present due to resource-constrained, also do not develop visualization interface.The mode that adopts backstage to write test case equally also can realize High Efficiency Modeling, less better but user experiences.This framework is mainly in the face of veteran developer, so such deficiency temporarily can be ignored at present.
Step 3 will complete following backstage code resource and automatically generate:
A. according to user's service entities model, and the relation of each node, generate Configuration Agent class: ConfigureProxy class, the naming rule of Configuration Agent class is: " service entities title "+ConfigProxy, such as the service entities title of goods is BookingNote, the Configuration Agent class of its correspondence is BookingNoteConfigureProxy.The attached bag of the bag that wraps in service entities class definition of acquiescence: below Proxy.The structure that such is used for describing service entities, has comprised which node composition, each node realize class, and the attribute that comprises of each node.
B. according to user's solid model, the information of each node, generating database table, the default name mode of database table, when non-root node, table name is the same with nodename, and the title of root node is consistent with the title of service entities, the field name that the field of table and user define in service entities node class, type is consistent.
C. generate basic data access class, and using Configuration Agent class reference as its attribute, according to the ORM framework difference of J2EE configuration, can generate different data access class and related resource at present, the ORM framework of supporting is at present hibernate3 and iBatis2.In the time that ORM framework is hibernate 3, except generating the data access class that style is succinct, also the mapping hbm.xml file of hibernate will be generated.If iBatis2, as ORM framework, will generate the SQL statement mapped file of iBatis.
D. generate basic logical services class, quote the Configuration Agent class set up above and data access class as attribute, the method that can provide by framework parent, realizes the function of master data processing.
4. the modeling of view model: designer can be entirely manually modeling or; call the interface that framework provides: SEUIModelGenerator.genUIModelClassFile (List < ServiceEntityConfigMap > seConfigMapList; Boolean overflag) according to the service entities nodename importing into, generate view model.The automatic mode that framework is called in framework suggestion carries out modeling, because this step, not only can generate the view model of acquiescence, also can generate the View Mapping configuration class SEUIModelMapConfigure of view model, by the note of framework definition, point to view model class.Such can help automatically to generate afterwards presentation layer control class and view page.
5. after view model is determined, designer can call the interface that framework provides, by reading view model and the semanteme providing being provided, produce the Controller class of presentation layer, a view model will produce an EditorController, be used for supporting editing view, and a listController is for support list view.Meanwhile, can produce the editing view JSP page and the List View JSP page of default style, and based on view model, according to the field of view model, produce the resources-type of properties, for controlling multi-language version.
ServiceUIComGenService.buildUIResources(SEUIModelMapConfigure?seUIMapConfig);
Call this interface very simple, only the example of the View Mapping configuration class generating in step 4 need to be passed to the method.
The method will produce following code and resource:
A. according to the information of view model, produce the List View control class ListController of an acquiescence, editing view controller EditController with an acquiescence, List View controller has comprised serial of methods, such as, LoadModuleList, according to successor's search condition, returning to view model is basic list information; Translation type method, realizes the mutual conversion of view model and background service solid model.Editing view controller, has comprised serial of methods, LoadModuleEdit and LoadModuleView, and the uuid passing on a skill of craft to others by view searches out the model data on backstage, and is converted to view model and shows and edit; Translation type method, realizes the mutual conversion of view model and background service solid model; NewModule method, according to the information of view model, a newly-built view model; SaveModule method, is converted to back-end data model by view model, and is saved in persistent layer.
B. according to the information of view model, produce the User interface of system default style.Comprise List View and editing view, and check view and New View.By List View, can choose, editor, the function of checking, is linked to editor and checks view.
C. according to the information of view model, in automatically generating, English property resource file, shows for the more voice of controlling word tag above view, after robotization code resource generates, developer also needs manual configuration resource file.
6. after all having exploited natural resources, as required, developer can call the method that framework provides:
ServiceDAOTestUnitGenProxy.genClassFile(String?testPackage,Class<ServiceEntityDAO>daoClass);
ServiceManagerTestUnitGenProxy.genClassFile(String?testPackage,Class<ServiceEntityManager>manClass);
ServiceControllerTestUnitGenProxy.genClassFile (String testPackage, Class < SEDefaultController > conClass); Generated data access layer respectively, the automatic test code of service layer and expression key-course.

Claims (4)

1. the general service model based on hub-and-spoke configuration is a basic rapid modeling framework, for B/S (browser/server) software development of J2EE platform, robotization generating code resource.Developer defines after the business model of hub-and-spoke configuration, and business model definition comprises each node of composition model, all fields of node, and internodal mutual relationship.Framework can analytic model information, automatically generation can meet the basic application that user oriented increases, deletes, looks into, changes, shows data, and all code resources of automatic test, these resources comprise: relation database table, Database Mapping file, the data access class of supported data persistent layer operation, provide additions and deletions to look into and change and daily record, the data, services class of control of authority basic function, the view page of default style and presentation layer control class, support the resource file of the multilingual demonstration of view page, and the automatic test code of each several part.
2. the business model of the hub-and-spoke configuration of describing according to claim 1, framework is the structure of analytic model automatically, comprise the composition field of each node and the node of business model, each node generates the SQL statement of a creation database table, create a relation database table for relational database, each field automatic mapping in node is become to the row of database table, and generation model-relation database table mapped file.
3. the data model of describing according to claim 1, comprises the business model of hub-and-spoke configuration and the view model of flat structures.Wherein, business model is by developer's manual definition, and view model is that framework generates based on business model, is more manually adjusted by developer, and the useful JAVA of automatic band explain (annotation) that describe with relation business model.The relation of framework based on two kinds of models, generates presentation layer control category code automatically, completes the conversion of two kinds of models and supports view to show.
4. according to the JSP view page of the default style of the described automatic generation of claim 1, comprise List View and editing view, the set of List View data source based on view model, realize customer-oriented data query, basic display function, editing view data source, based on a specific view model of choosing, realizes customer-oriented editor, checks in detail and newly-built function.View can show or all fields of editing view model, and automatically generates the resource file of controlling multilingual demonstration, comprised all fields.
CN201310079249.1A 2013-03-13 2013-03-13 Rapid modeling frame of general business model based on star structure Pending CN104049957A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310079249.1A CN104049957A (en) 2013-03-13 2013-03-13 Rapid modeling frame of general business model based on star structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310079249.1A CN104049957A (en) 2013-03-13 2013-03-13 Rapid modeling frame of general business model based on star structure

Publications (1)

Publication Number Publication Date
CN104049957A true CN104049957A (en) 2014-09-17

Family

ID=51502867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310079249.1A Pending CN104049957A (en) 2013-03-13 2013-03-13 Rapid modeling frame of general business model based on star structure

Country Status (1)

Country Link
CN (1) CN104049957A (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630472A (en) * 2014-11-03 2016-06-01 中国科学院沈阳自动化研究所 Quick client development frame for manufacturing execution system and software development method for frame
CN105760409A (en) * 2015-03-04 2016-07-13 机械工业第六设计研究院有限公司 Method for mapping distributed object to relational database
CN106250134A (en) * 2016-07-28 2016-12-21 成都诺铱科技有限公司 The code automatic generation method of unicity language
CN107197024A (en) * 2017-06-09 2017-09-22 努比亚技术有限公司 Single table access and control method, user terminal, server and storage medium
CN107368294A (en) * 2017-05-25 2017-11-21 阿里巴巴集团控股有限公司 Using Prototype, template training method, apparatus and system
CN109086039A (en) * 2018-08-02 2018-12-25 济南安软天健科技有限公司 A kind of automatic write method of code
CN109271587A (en) * 2018-09-06 2019-01-25 北京云测信息技术有限公司 A kind of page generation method and device
CN109976840A (en) * 2017-12-27 2019-07-05 航天信息股份有限公司 The method and system of multilingual automatic adaptation are realized under a kind of separation platform based on front and back
CN110851129A (en) * 2019-11-13 2020-02-28 深圳市泰洲科技有限公司 Automatic generation method of software system code of data management class
CN111930752A (en) * 2020-09-01 2020-11-13 上海泛微软件有限公司 Data processing method and related equipment
CN112416305A (en) * 2020-11-23 2021-02-26 西安西热电站信息技术有限公司 Rapid development method based on visual studio
CN112764743A (en) * 2021-01-21 2021-05-07 潘胜怀 Method for automatically generating software based on data model drive
CN112817592A (en) * 2021-01-26 2021-05-18 四川天翼网络服务有限公司 Automatic code generation method based on entity annotation
CN112835571A (en) * 2021-01-29 2021-05-25 宝宝巴士股份有限公司 Automatic RESTful API code generation method based on Laravel framework
CN113608734A (en) * 2021-08-09 2021-11-05 神州数码融信软件有限公司 Automatic generation method of domain-driven design model code
CN114691187A (en) * 2020-12-29 2022-07-01 北京嘀嘀无限科技发展有限公司 Node registration method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114226A (en) * 2007-08-28 2008-01-30 北京中企开源信息技术有限公司 Code automatically generating device based on model component, system and method
US7503032B2 (en) * 2001-06-15 2009-03-10 International Business Machines Corporation Method and framework for model specification, consistency checking and coordination of business processes
CN102830974A (en) * 2012-08-13 2012-12-19 南京莱斯信息技术股份有限公司 Visual auxiliary development tool for rapid generation of JAVA codes

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7503032B2 (en) * 2001-06-15 2009-03-10 International Business Machines Corporation Method and framework for model specification, consistency checking and coordination of business processes
CN101114226A (en) * 2007-08-28 2008-01-30 北京中企开源信息技术有限公司 Code automatically generating device based on model component, system and method
CN102830974A (en) * 2012-08-13 2012-12-19 南京莱斯信息技术股份有限公司 Visual auxiliary development tool for rapid generation of JAVA codes

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
徐国庆等: "单元测试自动生成平台的分析与研究", 《2004年全国软件与应用学术会议》 *
杨美荣等: "基于MDA的代码生成器设计与实现", 《软件技术与数据库》 *
齐爱朋: ".net下通用信息系统开发模型研究与实践", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630472B (en) * 2014-11-03 2019-12-24 中国科学院沈阳自动化研究所 Client rapid development framework of manufacturing execution system and software development method thereof
CN105630472A (en) * 2014-11-03 2016-06-01 中国科学院沈阳自动化研究所 Quick client development frame for manufacturing execution system and software development method for frame
CN105760409A (en) * 2015-03-04 2016-07-13 机械工业第六设计研究院有限公司 Method for mapping distributed object to relational database
CN106250134A (en) * 2016-07-28 2016-12-21 成都诺铱科技有限公司 The code automatic generation method of unicity language
CN106250134B (en) * 2016-07-28 2019-03-19 成都诺铱科技有限公司 The code automatic generation method of single language
CN107368294A (en) * 2017-05-25 2017-11-21 阿里巴巴集团控股有限公司 Using Prototype, template training method, apparatus and system
CN107368294B (en) * 2017-05-25 2020-06-05 阿里巴巴集团控股有限公司 Application prototype generation method, template training method, device and system
CN107197024A (en) * 2017-06-09 2017-09-22 努比亚技术有限公司 Single table access and control method, user terminal, server and storage medium
CN109976840B (en) * 2017-12-27 2022-03-04 航天信息股份有限公司 Method and system for realizing multi-language automatic adaptation based on foreground and background separation platform
CN109976840A (en) * 2017-12-27 2019-07-05 航天信息股份有限公司 The method and system of multilingual automatic adaptation are realized under a kind of separation platform based on front and back
CN109086039A (en) * 2018-08-02 2018-12-25 济南安软天健科技有限公司 A kind of automatic write method of code
CN109271587A (en) * 2018-09-06 2019-01-25 北京云测信息技术有限公司 A kind of page generation method and device
CN110851129A (en) * 2019-11-13 2020-02-28 深圳市泰洲科技有限公司 Automatic generation method of software system code of data management class
CN111930752A (en) * 2020-09-01 2020-11-13 上海泛微软件有限公司 Data processing method and related equipment
CN111930752B (en) * 2020-09-01 2024-05-07 上海泛微软件有限公司 Data processing method and related equipment
CN112416305A (en) * 2020-11-23 2021-02-26 西安西热电站信息技术有限公司 Rapid development method based on visual studio
CN114691187A (en) * 2020-12-29 2022-07-01 北京嘀嘀无限科技发展有限公司 Node registration method and device, computer equipment and storage medium
CN112764743A (en) * 2021-01-21 2021-05-07 潘胜怀 Method for automatically generating software based on data model drive
CN112764743B (en) * 2021-01-21 2024-05-28 潘胜怀 Method for automatically generating software based on data model drive
CN112817592A (en) * 2021-01-26 2021-05-18 四川天翼网络服务有限公司 Automatic code generation method based on entity annotation
CN112835571A (en) * 2021-01-29 2021-05-25 宝宝巴士股份有限公司 Automatic RESTful API code generation method based on Laravel framework
CN113608734A (en) * 2021-08-09 2021-11-05 神州数码融信软件有限公司 Automatic generation method of domain-driven design model code
CN113608734B (en) * 2021-08-09 2024-03-29 神州数码融信软件有限公司 Automatic generation method of domain-driven design model code

Similar Documents

Publication Publication Date Title
CN104049957A (en) Rapid modeling frame of general business model based on star structure
US9087296B2 (en) Navigable semantic network that processes a specification to and uses a set of declaritive statements to produce a semantic network model
Wu et al. Semantic hyper-graph-based knowledge representation architecture for complex product development
KR101033446B1 (en) User interfaces for data integration systems
CN105094818B (en) Natural resources integrated application construction method and system based on SOA
CN1713196B (en) Product ordering system based on automatic design grid
CN101617292A (en) Programming and execution towards producer graph
CN103383645A (en) Code generation method and system
CN110807015A (en) Big data asset value delivery management method and system
KR101588592B1 (en) Hybrid application development system based on object relational mapping and the method thereof
CN101776999A (en) Platform for developing and implementing software system
JP2007087216A (en) Hierarchical dictionary preparing device, program and hierarchical dictionary preparing method
CN109981692A (en) A kind of infant industry Internet of Things framework and its implementation
Matarneh et al. Automated and interconnected facility management system: An open IFC cloud-based BIM solution
CN117454278A (en) Method and system for realizing digital rule engine of standard enterprise
CN106250134A (en) The code automatic generation method of unicity language
US20190188297A1 (en) Automatic core data service view generator
Ma et al. Customizable process design for collaborative geographic analysis
Brambilla et al. Model-driven design of service-enabled web applications
CN115543428A (en) Simulated data generation method and device based on strategy template
Rahmouni et al. Approach by modeling to generate an e-commerce web code from laravel model
Turkman et al. Business process model driven automatic software requirements generation
US9268533B2 (en) Method and apparatus for enabling layered property definition in traditional and cloud computing environments
Chen et al. A graphical programming language and its supporting tool for insect intelligent building
Maruna et al. The business process transformation framework implementation through metamodel extension

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: The mobile Internet Business Building No. 1800 Sichuan 610000 Chengdu province Yizhou Avenue room 1901

Applicant after: Chengdu Tai Thai Polytron Technologies Inc

Address before: The mobile Internet Business Building No. 1800 Sichuan 610000 Chengdu province Yizhou Avenue room 1901

Applicant before: Chengdu Tai Jutai Science and Technology Ltd.

CB02 Change of applicant information
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140917

WD01 Invention patent application deemed withdrawn after publication