Summary of the invention
Adopt a cover fixed model to complex business systems descriptive power deficiency in order to solve existing model driving development method, and existing model driving development method can't be visual at run mode, make up with model driving development method dynamically, the technical matters of expansion and maintenance service system, the invention provides system and method thereof that a kind of application plug-in expands the model-driven development ability, this system and method has proposed the array mode of " model+plug-in unit " and has described the structure software systems, set up the basic model description of software systems earlier with the modelling instrument, set up some reusable plug-in model again and further describe the basic model object, thereby realized expansion the model-driven development ability.
The technical solution that the present invention taked is: a kind of application plug-in expands the system of model-driven development ability, comprise model data store unit, modelling instrument, business datum storage unit, model running engine, described model data store unit comprises the basic model data storage cell; Described model data store unit is database or the file that is used for the memory model data; Described modelling instrument is used for designing operational data structure and the substantial definition information in the basic model data storage cell and the interface definition information of business datum storage unit; Described model running engine is used to define business element class, field class, traffic table class, entity class and interface class, described business element class, field class, traffic table class, entity class and interface class constitute the basic model class, and described basic model class is used at the corresponding basic model object of internal memory structure; Its special character is: described model running engine also comprises plug-in unit support program collection, and described plug-in unit support program collection is used to define the plug-in adapter class; Described model data store unit also comprises plug-in model data storage cell and plug-in application data storage cell; Described plug-in model data storage cell is used for the data of memory card model, the data of described plug-in model comprise procedure set definition information, program class definition information and plug-in unit definition information, and described plug-in application data storage cell is used for memory card application definition information; Described basic model class has a plug-in adapter class object; Described plug-in adapter class object can be managed a plurality of plug-in units, and described plug-in unit is that plug-in unit is realized the postrun internal memory form of expression of class; Also make plug-in unit realize class object; Described system also comprises the plug-in component operation storehouse; Described plug-in component operation storehouse comprises plug-in unit realization class method collection; Described plug-in unit realizes that the class method collection comprises at least one plug-in unit realization class, and each plug-in unit realizes that class is used to realize the interface specification and the pin function of corresponding plug-in unit; Described basic model class is managed a plurality of plug-in units by the plug-in adapter class object; Described modelling instrument also is used for designing the plug-in application definition information in procedure set definition information, program class definition information, plug-in unit definition information and the plug-in application data storage cell of plug-in component operation storehouse and plug-in model data storage cell.
Above-mentioned basic model data storage cell is used to store the data of basic model, the data of described basic model comprise interface definition information and substantial definition information, described interface definition information comprises control definition information and menu definition information, described substantial definition information comprises traffic table definition information and business function definition information, described traffic table definition information comprises Field Definition information, and described Field Definition information comprises business element definition information; Database or file that described business datum storage unit is the storage service data; Described model running engine can be realized following function:
1] from the basic model data storage cell, reads substantial definition information and interface definition information; Generate the entity class object according to entity class, generate and the corresponding interface of entity class object class object according to the interface class; The screen performance of described interface class object is exactly an operation interface; The data of described interface class object performance are exactly the data of entity class object;
2] according to user operation the business datum in the business datum storage unit is read in the entity class object and check by operation interface for the user;
3] be saved in the business datum storage unit according to the data of user's operation the entity class object;
4] read pairing plug-in unit definition information in the plug-in application definition information according to entity class object that has generated and interface class object, and call pairing plug-in unit according to this plug-in unit definition information and realize that class generates plug-in unit and realizes class object, and make plug-in unit realize that class object is related with entity class object and operation interface with controlled entity class object and interface class object.
The system of second kind of application plug-in expansion model-driven development ability comprises model data store unit, modelling instrument, business datum storage unit, model running engine, and described model data store unit comprises the basic model data storage cell; Described modelling instrument is used for designing operational data structure and the substantial definition information in the basic model data storage cell and the interface definition information of business datum storage unit; Described model running engine is used to define business element class, field class, traffic table class, entity class and interface class, described business element class, field class, traffic table class, entity class and interface class constitute the basic model class, and described basic model class is used at the corresponding basic model object of internal memory structure; Its special character is: described model running engine also comprises plug-in unit support program collection, and described plug-in unit support program collection is used to define card i/f, plug-in unit supporting interface and plug-in adapter class; Described model data store unit also comprises plug-in model data storage cell and plug-in application data storage cell; Described plug-in model data storage cell is used for the data of memory card model, the data of described plug-in model comprise procedure set definition information, program class definition information and plug-in unit definition information, and described plug-in application data storage cell is used for memory card application definition information; Definition has a basic model class object in the described card i/f; The plug-in unit realization class that realizes card i/f must realize this basic model class object; This basic model class object has write down the plug-in unit of realizing this interface and has realized the basic model class object that class is served; Described basic model class can realize the plug-in unit supporting interface; Has a plug-in adapter class object in the plug-in unit supporting interface; Described plug-in adapter class has a basic model class object, and this basic model class object has write down the basic model object under this adapter class; Described plug-in adapter class has the card i/f tabulation that can manage a plurality of plug-in units, and described plug-in unit is that plug-in unit is realized the postrun internal memory form of expression of class; Can write down corresponding plug-in unit in the described card i/f tabulation; Described system also comprises the plug-in component operation storehouse; Described plug-in component operation storehouse comprises plug-in unit realization class method collection; Described plug-in unit realizes that the class method collection comprises at least one plug-in unit realization class;
Described system also comprises the plug-in component operation storehouse; Described plug-in component operation storehouse comprises plug-in unit realization class method collection and plug-in unit load classes procedure set; Described plug-in unit realizes that the class method collection comprises at least one plug-in unit realization class, each plug-in unit realizes that class is used to realize the interface specification and the pin function of corresponding plug-in unit, described plug-in unit load classes procedure set comprises at least one plug-in unit load classes, the plug-in unit load classes is inherited in the plug-in adapter class, each plug-in unit load classes can define the information creating plug-in unit according to plug-in application, and the plug-in unit of creating is registered in the card i/f tabulation; Described basic model class is by a plurality of plug-in units of card i/f list management; Described modelling instrument also is used for designing the plug-in application definition information in procedure set definition information, program class definition information, plug-in unit definition information and the plug-in application data storage cell of plug-in component operation storehouse and plug-in model data storage cell.
Above-mentioned basic model data storage cell is used to store the data of basic model, the data of described basic model comprise interface definition information and substantial definition information, described interface definition information comprises control definition information and menu definition information, described substantial definition information comprises traffic table definition information and business function definition information, described traffic table definition information comprises Field Definition information, and described Field Definition information comprises business element definition information; Database or file that described business datum storage unit is the storage service data; Described model running engine can be realized following function:
1] from the basic model data storage cell, reads substantial definition information and interface definition information; Generate the entity class object according to entity class, generate the interface class object according to the interface class; The screen performance of described interface class object is exactly an operation interface; The data of described interface class object performance are exactly the data of entity class object;
2] according to user operation the business datum in the business datum storage unit is read in the entity class object and check by operation interface for the user;
3] be saved in the business datum storage unit according to the data of user's operation the entity class object;
4] read pairing plug-in unit definition information in the plug-in application definition information according to entity class object that has generated and interface class object, and call pairing plug-in unit according to this plug-in unit definition information and realize that class generates plug-in unit and realizes class object, and make plug-in unit realize that class object is related with controlled entity object and interface object with entity object and interface class object.
A kind of application plug-in expands the method for model-driven development ability, may further comprise the steps:
(1) analyze according to demand, the modelling instrument is set up substantial definition information and the interface definition information that the model running engine moves according to this and is stored in the basic model data storage cell;
(2) the modelling instrument defines the corresponding business data structure according to the relevant information of being set up, and stores in the business datum storage unit;
(3) analyze according to demand, the modelling instrument is set up the data of plug-in model, and is stored in the plug-in model data storage cell;
(4) according to above-mentioned plug-in unit definition information, the modelling instrument is write corresponding insert and is realized category code, and compiling generates plug-in unit realization class method collection;
(5) the design tool definition plug-in application corresponding with basic model that use a model defines information, and stores in the plug-in application data storage cell;
(6) use a model runtime engine operation basic model and plug-in model.
The concrete steps of above-mentioned steps 1 are as follows:
1.1 the modelling instrument is set up business element definition information;
1.2 the modelling instrument is quoted business element definition information and is set up traffic table definition information;
1.3 the modelling instrument is quoted traffic table definition information and is set up substantial definition information;
1.4 modelling instrument reference entity definition information is set up interface definition information;
1.5 with above-mentioned information stores in the basic model data storage cell;
The concrete steps of described step 2 are as follows: the modelling instrument is according to traffic table definition information definition operational data structure, and the operational data structure in the generation business datum storage unit;
The concrete steps of step 3 are as follows:
3.1 modelling instrument creation facilities program (CFP) collection definition information;
3.2 modelling instrument creation facilities program (CFP) class definition information, and the procedure set under the appointment program class wherein;
3.3 the modelling instrument is set up plug-in unit definition information, and specifies the program class that wherein realizes pin function;
3.4 with above-mentioned information stores in the plug-in model data storage cell;
The concrete steps of described step 4 are as follows:
4.1 according to plug-in unit definition information, the modelling instrument generates a plug-in unit and realizes the category code framework;
4.2 the modelling instrument is write plug-in unit according to plug-in unit realization category code framework and is realized category code;
4.3 the modelling instrument is realized the category code compiling and generates plug-in unit realizing the class method collection according to plug-in unit;
The concrete steps of step 5 are as follows: the modelling instrument is quoted basic model definition information and plug-in model definition information, defines the plug-in application definition information corresponding with basic model, and stores in the plug-in application data storage cell;
The concrete steps of step 6 are as follows:
6.1 create basic model object and subobject thereof, the model running engine reads substantial definition information and interface definition information from the basic model data storage cell, generate the entity class object according to entity class, generates the interface class object according to the interface class;
6.2 create the plug-in unit of basic model class object, according to the basic model class object that has generated, read corresponding insert application definition information in the plug-in application data storage cell, the procedure set that reads in the plug-in model data storage cell according to plug-in application definition information defines information and program class definition information, creates plug-in unit realization class object according to the program class that the assembly name in the procedure set definition information calls in the corresponding procedure set; And the plug-in unit created realized that class object is recorded in the plug-in adapter class object of basic model class object;
Realize the related of class object 6.3 set up the basic model class object with plug-in unit, after plug-in unit realized that class object is recorded in the plug-in adapter class object, the plug-in unit method of enabling of calling basic model object and subobject thereof is set up plug-in unit and is realized the related of class correlation method and basic model class object and subobject incident thereof, this plug-in unit is enabled the activation attribute that each plug-in unit that is provided with in the method in the plug-in adapter class object is realized class object, this activates attribute can set up basic model class object and subobject thereof when activating incident and plug-in unit and realizes the related of correlation method in the class object, and this activates the related of correlation method in attribute can disconnect basic model class object and subobject thereof when forbidding incident and the plug-in unit realization class object;
6.4 in the operational process, plug-in unit is realized the incident of class object response basic model class object and subobject thereof and is carried out correlation method and finish pin function;
Realize getting in touch of class object correlation method 6.5 basic model class object and subobject thereof disconnect its incident and plug-in unit earlier before destruction, and destroy plug-in unit and realize class object;
6.6 destroy basic model class object and subobject thereof;
Second kind of application plug-in expands the method for model-driven development ability, may further comprise the steps:
(1) analyze according to demand, the modelling instrument is set up substantial definition information and the interface definition information that the model running engine moves according to this and is stored in the basic model data storage cell;
(2) the modelling instrument defines the corresponding business data structure according to the relevant information of being set up, and stores in the business datum storage unit;
(3) analyze according to demand, the modelling instrument is set up the data of plug-in model, and is stored in the plug-in model data storage cell;
(4) according to above-mentioned plug-in unit definition information, the modelling instrument is write corresponding insert and is realized category code, and compiling generates plug-in unit realization class method collection;
(5) the design tool definition plug-in application corresponding with basic model that use a model defines information, and store in the plug-in application data storage cell, generate corresponding insert load classes code simultaneously, and be stored in the program category code item of program class definition information, and the plug-in unit load classes code compile that generates and merge in the plug-in unit load classes procedure set;
(6) use a model runtime engine operation basic model and plug-in model.
The concrete steps of above-mentioned steps 1 are as follows:
1.1 the modelling instrument is set up business element definition information;
1.2 the modelling instrument is quoted business element definition information and is set up traffic table definition information;
1.3 the modelling instrument is quoted traffic table definition information and is set up substantial definition information;
1.4 modelling instrument reference entity definition information is set up interface definition information;
1.5 with above-mentioned information stores in the basic model data storage cell;
The concrete steps of described step 2 are as follows: the modelling instrument is according to traffic table definition information definition operational data structure, and the operational data structure in the generation business datum storage unit;
The concrete steps of described step 3 are as follows:
3.1 modelling instrument creation facilities program (CFP) collection definition information;
3.2 modelling instrument creation facilities program (CFP) class definition information, and the procedure set under the appointment program class wherein;
3.3 the modelling instrument is set up plug-in unit definition information, and specifies the program class that wherein realizes pin function;
3.4 with above-mentioned information stores in the plug-in model data storage cell;
The concrete steps of described step 4 are as follows:
4.1 according to plug-in unit definition information, the modelling instrument generates a plug-in unit and realizes the category code framework;
4.2 the modelling instrument is write plug-in unit according to plug-in unit realization category code framework and is realized category code;
4.3 the modelling instrument is realized the category code compiling and generates plug-in unit realizing the class method collection according to plug-in unit;
The concrete steps of described step 5 are as follows: the modelling instrument is quoted basic model definition information and plug-in model definition information, define the plug-in application definition information corresponding with basic model, and store in the plug-in application data storage cell, generate corresponding insert load classes code simultaneously, and be stored in the program category code item of program class definition information, and the plug-in unit load classes code compile that generates and merge in the plug-in unit load classes procedure set;
The concrete steps of described step 6 are as follows:
6.1 create basic model class object and subobject thereof, the model running engine reads substantial definition information and interface definition information from the basic model data storage cell, generate the entity class object according to entity class, generates the interface class object according to the interface class;
6.2 create the plug-in unit of basic model class object, according to the basic model class object that has generated, read corresponding insert application definition information in the plug-in application data storage cell, the procedure set that reads in the plug-in model data storage cell according to plug-in application definition information defines information and program class definition information, creates plug-in unit realization class object according to the corresponding stowage of plug-in unit load classes that the assembly name in the procedure set definition information calls in the plug-in unit load classes procedure set; And plug-in unit realized that class object records in the card i/f tabulation in the plug-in adapter class object of basic model class object;
6.3 set up the related of basic model class object and plug-in unit, after plug-in unit being registered in the card i/f tabulation of plug-in adapter class object, the plug-in unit method of enabling of calling basic model class object and subobject thereof is set up plug-in unit and is realized the related of class object correlation method and basic model class object and subobject incident thereof, this plug-in unit is enabled the activation attribute that each plug-in unit that is write down in the card i/f tabulation that the plug-in adapter class object is set in the method is realized class object, this activates attribute can set up basic model class object and subobject thereof when activating incident and plug-in unit and realizes the related of correlation method in the class object, and this activates the related of correlation method in attribute can disconnect basic model class object and subobject thereof when forbidding incident and the plug-in unit realization class object;
6.4 in service, plug-in unit is realized the incident of class object response basic model class object and subobject thereof and is carried out correlation method and finish pin function;
Realize getting in touch of class object correlation method 6.5 disconnect its incident and plug-in unit before the basic model class object is destroyed earlier, and destroy plug-in unit and realize class object;
6.6 destroy basic model class object and subobject thereof.
Advantage of the present invention:
1, system extension is flexible.The present invention has adopted the array mode of " model+plug-in unit " to describe the structure software systems, can realize real-time follow-up and dynamically adjustment, no matter be the operation interface or the business function of core, all can by plug-in model convenient realize expansion and guarantee that propagation energy continues multiplexing, and along with the change of business demand the dynamic expansion system.The present invention uses plug-in model to expand basic model definition, has solved the problem of basic model to software systems descriptive power deficiency, makes model driving development method also can design complicated business function under the coding method.
2, system maintenance easy.All independently there is each plug-in unit in the plug-in model of uniqueness of the present invention, and the update software system replaces plug-in unit exactly, so renewal work can not influence the use of current system.The constructed software of the present invention is based on basic model and plug-in model, and model is transparent, readable, is exactly maintenance to model to the maintenance of software, is convenient to the maintenance and the renewal of software.
3, non-programming development reduces the technical requirement in exploitation and the debugging.The present invention adopts the array mode of " model+plug-in unit ", realize software development, test, tracking, maintenance activity in complete patterned mode, the developer need not to grasp complicated program language and framework, only needs simple training can carry out the exploitation of enterprise-level professional software.The invention provides a large amount of plug-in model through verifying repeatedly, can significantly reduce the exploitation debugging work load, the service logic debugging work load is well below traditional development mode debugging work load.The present invention uses the plug-in model model definition of activating business, and has increased the multiplexing of model function, reduces the code compiling amount.
4, high reliability.Based on the application software of the present invention exploitation, be implemented on basic model and the plug-in model through checking repeatedly, seldom even not have the coding of customization, thereby reduce exploitation complexity, minimizing fallibility, can effectively improve software quality and reliability.
5, lower complexity.The present invention provides basic business model and the moderate plug-in model of granule size according to the high level overview of business datum and abstract, has the flexible feature of tiny granularity, can reduce the complexity of performance history.
6, can realize quick exploitation.The present invention is that the development mode of center type has almost shielded all software development techniques with the model, can reduce the technical requirement of software development significantly, thereby solves the software development bottleneck; The distinctive mode with model construction of the present invention has born batch production production feature, makes software development more convenient, orderly, even drop into the lifting that the new person also can bring development efficiency immediately.The present invention need not the art designing just can generate the unified interactive interface of style automatically, and the user can self-defined application interface layout.
7, reduce cost, reduce manpower and rely on.The distinctive non-programming development pattern of the present invention can effectively reduce the technical requirement to the software developer, thereby saves human cost in a large number.The present invention is based on the structure formula exploitation of " model+plug-in unit ", can realize quick exploitation, thereby shorten the construction cycle.The present invention's's " model+plug-in unit " structure formula exploitation realizes by model construction that fully all business processing, data manipulation and logical process all are transparent visible and clear logic, do not exist software development to depend on one or two core technology personnel's risk.Low technical requirement of the present invention can be evaded technical risk and manpower risk in the software development, and what increase software development can be planned, effectively evades time risk.
8, the present invention can realize that technology is multiplexing.The model inheritance method that the present invention proposes has solved the multiplexing capacity of model itself, and the plug-in unit reusable makes business model and plug-in model maximum using rate.The model relation of inclusion that the present invention proposes makes easier visit and control system operation in plug-in unit is write.
Embodiment
As shown in Figure 1, first kind of application plug-in expands the system of model-driven development ability, comprise model data store unit, modelling instrument, business datum storage unit, model running engine and plug-in component operation storehouse, the model data store unit comprises the basic model data storage cell; The model data store unit is database or the file that is used for the memory model data.
The modelling instrument is used for designing operational data structure and the substantial definition information in the basic model data storage cell and the interface definition information of business datum storage unit, also is used for designing the plug-in application definition information in procedure set definition information, program class definition information, plug-in unit definition information and the plug-in application data storage cell of plug-in component operation storehouse and plug-in model data storage cell.
The model running engine is used to define business element class, field class, traffic table class, entity class and interface class, institute's business element class, field class, traffic table class, entity class and interface class constitute the basic model class, and described basic model class is used at the corresponding basic model object of internal memory structure; Also comprise plug-in unit support program collection, plug-in unit support program collection is used to define the plug-in adapter class; The basic model class has a plug-in adapter class object; The plug-in adapter class object can be managed a plurality of plug-in units, and plug-in unit is that plug-in unit is realized the postrun internal memory form of expression of class; Also make plug-in unit realize class object; The model running engine is used for reading the model data of the model data store unit that designs, according to the data that read, call basic model class and plug-in unit and realize that class generates software, finish software function according to the business datum in user's operation and the access business datum storage unit.
The plug-in component operation storehouse comprises plug-in unit realization class method collection; Plug-in unit realizes that the class method collection comprises at least one plug-in unit realization class, and each plug-in unit realizes that class is used to realize the interface specification and the pin function of corresponding plug-in unit; The basic model class is managed a plurality of plug-in units by the plug-in adapter class object.
As shown in Figure 2, the model data store unit also comprises plug-in model data storage cell and plug-in application data storage cell; The plug-in model data storage cell is used for the data of memory card model, and the data of plug-in model comprise procedure set definition information, program class definition information and plug-in unit definition information, and the plug-in application data storage cell is used for memory card application definition information.
The data of basic model comprise interface definition information and substantial definition information, interface definition information comprises control definition information and menu definition information, substantial definition information comprises traffic table definition information and business function definition information, traffic table definition information comprises Field Definition information, and Field Definition information comprises business element definition information; The business datum storage unit is the database or the file of storage service data;
Comprise traffic table definition information and functional definition information in the substantial definition information.Substantial definition information comprises entity ID, entity title etc., and entity ID is the numbering of an entity of unique identification, the entity title is the name of entity, as shown in figure 17.Comprise entity ID in the traffic table definition information, traffic table ID, master meter ID, boss's relation increases, and deletion is revised, and duplicates; Wherein entity ID has identified the affiliated entity of this traffic table, traffic table ID unique identification a traffic table, boss concerns the adduction relationship of having determined between the traffic table, increases deletion, revise, whether duplicate and identified this traffic table and can increase, deletion is revised, record in the copy table, as shown in figure 18.The traffic table of traffic table ID appointment is in table definition information, table definition information comprises traffic table ID, the traffic table title, former database-name, former table name, affiliated classification, wherein traffic table ID unique identification traffic table definition information, the traffic table title is the name of traffic table in model, former database name is the database-name of this table in the business datum storage unit, former table name has been specified the storage table name in the database of this traffic table correspondence, and affiliated classification-designated subsystem under this table is as shown in table 5.The traffic table definition also comprises the Field Definition of traffic table, Field Definition information comprises traffic table ID, Field ID, field name, business element, wherein traffic table ID specifies the affiliated traffic table of this field, the Field ID unique identification definition information of a field, field name is corresponding to the field in the corresponding traffic table in the stored data base, and business element has been specified the data type of this field, and is as shown in table 6.Functional definition information comprises entity ID, functional identity, and the function title, entity ID identifies the entity under this function, functional definition of functional identity unique identification, the function title is the function name, and is as shown in table 9.The substantial definition information definition structure of traffic table and the relation and the entity function of traffic table.
Interface definition information comprises control definition information, menu definition information.Interface definition information definition the pattern at running software interface, comprise interface I D in the interface definition information, the interface title, the entity that the interface showed, interface I D are interface numberings of unique identification, entity is the Data Source of interface performance, and is as shown in table 10.Control and menu are the essential elements that constitutes the interface, have defined the type of control in the control definition information, and traffic table in the entity of performance and field are as shown in table 11.Defined the menu and the tool bar project of operation interface in the menu definition information, as shown in table 12.
The model running engine can be realized following function:
1] from the basic model data storage cell, reads substantial definition information and interface definition information; Generate the entity class object according to entity class, generate and the corresponding interface of entity class object class object according to the interface class; The screen performance of described interface class object is exactly an operation interface; The data of described interface class object performance are exactly the data of entity class object;
2] according to user operation the business datum in the business datum storage unit is read in the entity class object and check by operation interface for the user;
3] be saved in the business datum storage unit according to the data of user's operation the entity class object;
4] read pairing plug-in unit definition information in the plug-in application definition information according to entity class object that has generated and interface class object, and call pairing plug-in unit according to this plug-in unit definition information and realize that class generates plug-in unit and realizes class object, and make plug-in unit realize that class object is related with entity class object and operation interface with controlled entity class object and interface class object.
The system of second kind of structure of the present invention comprises model data store unit, modelling instrument, business datum storage unit, model running engine, the plug-in component operation storehouse, and the model data store unit comprises the basic model data storage cell; The modelling instrument is used for designing operational data structure and the substantial definition information in the basic model data storage cell and the interface definition information of business datum storage unit; The model running engine is used to define business element class, field class, traffic table class, entity class and interface class, described business element class, field class, traffic table class, entity class and interface class constitute the basic model class, and described basic model class is used at the corresponding basic model object of internal memory structure;
The model running engine also comprises plug-in unit support program collection, and plug-in unit support program collection is used to define card i/f, plug-in unit supporting interface and plug-in adapter class; The model data store unit also comprises plug-in model data storage cell and plug-in application data storage cell; The plug-in model data storage cell is used for the data of memory card model, and the data of plug-in model comprise procedure set definition information, program class definition information and plug-in unit definition information, and described plug-in application data storage cell is used for memory card application definition information;
Definition has a basic model class object in the card i/f; The plug-in unit realization class that realizes card i/f must realize this basic model class object; This basic model class object has write down the plug-in unit of realizing this interface and has realized the basic model class object that class is served;
The basic model class can realize the plug-in unit supporting interface; Has a plug-in adapter class object in the plug-in unit supporting interface; The plug-in adapter class has a basic model class object, and this basic model class object has write down the basic model object under this adapter class; The plug-in adapter class has the card i/f tabulation that can manage a plurality of plug-in units, and plug-in unit is that plug-in unit is realized the postrun internal memory form of expression of class; Can write down corresponding plug-in unit in the card i/f tabulation;
System also comprises the plug-in component operation storehouse; The plug-in component operation storehouse comprises plug-in unit realization class method collection and plug-in unit load classes procedure set; Plug-in unit realizes that the class method collection comprises at least one plug-in unit realization class, each plug-in unit realizes that class is used to realize the interface specification and the pin function of corresponding plug-in unit, plug-in unit load classes procedure set comprises at least one plug-in unit load classes, the plug-in unit load classes is inherited in the plug-in adapter class, each plug-in unit load classes can define the information creating plug-in unit according to plug-in application, and the plug-in unit of creating is registered in the card i/f tabulation; The basic model class is by a plurality of plug-in units of card i/f list management; The modelling instrument also is used for designing the plug-in application definition information in procedure set definition information, program class definition information, plug-in unit definition information and the plug-in application data storage cell of plug-in component operation storehouse and plug-in model data storage cell.The basic model data storage cell is used to store the data of basic model, the data of basic model comprise interface definition information and substantial definition information, interface definition information comprises control definition information and menu definition information, substantial definition information comprises traffic table definition information and business function definition information, traffic table definition information comprises Field Definition information, and Field Definition information comprises business element definition information; The business datum storage unit is the database or the file of storage service data;
The attainable function of model running engine of native system is identical with first kind of system model runtime engine.
The plug-in model data storage cell: the plug-in model data storage cell is used for stored programme collection definition information, program class definition information, plug-in unit definition information.(plug-in model is the plug-in unit definition information that is used to expand basic model description ability.Plug-in unit be a kind of can be with the reusable component software that further describes the basic model object of parameter, the basic model object is exactly a concrete basic model; Described plug-in model is made up of procedure set information definition, the definition of program category information and plugin information definition; ) wherein procedure set definition information comprise procedure set ID, assembly name, procedure set type, whether be dynamic, a procedure set definition of procedure set ID unique identification information, assembly name sign assembly file title, the place of procedure set type identification procedure set operation.Whether be whether the dynamic marks procedure set can dynamically be generated by the modelling instrument, the procedure set type is divided into public plug-in unit, client plug-in, the service end plug-in unit, public plug-in unit is the plug-in unit that service end and client can be moved, the service end plug-in unit can only operate in service end, and client plug-in can only operate in client, and procedure set definition information is as shown in table 13.Wherein program class definition information comprises program class ID, program class title, program class type, procedure set ID, program category code, a program class definition of program class ID unique identification information, the title that program class name identification program class defines in assembly file, procedure set ID has identified this program class corresponding programme collection, program class type definition the program class be to be used for which kind of package types, the program category code is used to store the code of this program class, and program class definition information is as shown in table 14.Wherein plug-in unit definition information comprises plug-in unit ID, plugin name, the plug main body object type, client realizes class ID, service end realizes class ID, a plug-in unit definition of plug-in unit ID unique identification information, plugin name is a significant plug-in unit name, the plug main body object type has identified the adaptable basic model object type of this plug-in unit, client realizes that class ID identifies the client realization class of this plug-in unit, service end realizes that class ID identifies the service end realization class of this plug-in unit, and plug-in unit definition information is as shown in Table 15.Also comprise plug-in unit parameter-definition information in the plug-in unit definition information, plug-in unit parameter-definition information comprises plug-in unit ID, parameter name, parameter type, parameter default, parameter declaration, plug-in unit ID has identified the plug-in unit under this parameter, and parameter name has identified the parameter name of the corresponding plug-in unit of plug-in unit ID, and parameter type is the data type of parameter, parameter declaration is the operation instruction to this plug-in unit parameter, and is shown in table 16.
The plug-in application data storage cell: the plug-in application data storage cell is used for the application definition information of memory card.Plug-in application definition information comprises plug-in application ID, model object ID, the model object type, plug-in unit ID, whether enable, plug-in application ID unique identification the expanded definition information of a plug-in unit on a basic model object, model object ID has identified the basic model object of this application, the type of this model object of model object type identification, plug-in unit ID has identified the plug-in unit that is applied on this model object.Whether enable and identified this plug-in application and whether come into force, when coming into force then modeling engine when execution model, can load this plug-in unit automatically, then do not load this plug-in unit when not enabling.
The modelling instrument: the modelling instrument is used to design the basic model definition information of basic model data storage cell, plug-in model definition information in the design plug-in model data storage cell, plug-in application definition information in the design plug-in application data storage cell, design plug-in component operation storehouse, operational data structure in the design business datum storage unit, main interface as shown in figure 16, the modelling instrument comprises business element definition information design tool (Figure 17), traffic table definition information design tool (Figure 18), substantial definition information design tool (Figure 19), interface definition information design tool (Figure 20,21), procedure set definition information design tool (Figure 23), program class definition information design tool (Figure 24), plug-in unit definition information design tool (Figure 25,26), plug-in application definition information design tool (Figure 27,28).
The business datum storage unit: the business datum storage unit is file or the database that is used for the storage service data, and the traffic table definition information in the storage organization of business datum and the basic model data storage cell is consistent.
The model running engine: the model running engine comprises basic model class method collection and plug-in unit support program collection, described basic model class method centralized definition business element class, traffic table class, entity class and interface class; Plug-in unit support program centralized definition card i/f, plug-in unit supporting interface, plug-in adapter class.As shown in Figure 4.Thereby the model running engine is to be used for reading the model information of model data store unit and to call relevant basic model class and dynamic generation model memory object of plug-in unit realization class and operation interface, simultaneously according to the business datum in user's operation access business datum storage unit.
Card i/f IPlugin provides a standard to retrain attribute and method that plug-in unit realizes that class must realize, the interface member has had (1) basic model class object owner attribute record agent object (basic model object) that plug-in unit depends on, (2) Boolean type object Active attribute is used for mark plug-in unit initiate mode, and state disconnects agent object incident and plug-in unit during for false and realizes the related of disposal route in the class.State is set up agent object incident and plug-in unit during for true and is realized the related of disposal route in the class.Plug-in unit realizes that class must inherit this interface, realizes that the attribute of this interface and method finish pin function.
Plug-in adapter class PluginSocket has safeguarded a card i/f list attribute list and plug-in unit stowage load, (1) the list attribute is the list object of an IPlugin structure, this tabulation is used for managing a series of plugin informations that are attached on the basic model object, the Load method is an empty method, inherits the plug-in unit that the plug-in unit load classes of plug-in adapter class therewith will be defined on this basic model object and be registered in successively in the card i/f tabulation in the method.The plug-in unit load classes is generated according to plug-in unit definition information and application definition information automatically by the modelling instrument.The load method that the model running engine has loaded the plug-in unit load classes of calling this object behind the basic model object realizes that class creates and be registered in the card i/f tabulation of plug-in adapter to the plug-in unit that is defined in this basic model object.
Plug-in unit supporting interface ISupportPlugin has safeguarded a series of attributes and the method for supporting its plug-in unit of basic model Object Management group, (1) Plugins attribute, this attribute is a plug-in adapter class PluginSocke type, this structure is used to manage all and realizes class object information attached to the plug-in unit on this basic model object, (2) CreatePlugins method is created calling the plug-in unit that this method will be defined on this basic model object behind the basic model Object Creation.(3) the ActivatePlugins method is enabled on this basic model object all additional plug-in units in order, and plug-in unit is set up the related of basic model class object incident and plug-in unit disposal route.(4) DeactivatePlugins method, the method by with enable the opposite order of plug-in unit and disconnect the related of the disposal route of the accompanying plug-in unit of basic model object and basic model class object incident.In order to make basic model class object application plug-in expanded function dynamically, the basic model class must realize this interface.
The basic model class comprises the business element class, field class, traffic table class, entity class, interface class, various control classes, menu class.All realized plug-in unit supporting interface ISupportPlugin in all basic model class definitions, made basic model expand its function with plug-in unit.Shown in the following code: TModel wherein can be traffic table type TTable, basic model classes such as entity type TEntity.public?class?TModel:ISupportPlugin<TModel>
{ // plug-in adapter
PluginSocket<TModel>Plugins
{
get{return?Plugins;}
}
void?CreatePlugins()
{
// the method is created defined plug-in unit in the model definition.
// load the method that can call the loading type of plug-in unit realizes this function
}
void?ActivatePlugins()
{
// the method is enabled all plug-in units that this main body articulates in order, and plug-in unit is set up mould automatically
Type main body incident is related with the plug-in unit disposal route.
// can realize that the active value of type is set to true and realizes by each plug-in unit.
}
void?DeactivatePlugins()
{
// the method disconnects the disposal route and the main body incident of plug-in unit that this main body is hung in reverse order
Association.
// can realize that the active value of type is set to false and realizes by each plug-in unit.
}
}
The plug-in component operation storehouse: the plug-in component operation storehouse comprises plug-in unit realization class method collection and plug-in unit load classes procedure set, as shown in Figure 6, plug-in unit realizes that the class method collection has comprised the plug-in unit realization class that is used to realize pin function, plug-in unit load classes procedure set has comprised the plug-in unit load classes that is used to load plug-in unit, and the plug-in unit load classes is used for plug-in unit is realized that class object is loaded into the card i/f tabulation of plug-in adapter.
Plug-in unit realizes that class is the code of the realization pin function write by the user.This type of must realize the IPlugin interface, attribute owner in the interface is the agent object of plug-in unit realization for this reason, in the set method of attribute Active, if active is true then the agent object incident is set and realizes the related of class disposal route, as agent object incident and the disconnection that realizes the class disposal route then are set for false.The plug-in unit that the procedure set that generates behind the code compile of plug-in unit realization class can merge in the plug-in component operation storehouse realizes that class method is concentrated.Plug-in unit realizes that the category code framework is as follows:
public?class?Model_Plugin:IPlugin<TModel>
{
Private TModel_Owner; // agent object (also being the basic model object)
TModel?Owner
{
get{return_Owner;}
}
private?bool_Active;
// state of activation mark is changed to false with this state and breaks when with the modelling instrument parameter being set
Open the related of agent object incident and plug-in unit correlation method.
// when parameter after setting completed the modelling instrument this state can be changed to true, articulate agent object incident and plug-in unit
The association of // correlation method.
public?bool?Active
{
get
{
return_Active;
}
set
{
if(value)
{
// articulate the related of model agent object incident and plug-in unit corresponding method
this.Owner.Event+=Event;
}
else
{
// breakage model agent object incident is related with the plug-in unit corresponding method.
this._Owner.Event-=Event;
}
this.Active=value;
}
}
The parameter of this parameter of [PluginParam] // mark for being adjusted by modeling tool
Public string Param1; The parameter of the adjustable plug-in unit of // developer.
Private string_Param1; // plug-in unit built-in attribute.
// plug-in unit building method, the plug-in unit load classes can be called this building method automatically when creating the object of this plug-in unit realization class.
// this building method transmits agent object and realizes class to plug-in unit.
public?Model_Plugin(TModel?owner)
{
this._Owner=owner;
// building method is handled the initialization of necessary attribute
}
public?void?Event(object?sender,EventArgs?e)
{
// agent object event response is handled code
// realize the pin function code herein
}
The release of public void Dispose () // processing resource
{
this.Active=false;
// handle other resources to discharge
}
}
Plug-in unit load classes PluginLoader is the class that the modelling instrument generates automatically according to the plug-in application configuration information, this type of is inherited and the plug-in adapter class, realized the empty method load method in the plug-in adapter class, in the method, all plug-in units of affiliated this agent object have all been created and are loaded among its card i/f tabulation list.After generating in internal memory and compile, this category code merges in the plug-in unit load classes procedure set in the plug-in component operation storehouse.The code skeleton that generates is as follows:
// plug-in unit load classes example code (this partial code is generated automatically by the modelling instrument)
public?class?PluginLoader:PluginSocket<TModel>
{
public?override?void?Load(TModel?sender)
{
// will hang over the also adding tabulation successively of plug-in unit on this basic model object.
Model_Plugin1?p1=new?Model_Plugin1(sender);
p.Param1=″ParamValue″;
this.List.Add(p1);
Model_Plugin1?p2=new?Model_Plugin2(sender);
p2.Param1=″ParamValue″;
this.List.Add(p2);
}
}
The principle of the invention: plug-in unit of the present invention is different from plug-in unit in general sense, be a kind of can be with the reusable component software that further describes the basic model object of parameter, plug-in unit must be attached on the basic model object, be also referred to as the agent object of plug-in unit, allow agent object satisfy certain business rule or allow agent object realize certain function.The plug-in unit message of web response body Web object is automatically also finished associative operation automatically.Plug-in model is exactly a kind of plug-in unit definition that can solve the business field problem.Same basic model object can use a plurality of plug-in model to expand its descriptive power, and finishes its function with plug-in unit.Same plug-in unit also can be by adjusting parameter to different basic model object extended functions.
Generate as mentioned above under application software principle and the method in the present invention, further specify system of the present invention in conjunction with the accompanying drawings and constitute and embodiment.It is as follows to use method of the present invention to carry out the step of software development:
Step 1: analyze according to demand, the modelling instrument is set up substantial definition information and the interface definition information that the model running engine moves according to this and is stored in the basic model data storage cell;
The concrete steps of step 1 are as follows:
1.1 the modelling instrument is set up business element definition information;
1.2 the modelling instrument is quoted business element definition information and is set up traffic table definition information;
1.3 the modelling instrument is quoted traffic table definition information and is set up substantial definition information;
1.4 modelling instrument reference entity definition information is set up interface definition information;
1.5 with above-mentioned information stores in the basic model data storage cell;
The business element definition: business element is the definition of the data type of field being carried out the business field notion, as the quantity in the marketing system, the amount of money, notions such as discount, special meaning is only just arranged in marketing system, and " debit " in the financial system, " credit side " etc. are just meaningful in financial system, and the present invention to design a cover software all be software systems at certain business field, the identical field type definition of notion can appear in each module in system in a large number.Single professional neutralization is sold in the single business of system of ordering goods and all can be used price field as the sale outbound system in marketing system, though one is selling price in two business, one is order price, but price all can use identical data type to carry out in calculating, as be appointed as data types such as discernible money of computing machine or decimal, but this type is computer-oriented, generally have only the programming personnel could understand his actual meaning, and the model-driven exploitation is the development approach of service-oriented, designer who is ignorant of programming or business personnel also can design systems, allow their can correct design system, must use a kind of method designated computer data type and the corresponding relation of hinting obliquely at of service concept, business element is in order to finish this kind function, method is: the design tool that uses a model is set up business element definition information, as being defined as the business element name, the notion in the business field " quantity " is called " quantity ", actual type is the discernible type of the computer system of int or float, price is defined as the business element name and is called " price ", actual type is the discernible type of computer system of " money " or " decimal ", when the field that design constitutes in the traffic table, just can directly use business element to come the type of define field like this, business element definition step is: (1) finds the business element maintenance tool (seeing " business element definition " among Figure 16) in the modelling instrument, and click and open the business element maintenance interface, (2) in the business element maintenance interface, click " increasing newly " and open new business element interface (seeing Figure 17), (3) incoming traffic element term, the business element definition is preserved and finished to information such as type, (4).As table 4 is completed partial service element definition information.
The traffic table definition: traffic table is the most basic data structure that constitutes the operation system canned data, is the relation table of a two dimension.Each row is used to represent the formation attribute of a business object, in computer system, also cry field or territory, each row is used to represent an object data, be exactly to constitute simple three table (sales order master meters selling form ordering system shown in table 1,2,3, the sales order detail list, with a customer information table), the traffic table definition is exactly the field attribute that defines the attribute of traffic table and form this table.Business element item in the field attribute can be appointed as defined business element.Specify this field of back to use and store this field data with regard to the type of using business element, also can handle all business rules that on business element, define automatically.Traffic table definition step is: (1) finds traffic table maintenance (referring to " table definition " among Figure 16) in the modelling instrument, clicking and open traffic table maintenance interface (2) clicks " increasing newly " and opens new business surface and interface (referring to Figure 18) in the traffic table maintenance interface, (3) the incoming traffic table name claims, affiliated classification, former database name, information such as former table name, (5) add the field information (field name of this table, business element, information such as length), the traffic table definition is preserved and finished in (6).As table 5 is the information that traffic table 1,2,3 is defined, and table 6 is to the Field Definition information in the traffic table 1,2,3.
Table 1, traffic table-customer information table
Customer number |
Customer name |
Telephone number |
The contact person |
Account No. |
0001 |
Five-pointed star electronics corporation |
12345678 |
Zhang San |
111111111 |
Table 2, traffic table-sales order master meter
O/No. |
Customer name |
The business personnel |
Order goods the date |
The amount of money adds up to |
SO20100001 |
Five-pointed star electronics corporation |
Li Qiang |
2010-8-1 |
70000 |
Table 3, traffic table-sales order product table
Sequence number |
Name of product |
Lot-size |
Order unit price |
Subtotal |
Other attributes.。。 |
1 |
The A product |
10 |
2000 |
20000 |
|
2 |
The B product |
20 |
2500 |
50000 |
|
Table 4, basic model-business element definition information
Business element ID |
The business element title |
The business element another name |
Data type |
Other attributes.。。 |
1001 |
Quantity |
Quantity |
Decimal |
|
1002 |
Price |
Price |
Money |
|
1003 |
Money |
The amount of money |
Money |
|
1004 |
Date |
Date |
Datetime |
|
1005 |
SeqNo |
Sequence number |
Int |
|
1006 |
Name |
Title |
string |
|
1007 |
Telphone |
Telephone number |
string |
|
1008 |
BankAccount |
Account No. |
string |
|
Table 5, basic model definition---traffic table definition information
Traffic table ID |
The traffic table title |
The traffic table another name |
Former database name |
Former table name |
Affiliated classification |
2001 |
Sales order |
Sales order |
MyDB |
SaleOrder |
Form ordering system |
2002 |
The sales order detail |
The sales order detail |
MyDB |
?SaleOrderDetial |
Form ordering system |
2003 |
Customer information |
Customer data |
MyDB |
?Customer |
Form ordering system |
Table 6, basic model-traffic table Field Definition information
Traffic table ID |
Field ID |
Field name |
The field another name |
Business element |
Other attributes of field |
2001 |
200101 |
SaleOrderNo |
O/No. |
The document numbering |
|
2001 |
200102 |
Operator |
The business personnel |
Title |
|
2001 |
200103 |
OrderDate |
Order the date |
Date |
|
2001 |
200104 |
CustomerName |
Customer name |
Title |
|
2001 |
200105 |
Amount |
The amount of money adds up to |
The amount of money |
|
2002 |
200201 |
SaleOrderNo |
O/No. |
The document numbering |
|
2002 |
200202 |
SeqNo |
Sequence number |
Sequence number |
|
2002 |
200203 |
ProductName |
Name of product |
Title |
|
2002 |
200204 |
Qutity |
Lot-size |
Quantity |
|
2002 |
200205 |
Price |
Order unit price |
The amount of money |
|
2002 |
200206 |
SubTotal |
Subtotal |
The amount of money |
|
2003 |
200301 |
customerNo |
Customer number |
Sequence number |
|
2003 |
200302 |
CustomerName |
Customer name |
Title |
|
2003 |
200303 |
Phone |
Telephone number |
Telephone number |
|
2003 |
200304 |
Principal |
The contact person |
Title |
|
2003 |
200305 |
BankAccount |
Account No. |
Account No. |
|
Substantial definition information, entity among the present invention is meant a business object exercisable, that meaning is complete, as shown in Figure 2, an entity is made up of the function of some traffic table and some application entities, to substantial definition be exactly the traffic table formed of this entity of definition, adduction relationship between the traffic table and the function of entity.Entity function is exactly the set of the function of this solid data of operation.In the entity of basic model predefine the additions and deletions of traffic table change the functional definition information of looking into, the additions and deletions that the model running storehouse has comprised traffic table change looks into the function executing code, the designer can enable or forbid these functions by the modelling instrument, and complicated entity function is realized by plug-in unit.The substantial definition step is: (1) finds entity maintaining item (referring to " substantial definition " among Figure 16) in the modelling instrument, and click to open and realize that maintenance interface (2) clicks " increasing newly " and open newly-built entity interface (referring to Figure 19) in realizing maintenance interface, (3) input entity title, entity type, information such as entity classification, (4) navigate to the traffic table definition, click and add, add the traffic table of this entity and the relation between the design successively, (5) navigate to the business function definition, add the functional definition (6) of this entity and preserve and finish substantial definition.As table 7 is substantial definition information, and table 8 is the traffic table definition in the entity, and table 9 is the functional definition in the entity.
Table 7, basic model-substantial definition information
Entity ID |
The entity title |
Entity alias |
Other attributes.。。 |
3001 |
Ety_SaleOrder |
Sell the business of order |
|
Traffic table definition information in table 8, the basic model-entity
Business function definition information in table 9, the basic model-entity
Entity ID |
Functional identity |
The function title |
The function another name |
Other attributes.。。 |
3001 |
300101 |
Audit |
The order audit |
|
Interface definition information, the interface is the user interface of user's application entity object, the interface is made up of some interface controls as shown in Figure 2.The interface definition is exactly to define the software interface attribute of user's application entity and the control that the interface is formed.Entity of a unique performance in interface, but an entity can be by some user interface performances.As shown in figure 12, realize that as needs the particular interface effect also can define plug-in unit at contact bed and realize.Professional interface definition step is: (1) finds the interface to safeguard (referring to " the interface definition " among Figure 16) in the modelling instrument, and click and to open interface maintenance interface (2) and in the maintenance interface of interface, click the interface (referring to Figure 20) that " increasing newly " opens newly-built interface, (3) inputting interface title, select interface type, select classification under the interface, select the information such as entity of interface performance, (4) the control information of definition interfaces, interface control information can generate automatically, (5) menu of definition interfaces and toolbar information, (6) preserve and finish the interface definition, as table 10 is interface definition information, table 11 is the control definition information in the interface, interface control definition information, and table 12 is the menu definition information in the interface.
Table 10, basic model-interface definition information
Interface I D |
The interface title |
Entity ID |
Other attributes |
4001 |
UI_SaleOrder |
3001 |
|
Table 11, basic model-interface control definition information
Table 12, basic model-interface menu definition information
Interface I D |
Interface menu ID |
Pad name |
Menu function |
Other attributes |
5001 |
500101 |
Audit |
audit |
|
Step 2: the modelling instrument defines the corresponding business data structure according to the relevant information of being set up, and stores in the business datum storage unit;
The concrete steps of step 2 are as follows: the modelling instrument is according to traffic table definition information definition operational data structure, and the operational data structure in the generation business datum storage unit;
Step 3: analyze according to demand, the modelling instrument is set up the data of plug-in model, and is stored in the plug-in model data storage cell;
The concrete steps of step 3 are as follows:
3.1 modelling instrument creation facilities program (CFP) collection definition information;
3.2 modelling instrument creation facilities program (CFP) class definition information, and the procedure set under the appointment program class wherein;
3.3 the modelling instrument is set up plug-in unit definition information, specifies the program class that wherein realizes pin function;
3.4 with above-mentioned information stores in the plug-in model data storage cell;
Step 4: according to above-mentioned plug-in unit definition information, the modelling instrument is write corresponding insert and is realized category code, and compiling generates plug-in unit realization class method collection;
The concrete steps of step 4 are as follows:
4.1 according to plug-in unit definition information, the modelling instrument generates a plug-in unit and realizes the category code framework;
4.2 the modelling instrument is write plug-in unit according to plug-in unit realization category code framework and is realized category code;
4.3 the modelling instrument is realized the category code compiling and generates plug-in unit realizing the class method collection according to plug-in unit;
Step 5: the plug-in application definition information that the design tool that uses a model definition is corresponding with basic model, and store in the plug-in application data storage cell;
The concrete steps of step 5 are as follows:
The modelling instrument is quoted basic model definition information and plug-in model definition information, defines the plug-in application definition information corresponding with basic model, and stores in the plug-in application data storage cell;
Step 6: the runtime engine that uses a model operation basic model and plug-in model.
The concrete steps of step 6 are as follows: as shown in figure 10:
6.1 create basic model object and subobject thereof, the model running engine reads substantial definition information and interface definition information from the basic model data storage cell, generate the entity class object according to entity class, generates the interface class object according to the interface class;
6.2 create the plug-in unit of basic model class object, according to the basic model class object that has generated, read corresponding insert application definition information in the plug-in application data storage cell, the procedure set that reads in the plug-in model data storage cell according to plug-in application definition information defines information and program class definition information, creates plug-in unit realization class object according to the program class that the assembly name in the procedure set definition information calls in the corresponding procedure set; And the plug-in unit created realized that class object is recorded in the plug-in adapter class object of basic model class object;
Realize the related of class object 6.3 set up the basic model class object with plug-in unit, after plug-in unit realized that class object is recorded in the plug-in adapter class object, the plug-in unit method of enabling of calling basic model object and subobject thereof is set up plug-in unit and is realized the related of class correlation method and basic model class object and subobject incident thereof, this plug-in unit is enabled the activation attribute that each plug-in unit that is provided with in the method in the plug-in adapter class object is realized class object, this activates attribute can set up basic model class object and subobject thereof when activating incident and plug-in unit and realizes the related of correlation method in the class object, and this activates the related of correlation method in attribute can disconnect basic model class object and subobject thereof when forbidding incident and the plug-in unit realization class object;
6.4 in the operational process, plug-in unit is realized the incident of class object response basic model class object and subobject thereof and is carried out correlation method and finish pin function;
Realize getting in touch of class object correlation method 6.5 basic model class object and subobject thereof disconnect its incident and plug-in unit earlier before destruction, and destroy plug-in unit and realize class object;
6.6 destroy basic model class object and subobject thereof.
Second kind of application plug-in expands the method for model-driven development ability, may further comprise the steps:
Step 1: analyze according to demand, the modelling instrument is set up substantial definition information and the interface definition information that the model running engine moves according to this and is stored in the basic model data storage cell;
The concrete steps of step 1 are as follows:
1.1 the modelling instrument is set up business element definition information;
1.2 the modelling instrument is quoted business element definition information and is set up traffic table definition information;
1.3 the modelling instrument is quoted traffic table definition information and is set up substantial definition information;
1.4 modelling instrument reference entity definition information is set up interface definition information;
1.5 with above-mentioned information stores in the basic model data storage cell;
Step 2: the modelling instrument defines the corresponding business data structure according to the relevant information of being set up, and stores in the business datum storage unit; The concrete steps of described step 2 are as follows:
The concrete steps of step 2 are as follows: the modelling instrument is according to traffic table definition information definition operational data structure, and the operational data structure in the generation business datum storage unit;
Step 3: analyze according to demand, the modelling instrument is set up the data of plug-in model, and is stored in the plug-in model data storage cell;
The concrete steps of step 3 are as follows:
3.1 modelling instrument creation facilities program (CFP) collection definition information;
3.2 modelling instrument creation facilities program (CFP) class definition information, and the procedure set under the appointment program class wherein;
3.3 the modelling instrument is set up plug-in unit definition information, specifies the program class that wherein realizes pin function;
3.4 with above-mentioned information stores in the plug-in model data storage cell;
Step 4: according to above-mentioned plug-in unit definition information, the modelling instrument is write corresponding insert and is realized category code, and compiling generates plug-in unit realization class method collection;
The concrete steps of step 4 are as follows:
4.1 according to plug-in unit definition information, the modelling instrument generates a plug-in unit and realizes the category code framework;
4.2 the modelling instrument is write plug-in unit according to plug-in unit realization category code framework and is realized category code;
4.3 the modelling instrument is realized the category code compiling and generates plug-in unit realizing the class method collection according to plug-in unit;
Step 5: the plug-in application definition information that the design tool that uses a model definition is corresponding with basic model, and store in the plug-in application data storage cell, generate the corresponding insert load classes simultaneously, and be stored in the program class definition information, simultaneously the plug-in unit load classes that generates is compiled and merges in the plug-in unit load classes procedure set;
The concrete steps of step 5 are as follows: the modelling instrument is quoted basic model definition information and plug-in model definition information, define the plug-in application definition information corresponding with basic model, and store in the plug-in application data storage cell, generate the corresponding insert load classes simultaneously, and be stored in the program class definition information, simultaneously the plug-in unit load classes that generates is compiled and merges in the plug-in unit load classes procedure set;
Step 6: the runtime engine that uses a model operation basic model and plug-in model.
The concrete steps of step 6 are as follows:
6.1 create basic model class object and subobject thereof, the model running engine reads substantial definition information and interface definition information from the basic model data storage cell, generate the entity class object according to entity class, generates the interface class object according to the interface class;
6.2 create the plug-in unit of basic model class object, according to the basic model class object that has generated, read corresponding insert application definition information in the plug-in application data storage cell, the procedure set that reads in the plug-in model data storage cell according to plug-in application definition information defines information and program class definition information, creates plug-in unit realization class object according to the corresponding stowage of plug-in unit load classes that the assembly name in the procedure set definition information calls in the plug-in unit load classes procedure set; And plug-in unit realized that class object records in the card i/f tabulation in the plug-in adapter class object of basic model class object;
6.3 set up the related of basic model class object and plug-in unit, after plug-in unit being registered in the card i/f tabulation of plug-in adapter class object, the plug-in unit method of enabling of calling basic model class object and subobject thereof is set up plug-in unit and is realized the related of class object and basic model class object and subobject incident thereof, this plug-in unit is enabled the activation attribute that each plug-in unit that is write down in the card i/f tabulation that the plug-in adapter class object is set in the method is realized class object, and this activates the related of correlation method in attribute can set up basic model class object and subobject thereof when activating incident and the plug-in unit realization class object; The model running engine can also disconnect the related of plug-in unit and basic model object in when operation, and revises its plug-in unit parameter, rebulids related with the basic model object after the modification again.
6.4 in service, plug-in unit is realized the incident of class object response basic model class object and subobject thereof and is carried out correlation method and finish pin function;
Realize getting in touch of class object correlation method 6.5 disconnect its incident and plug-in unit before the basic model class object is destroyed earlier, and destroy plug-in unit and realize class object;
6.6 destroy basic model class object and subobject thereof.
As shown in figure 14, the basic model among the present invention can be inherited mutually, and submodel has all 26S Proteasome Structure and Functions of father's model after inheriting father's model automatically.Beneficial effect is under model driving development method can more effective recycling model and be defined in plug-in unit on the model, such as all realizing this function automatically as long as realize on top interface that a function is then inherited in the definition of the interface at this interface.Defined a sub-window interface ChildFormBase as Figure 21, wherein defined basic menu item, and interface definition (referring to the succession interface item among Figure 20) is since then inherited in the definition of the interface of Figure 20, so the operation of the interface of Figure 20 can have defined menu item among Figure 21 later automatically, as shown in figure 22.
As shown in Figure 2, the basic model among the present invention has the relation that comprises in logic, includes traffic table definition and entity function definition such as solid model, and the interface definition comprises control definition, interface function definition and the definition of menu facility bar.In the present invention, all have the basic model of father's model all can construct an attribute Owner who points to father's model object when the tectonic model object, the effect of doing like this of having a mind to is to realize can visiting and control the basic model object more easily in the category code compiling procedure at plug-in unit.Realize in the category code and can have access to traffic table under the field such as a plug-in unit that is defined in field level by this.Owner.
Model data store of the present invention unit and business datum storage unit are low couplings, and a set of model data storage cell can be described some cover business datum storage unit.
Procedure set definition information: procedure set is the executable code set after the compiling of program category code, and procedure set is exactly the set of component software, and procedure set of the present invention is divided into serve end program collection, client-side program collection, common program collection.Procedure set can be appointed as dynamic assembly and static routine collection, dynamic assembly is meant the procedure set that can make up dynamically and safeguard in operational process, the static routine collection is meant in the operational process can only the calling program collection and can not the update routine collection, the procedure set definition is described registration to the procedure set information that refers in the model running exactly in the model data store unit, procedure set definition step is: (1) finds procedure set to safeguard (referring to " program assembly " among Figure 16) in the modelling instrument, and click and open the procedure set maintenance interface, (2) in this interface, click " increasing newly " and open newly-built assembly interface (referring to Figure 23), (3) the loading routine set name claims, the procedure set type, the procedure set position, whether is dynamic dispatching information, the procedure set definition is preserved and finished in (4).The model running engine is according to dynamic maintenance program collection of these definition information and use program class wherein.Plug-in unit among the present invention realizes that the destination file after the class compiling is exactly the dynamic assembly file.Only being appointed as dynamic assembly could be increased to the program category information that dynamically generates in the corresponding procedure set in operational process.Be procedure set definition information as table 13.
Table 13, plug-in model-procedure set definition information
Procedure set ID |
Assembly name |
The procedure set type |
Whether be dynamic |
Explanation |
6001 |
Asm.CommPlugin |
Public plug-in unit |
Not |
|
6002 |
Asm.SaleOrder.ClientPlugin |
Client plug-in |
Be |
|
6003 |
Asm.SaleOrder.ServerPlugin |
The service end plug-in unit |
Not |
|
Program class definition information: the program class is a kind of function code set that structure is arranged, the said program class of the present invention is meant pin function realization class and plug-in unit load classes, write and use a plug-in unit before earlier in the plug-in model storage unit this pin function of definition realize category information, the program class definition is described registration to the program category information with the modelling instrument exactly in the plug-in model data storage cell, program class definition step is: (1) finds the program class to safeguard (referring to " the program class " among Figure 16) in the modelling instrument, and click and open program class maintenance interface, in this interface, click " increasing newly " button and open newly-increased program class interface (referring to Figure 24), (2) loading routine class title, select the corresponding programme collection, (3) select affiliated type, the program class definition is preserved and finished in (4).The model running engine is realized pin function according to the concrete program class object of the dynamic structure of these descriptors in the loading of plug-in process.As table 14 is the program class definition information that form ordering system is used.
Table 14, plug-in model-program class definition information
The plug-in unit definition: plug-in unit of the present invention is made up of plug-in unit realization class and plug-in unit load classes, plug-in unit realizes that class is used to realize pin function, the plug-in unit load classes is used for loading plug-in unit and realizes the plug-in adapter of class object to the basic model object, the plug-in unit definition is exactly with the modelling instrument plug-in unit to be realized that class and parameter information thereof are described registration in the plug-in model storage unit, plug-in unit definition step is: (1) finds plug-in unit to safeguard (referring to " the plug-in unit definition " among Figure 16) in the modelling instrument, and click and to open plug-in unit definition maintenance interface (2) and in this interface, click " increasing newly " and open plug-in unit definition interfaces (referring to Figure 25), (3) input plugin name, appointment can be inserted the model object type, the given client end is handled class, the specified services end is handled class, each parameter information of specific plug-in (referring to Figure 26) (parameter name, parameter type, parameter default values etc.), the plug-in unit definition is preserved and finished in (4).As table 15 is the plug-in unit definition information that form ordering system is used.Table 16 is the parameter-definition information of plug-in unit in the form ordering system.
Table 15, plug-in model-plug-in unit definition information
Table 16, plug-in model-plug-in unit parameter-definition information
Write plug-in unit and realize class: plug-in unit realizes that class is to finish the program code segments of pin function, plug-in unit realization class is finished pin function by the message of response basic model object, plug-in unit realization class is loaded type by plug-in unit and is created automatically behind the basic model Object Creation, discharge before the basic model object discharges.Write a plug-in unit and realize that the type step is:
(1) design tool that uses a model automatically generates a defined plug-in unit and realizes the category code framework;
(2) the insert design personnel write the realization category code of pin function according to use a model design tool or the third party's instrument of category code framework and business function demand of realizing;
(3) compiling and generation plug-in unit were realized the class method collection after plug-in unit realization class was write and finished.
The plug-in application definition information that the design tool that uses a model definition is corresponding with basic model: when utilizing the modelling instrument still can't finish the complicated business functional requirement after the basic modeling, can utilize plug-in model that the basic model object is carried out expanded definition to software systems.Application plug-in is expanded basic model object step and is opened basic model design interface (referring to Figure 17 to Figure 21) for (1) design tool that uses a model, select the basic model object that to use the plug-in unit expanded function, (2) click " plug-in unit " item and open plug-in unit definition interfaces (referring to Figure 27), click " PluginName " meeting and eject plug-in unit selection window (referring to Figure 28), select to select in the window a defined plug-in unit at plug-in unit, at this basic model object business function the plug-in unit parameter need be set, (3) are preserved definition and are finished the expansion of business model function.As shown in figure 27, the modelling instrument can realize that category information and parameter-definition information generate the loading type code of plug-in unit automatically and register a plug-in unit load classes definition information in program class definition information and a loading code that generates is stored in the category code item in the lump according to plug-in unit, and the model running engine is created the object of plug-in unit realization class according to the information dynamic call plug-in unit load classes of this registration.The class that generates with general code masterplate is different, and this load classes code only comprises the loading code, and does not comprise code, and the plug-in unit load classes is dynamically to generate plug-in unit load classes code according to all plug-in units that are attached on the basic model object.The plug-in unit parameter can be constant, variable, expression formula, script and code snippet.Abundant plug-in unit parameter type can provide powerful universal card function flexibly by adjusting parameter.As shown in figure 13, a basic model object can use several plug-in units to expand its function simultaneously, and same plug-in unit also can come to provide service for different basic model objects by adjusting parameter.As table 17, the 18th, to the plug-in application definition information of using in the form ordering system.
Table 17, plug-in application definition information-plug-in unit part
Table 18, plug-in application definition information-argument section
Moving model: as shown in Figure 9, the model running process is as follows:
(1) reads in the basic model storage unit substantial definition information and related interfaces definition information and from the plug-in application data storage cell, find out corresponding with it plug-in application definition information behind the model running engine start;
(2) realize class according to basic model class and plug-in unit, in internal memory, create basic model class object and plug-in unit realization class object;
(3) then operation display interface and wait for that the user operates;
(4) user carries out business processing by the function software interface;
(5) the basic model class object calls correlation method access service data storage cell access business datum in needs access business datum, finishes software function.
Maintenance Model: use the concrete good maintainability of software systems of the present invention's exploitation, can carry out the visual software model of checking, revise at system's run mode and carry out software maintenance, and can see operational effect at run mode at any time.Software document also can the change synchronously automatically with Maintenance Model.The software that application the inventive method is developed has solved the problem difficult in maintenance that commonsense method develops software, the present invention is that the development approach at center makes the construction cycle of software shorten with the model, software life-cycle is elongated, is the intelligent software system that can change with subscriber service system.Model is exactly a software, and model is exactly a document, is exactly maintenance to software to the maintenance of model.
Terminological interpretation:
Basic model: constitute the structure of software building block, function, the description definition at interface;
Plug-in model: the plug-in unit of expanding software basic model is described definition;
The basic model object: concrete basic model has business element, field, traffic table, entity, function, menu, control etc.;
The basic model class: be used to define the program class of basic model object structure, the business element class is arranged, the field class, the traffic table class, entity class, function class, control class is corresponding one by one with the basic model object;
The basic model class object: the basic model class object just is in the postrun internal memory performance of basic model class;
Plug-in unit: plug-in unit be a kind of can be with the reusable component software that further describes the basic model object of parameter;
Plug-in unit is realized class: the program class that realizes pin function;
Plug-in unit is realized class object: plug-in unit is realized the postrun internal memory performance of class;
Plug-in unit load classes: be used for plug-in unit is realized that class object creates and register to the program class of plug-in adapter that the plug-in unit load classes realizes class object creating the plug-in unit that the parameter information of plug-in unit can be passed to establishment when plug-in unit is realized class object; The plug-in unit load classes is to be generated by the definition information and the parameter-definition information of modelling instrument according to plug-in unit;
Plug-in component operation storehouse: contain one or more procedure sets or dynamic link library that plug-in unit is realized class;
Procedure set: procedure set is a kind of file that contains routine data and code, wherein can comprise a plurality of program classes; Can call for other programs or procedure set;
Dynamic link library: dynamic link library is a kind of file that contains routine data and code, wherein can comprise a plurality of program classes; Can supply other programs or dynamic link library call;
Agent object: be the object that the plug-in unit with respect to plug-in unit adheres to, basic model object just.