CN100410877C - Method of operating interface of definition to object mould - Google Patents

Method of operating interface of definition to object mould Download PDF

Info

Publication number
CN100410877C
CN100410877C CNB2006101099861A CN200610109986A CN100410877C CN 100410877 C CN100410877 C CN 100410877C CN B2006101099861 A CNB2006101099861 A CN B2006101099861A CN 200610109986 A CN200610109986 A CN 200610109986A CN 100410877 C CN100410877 C CN 100410877C
Authority
CN
China
Prior art keywords
xsd
interface
name
behavior
transaction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CNB2006101099861A
Other languages
Chinese (zh)
Other versions
CN1912830A (en
Inventor
邬浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2006101099861A priority Critical patent/CN100410877C/en
Publication of CN1912830A publication Critical patent/CN1912830A/en
Application granted granted Critical
Publication of CN100410877C publication Critical patent/CN100410877C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

A method for defining operation interface of object-oriented model includes separating object behavior from object definition in object-oriented model and setting up behavior set and definition set separately, using two said sets as parameter to define a static affairs interface, selecting and combining various behaviors and objects of static affairs interface according to actual service scene requirements for dynamically satisfying concrete affairs interface required by actual service scene.

Description

The method of the operation-interface of definition object oriented programming model
Technical field
The present invention relates to computer application field, relate in particular to a kind of method that defines the operation-interface of object oriented programming model.
Background technology
The progressively enhancing of the introducing of object-oriented modeling technology and the function of object oriented language and perfect significantly reduces the construction cycle of software, cost of development, make the software systems assembly reusable, can expand, maintainable ability promotes greatly.In addition, the introducing of ASN.1 (abstract syntax notation one) standard and supporting middleware thereof are to shining upon, transmit and the decoding mapping ability towards the good expression of object data form, coding, make people define communication interface between software systems assembly or the distributed software system, OO method of thinking is extended to the whole software system from the software systems component internal with OO method of thinking.
Continuous maturation along with XML (extend markup language) language and XML Scheme (XML scheme), the syntax and semantics of interface can be described with XML Scheme, XML Scheme is the data structure definition that can directly be mapped as other Object-Oriented Programming Languages (as C++, Java), thereby remedied the deficiency of Asn.1 aspect the interface extendability, for OO interface definition has injected more fresh and alive blood.
The design of object-oriented software usually will be through setting up administrative model, defining operation-interface and three steps of realization operation-interface to administrative model, and the present invention only discusses and sets up administrative model and definition two steps of operation-interface to administrative model.
The basis of object-oriented modeling is that object is abstract, promptly constructs the object model of real world from the problem description of real world, determines the interaction between static structure, object functionality and the object of object.Such as, the administrative model of student's curricula-variable system can be represented with entity relationship diagram shown in Figure 1.
The visit that the operation-interface of administrative model is mainly used between component software or software systems is called.With student's curricula-variable system is example, the synoptic diagram that between component software, conducts interviews by operation-interface as shown in Figure 2, the synoptic diagram that conducts interviews between software systems by operation-interface is as shown in Figure 3.
A kind of method that defines the operation-interface of object oriented programming model is in the prior art: define corresponding Fine-Grained (fine grained) interface respectively at single entity in the object model or the incidence relation between the entity.I.e. every kind of behavior at every class object in the administrative model all defines a Fine-Grained message interface.With above-mentioned student's curricula-variable system is example, needs respectively at school's entity, at being entity and all defining the certain operations interface at every kind of behavior of student's entity.With above-mentioned student's curricula-variable system is example, need define at school's entity that to create be request of operating and response interface, deletion are request of operating and operation-interfaces such as the request of response interface, establishment student's request of operating and response interface and modification school property operations and response interface.The specific descriptions of each interface are as follows:
1: establishment is request of operating and response interface.
<xsd:element?name=″createDepartmentRequest″>
<xsd:complexType>
<xsd:sequence>
<xsd:element?name=″name″type=″xsd:string″/>
<xsd:element?name=″extended?attribute″type=″xsd:any″/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element?name=″createDepartmentResponse″>
<xsd:complexType>
<xsd:sequence>
<xsd:element?name=″result″type=″xsd:boolean″/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
2: deletion is request of operating and response interface.
<xsd:element?name=″deleteDepartmentRequest″>
<xsd:complexType>
<xsd:sequence>
<xsd:element?name=″name″type=″xsd:string″/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element?name=″deleteDepartmentResponse″>
<xsd:complexType>
<xsd:seq?uence>
<xsd:element?name=″result″type=″xsd:boolean″/>
</xsd:seq?uence>
</xsd:complexType>
</xsd:element>
3: create student's request of operating and response interface.
<xsd:element?name=″createStudentRequest″>
<xsd:complexType>
<xsd:sequence>
<xsd:element?name=″name″type=″xsd:string″/>
<xsd:element?name=″age″type=″xsd:integer″/>
<xsd:element?name=″sex″type=″xsd:string″/>
<xsd:element?name=″extended?attribute″type=″xsd:any″/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
4, revise the request and the response interface of school's property operations.
<xsd:element?name=″modifySchoolRequest″>
<xsd:complexType>
<xsd:sequence>
<xsd:element?name=″name″type=″xsd:string″/>
<xsd:element?name=″location″type=″xsd:string″/>
<xsd:element?name=″extended?attribute″type=″xsd:any″/>
</xsd:sequence>
</xsd:com?plexType>
</xsd:element>
Can also define other operation-interfaces at school's entity.
At be entity need define create course request of operating and response interface, revise set attribute request of operating and response interface, related student is to being that request of operating and response interface and releasing student are to being operation-interfaces such as incidence relation request of operating and response interface.The specific descriptions of each interface are as follows:
1, creates course request of operating and response interface.
<xsd:element?name=″createCourseRequest″>
<xsd:complexType>
<xsd:seq?uence>
<xsd:element?name=″name″type=″xsd:string″/>
<xsd:element?name=″creditHour″type=″xsd:integer″/>
<xsd:element?name=″extended?attribute″type=″xsd:any″/>
</xsd:seq?uence>
</xsd:complexType>
</xsd:el?ement>
2, revise set attribute request of operating and response interface.
<xsd:element?name=″modifyDepartmentRequest″>
<xsd:complexType>
<xsd:sequence>
<xsd:element?name=″name″type=″xsd:string″/>
<xsd:element?name=″location″type=″xsd:string″/>
<xsd:element?name=″extended?attribute″type=″xsd:any″/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
3, related student is to being request of operating and response interface.
<xsd:element?name=″associateStudentToDepartmentRequest″>
<xsd:complexType>
<xsd:sequence>
<xsd:element?name=″departmentName″type=″xsd:string″/>
<xsd:element?name=″studentName″type=″xsd:string″/>
</xsd:seq?uence>
</xsd:complexType>
</xsd:element>
4, remove the student to being incidence relation request of operating and response interface.
<xsd:element?name=″deassociateStudentToDepartmentRequest″>
<xsd:complexType>
<xsd:sequence>
<xsd:element?name=″departmentName″type=″xsd:string″/>
<xsd:element?name=″studentName″type=″xsd:string″/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
At being that entity can also define other operation-interfaces.
Need define the request of revising student's property operations and response interface, student's elective request of operating and response interface and student at student's entity and abandon operation-interfaces such as elective request of operating and response interface.The specific descriptions of each interface are as follows:
1, revises the request and the response interface of student's property operations.
<xsd:element?name=″modifyStudentRequest″>
<xsd:complexType>
<xsd:sequence>
<xsd:element?name=″name″type=″xsd:string″/>
<xsd:element?name=″age″type=″xsd:integer″/>
<xsd:element?name=″sex″type=″xsd:stri?ng″/>
<xsd:element?name=″extended?attribute″type=″xsd:any″/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
2, student's elective request of operating and response interface.
<xsd:element?name=″associateCourseToStudentRequest″>
<xsd:complexType>
<xsd:seq?uence>
<xsd:element?name=″studentName″type=″xsd:string″/>
<xsd:element?name=″courseName″type=″xsd:string″/>
</xsd:seq?uence>
</xsd:complexType>
</xsd:element>
3, the student abandons elective request of operating and response interface.
<xsd:element?name=″deassociateCourseToStudentRequest″>
<xsd:complexType>
<xsd:sequence>
<xsd:element?name=″studentName″type=″xsd:string″/>
<xsd:element?name=″courseName″type=″xsd:string″/>
</xsd:seq?uence>
</xsd:complexType>
</xsd:element>
Can also define other operation-interfaces at student's entity.
The shortcoming of the method for the operation-interface of the definition object oriented programming model of above-mentioned prior art is:
1, every kind of behavior at every class object in the administrative model all will define a message interface, and the various complexity of interface causes the maintenance of software systems extremely difficult.
2, can't support complicated things logic flexibly.For example, when a plurality of objects are operated on a certain affairs need be to administrative model, if do not use present interfaces for the new interface of this affairs definition, often need communicating pair repeatedly just can finish alternately, and wherein anyly carry out failure and all need both sides to increase extra mutual rollback to be carried out in the operation that runs succeeded previously once alternately.
With above-mentioned student's curricula-variable system is example, and certain department of computer science of school has offered data structure, two degrees classes of Fundamentals of Compiling, must repair this degree that is class if this school has certain student of regulation to select certain to be, otherwise not allow this student to select this to be.Suppose that Zhang San will add the department of computer science in this school, stipulate that according to school he must repair data structure, two degree classes of Fundamentals of Compiling.
The process that adds this business of department of computer science according to above-mentioned present interfaces definition configuration Zhang San is: call the associateStudentToDepartmentRequest interface earlier Zhang San is subordinate under the department of computer science, call the associateCourseToStudentRequest interface after running succeeded again and allow Zhang San select data structure, two degree classes of Fundamentals of Compiling.Suppose that the operation associateCourseToStudentRequest that allows Zhang San select data structure, two degree classes of Fundamentals of Compiling has failed because of some reason execution, then the requesting party must call the deassociateStudentToDepartmentRequest interface with Zhang San place to go from department of computer science, otherwise system state is just inconsistent.
3, when because business function strengthens when need increase new object role for example teaching in administrative model, and then must revise interface document is message interface of every kind of behavior increase of this role, the software interface expandability is very low.
Such as, when needs increase professor's entity in above-mentioned student's curricula-variable system, then need be at the following interface of professor's substantial definition:
1, revises the request and the response interface of professor's property operations
<xsd:element?name=″modifyProfessorRequest″>
<xsd:complex?Type>
<xsd:sequence>
<xsd:element?name=″name″type=″xsd:st?ring″/>
<xsd:element?name=″age″type=″xsd:integer″/>
<xsd:element?name=″sex″type=″xsd:string″/>
<xsd:element?name=″extended?attribute″type=″xsd:any″/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
2, professor selects postgraduate's request of operating and response interface
<xsd:element?name=″associateStudentToProfessorRequest″>
<xsd:complexType>
<xsd:sequence>
<xsd:element?name=″professorName″type=″xsd:string″/>
<xsd:element?name=″studentName″type=″xsd:string″/>
</xsd:sequence>
</xsd:com?plexType>
</xsd:element>
Summary of the invention
In view of above-mentioned existing in prior technology problem, the purpose of this invention is to provide a kind of method that defines the operation-interface of object oriented programming model, thereby can reduce the complicacy of operation-interface between object-oriented software or component software, reduce the maintenance workload of object-oriented software system.
The objective of the invention is to be achieved through the following technical solutions:
A kind of method that defines the operation-interface of object oriented programming model comprises step:
A, the object behavior in the object oriented programming model is separated with object definition, and set up corresponding behavior set and object set respectively;
B, be the transaction interface of a static state of parameter-definition with described behavior set and object set, and select and make up various actions and object in the transaction interface of described static state according to practical business scene needs, dynamically structure satisfies the concrete transaction interface of described practical business scene needs.
Described steps A specifically comprises:
With object class in the object oriented programming model become the object class definition with the directly related set of properties of interface operation, all object class definition in the object oriented programming model are combined form static object set;
The object class behavior is formed in the behavior directly related with interface operation of object class in the object oriented programming model, all object class behaviors in the object oriented programming model are combined form static behavior set.
But the object number of Dynamic Selection and combination in the described object set is 0 or a plurality of; But the behavior number of Dynamic Selection and combination is 0 or a plurality of in the described behavior set.
Described step B specifically comprises:
B1, be the coarse grained transaction interface of a static state of parameter type definition with the element of described behavior set and object set, the parameter of definition control affairs processing mode in this transaction interface;
B2, select and make up various actions and object in the described transaction interface according to practical business scene needs, and the parameter of selection control corresponding issued transaction mode, dynamically construct the concrete transaction interface that satisfies described practical business scene needs according to the parameter of the behavior and object and control affairs processing mode.
Described control affairs processing mode comprises: atom atomic mode and optimum efficiency bestEffort mode, wherein,
The issued transaction mode of atomic requires interface execution side handling by in the business process of this interface requests, as long as there have an operation to carry out in all transaction operations to be unsuccessful, then all operations carried out of front all will carry out rollback, and return failure result and give interface interchange side;
The issued transaction mode of bestEffort requires interface execution side handling by in the business process of this interface requests, when having the unsuccessful operation of execution in this transaction operation, as long as this carries out the processing that unsuccessful operation does not influence the subsequent operation of these affairs, then continue to carry out the subsequent operation of these affairs, and return success or the result of section processes failure gives interface interchange side.
Described step B2 specifically comprises:
At certain practical business scene, in the transaction interface of described static state, select the combination of one or more behaviors and object to construct the concrete transaction interface that satisfies these business scenario needs.
Described behavior set, object set and static transaction interface are described by extend markup language scheme XML Scheme or C++ or Java.
As seen from the above technical solution provided by the invention, the present invention is by separating object behavior with object definition, only define and safeguard the transaction interface of the Coarse-Grained (coarse particle) of a static state at an administrative model, when business realizing, dynamically select Action and Objects to be combined into the particular transaction interface that satisfies business demand under this scene flexibly according to different business scenario needs, thereby can satisfy interface needs complicated and changeable with constant interface definition, greatly reduce the complicacy of operation-interface between object-oriented software or component software, reduced maintenance workload.
Utilizing the present invention to work as does not need the alter operation interface when change takes place software feature, only need adapt to the software feature that is changed, promote the interface of object-oriented software system and the extended capability of software greatly in the combination of realization aspect adjustment Action and Objects.
The interface of a static state utilizing the present invention to define and safeguard can dynamically be described affairs semanteme complicated and changeable, express the complicated service logic.
The interface of a static state utilizing the present invention to define and safeguard is finished business configuration both sides and only need be carried out once mutual and affairs are carried out rollback voluntarily when carrying out failure, need not the requesting party and interferes.
Description of drawings
Fig. 1 is the entity relationship synoptic diagram of the administrative model of student's curricula-variable of the present invention system;
Fig. 2 is in student's curricula-variable of the present invention system, the synoptic diagram that conducts interviews between component software by operation-interface;
Fig. 3 is in student's curricula-variable of the present invention system, the synoptic diagram that conducts interviews between software systems by operation-interface;
Fig. 4 is the concrete processing flow chart of the embodiment of the method for the invention.
Embodiment
The invention provides a kind of method that defines the operation-interface of object oriented programming model, core of the present invention is: object behavior is separated with object definition, only define and safeguard the transaction interface of the Coarse-Grained (coarse particle) of a static state.
Describe the method for the invention in detail below in conjunction with accompanying drawing, the concrete treatment scheme of the embodiment of the method for the invention comprises the steps: as shown in Figure 4
Step 4-1, object behavior is separated with object definition, and set up corresponding behavior set and object set respectively.
The present invention separates the object behavior in this object-oriented administrative model when the operation-interface of an object-oriented administrative model of definition with object definition.All behaviors that are about to the every class object in this object-oriented administrative model separate with such definition of object.
Then, all behaviors with all objects in this object-oriented administrative model combine composition behavior set.All definition of object in this object-oriented administrative model are combined, form definition set.
With above-mentioned student's curricula-variable system is example, can collect and be organized into the object class definition respectively by the attribute that each object class in the administrative model is directly related with interface operation, the attribute that the optional requirement of each object class occurs in the administrative model all can be used as optional attribute, ignores simultaneously and the incoherent built-in attribute of interface operation.Can obtain the definition of following object class thus:
School's (supposing simply to form) by the title name of school, address location location and other attributes extendedattribute:
<xsd:complexType?name=″School_T″>
<xsd:all>
<xsd:element?name=″name″type=″xsd:string″/>
<xsd:element?name=″location″type=″xsd:string″minOccurs=0/>
<xsd:element?name=″extended?attribute″type=″xsd:any″
minOccurs=0/>
</xsd:all>
</xsd:complexType>
Student's (supposing simply to form) by title name, age age, sex sex and other attributes extendedattribute:
<xsd:complexType?name=″Student_T″>
<xsd:all>
<xsd:element?name=″name″type=″xsd:string″/>
<xsd:element?name=″age″type=″xsd:integer″minOccurs=0/>
<xsd:element?name=″sex″type=″xsd:string″minOccurs=0/>
<xsd:element?name=″extended?attribute″type=″xsd:any″minOccurs=0/>
</xsd:all>
</xsd:complexType>
(supposing the simply to form):<xsd:complexType name=" Department_T " of system〉by title name and other attributes extended attribute
<xsd:all>
<xsd:element?name=″name″type=″xsd:string″/>
<xsd:element?name=″extended?attribute″type=″xsd:any″minOccurs=0/>
</xsd:all>
</xsd:complexType>
Course (supposing simply to form) by title name, class hour creditHour and other attributes extended attribute:
<xsd:complexType?name=″Course_T″>
<xsd:all>
<xsd:element?name=″name″type=″xsd:string″/>
<xsd:element?name=″creditHour″type=″xsd:integer″minOccurs=0/>
<xsd:element?name=″extended?attribute″type=″xsd:any″minOccurs=0/>
</xsd:all>
</xsd:complexType>
Example with above-mentioned object class is the object set MngObjects that parameter can be defined as follows, the object support 0 among the MngObjects~numerous:
<xsd:element?name=″MngObjects″>
<xsd:complexType>
<xsd:all>
<xsd:element?name=″school″type=″School_T″maxOccurs=″unbounded″minOccurs=″0″/>
<xsd:element?name=″student″type=″Student_T″maxOccurs=″unbounded″minOccurs=″0″/>
<xsd:element?name=″department″type=″Department_T″maxOccurs=″unbounded″minOccurs=″0″/>
<xsd:element?name=″course″type=″Course_T″maxOccurs=″unbounded″minOccurs=″0″/>
</xsd:all>
</xsd:com?plexType>
</xsd:element>
Then, analyze and add up all object class behavior directly related in the above-mentioned administrative model, do not need to collect, the behavior of collecting is organized into the behavior set for the internal act of object class with operation-interface.School, student in above-mentioned student's curricula-variable administrative model, be that the behavior set directly related with operation-interface may be defined as with four object class of course:
<xsd:simpleType?name=″Action_T″>
<xsd:restriction?base=″xsd:string″>
<xsd:enumeration?value=″create″/>
<xsd:enumeration?value=″modify″/>
<xsd:enumeration?value=″delete″/>
<xsd:enumeration?value=″associate″/>
<xsd:enumeration?value=″deassociate″/>
</xsd:restriction>
</xsd:simpleType>
Step 4-2, be the transaction interface of a static state of parameter type definition, and select various actions and object in this transaction interface of combination according to the business scenario actual needs with behavior set and object set.
After having set up above-mentioned behavior set and object set respectively, then, be the transaction interface of the Coarse-Grained of a static state of parameter type definition with above-mentioned behavior set and object set.The transaction interface of the Coarse-Grained that this is static is the unique interface in the above-mentioned Object Management group model, all behaviors and such definition of object of the every class object in can corresponding above-mentioned Object Management group model.
In the time need constructing concrete transaction interface according to the practical business scene, select, make up various actions and object in the transaction interface of Coarse-Grained of above-mentioned static state according to these practical business scene needs, dynamically structure satisfies the concrete transaction interface of these practical business scene needs.
Therefore, in actual applications, the behavior in the transaction interface of the Coarse-Grained of above-mentioned static state can be made up according to different practical business scenes when software is realized neatly with object.Thereby can satisfy various particular traffic requirements under the various special scenes, and then reach with constant interface definition and satisfy interface needs complicated and changeable.
Be the transaction interface that example is described above-mentioned static state with above-mentioned student's curricula-variable system below.At first can be the following set of interfaces actionObjects set of parameter-definition:<xsd:element name=" actionObjects " with the element of above-mentioned behavior Action set and object set MngObjects 〉
<xsd:complexType>
<xsd:all>
<xsd:element?name=″act″type=″Action_T″/>
<xsd:element?name=″objects″ref=″MngObjects″/>
</xsd:all>
</xsd:complexType>
</xsd:element>
Above-mentioned actionObjects gathers the object that shows in the objects set can carry out the act behavior in order.Can comprise operations such as above-mentioned create, modify, delete, associate and deassociate in the act behavior.
Then, can be following static transactions requests interface of parameter-definition and static transaction response interface with the element of above-mentioned MngObjects set.
Static transactions requests interface transactionRequest can be defined as:
<xsd:element?name=″transactionRequest″>
<xsd:complexType>
<xsd:sequence>
<xsd:element?name=″transactionName″type=″xsd:string″/>
<xsd:element?name=″transactionMethod″>
<xsd:simpleType>
<xsd:restriction?base=″xsd:string″>
<xsd:enumeration?value=″atomic″/>
<xsd:enumeration?value=″bestEffort″/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element?maxOccurs=″unbounded″minOccurs=″1″ref=″actionObjects″/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Parametric t ransactionName among the above-mentioned transactionRequest is used to specify the title of calling affairs that this interface is finished under certain scene.
Parametric t ransactionMethod among the above-mentioned transactionRequest is used to indicate interface interchange side and requires interface execution side to carry out this interface requests in the mode of atomic (atom) or in bestEffort (optimum efficiency) mode.
All operations in the affairs that the atomic mode requires to describe in the interface is successful execution or do not carry out all, promptly unsuccessful as long as there is an operation to carry out in all operations, then all operations carried out of front all will carry out rollback, and return failure result and give interface interchange side.
The issued transaction mode of bestEffort requires interface execution side handling by in the business process of this interface requests, when having the unsuccessful operation of execution in this transaction operation, as long as this carries out the processing that unsuccessful operation does not influence the subsequent operation of these affairs, then continue to carry out the subsequent operation of these affairs, and return success or the result of section processes failure gives interface interchange side.
Parameter actionObjects among the above-mentioned transactionRequest is used for when realizing selecting according to practical business scene needs in corresponding objects of above-mentioned MngObjects set and the Action_T set corresponding action to make up describing interface.In a transactions requests interface actionObjects can have a plurality of, to support that a certain affairs require different objects are carried out different action.
Static transaction response interface transactionResponse is used to describe the execution result of corresponding transactionRequest, can be defined as:
<xsd:element?name=″transactionResponse″>
<xsd:complexType>
<xsd:sequence>
<xsd:element?name=″transactionResult″type=”xsd:string”/>
<xsd:element?name=″actionObjectsResult″type=”xsd:string”maxOccurs=″unbounded″minOccurs=″1″/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
TransactionResult parameter among the above-mentioned transactionResponse is used to describe the execution result (success, failure or other specific descriptions) of request transaction.
ActionObjectsResult parameter among the above-mentioned transactionResponse is used for specifically describing the implementation status of each actionObjects of request transaction, and concrete definition can be carried out according to service needed.
With above-mentioned student's curricula-variable system is example, and the present invention also provides the specific embodiment of above-mentioned transactionRequest interface.
Department of computer science is created by embodiment 1:A university, and department of computer science offers data structure, two degree classes of Fundamentals of Compiling.
At the practical business scene of the foregoing description 1, need in above-mentioned behavior set " Action_T ", select a behavior operation " create "; Simultaneously in above-mentioned object class definition, select corresponding object: be<" Department 〉, course<course, and some base attributes of definite Object Side, course.The issued transaction mode of the transaction interface of the practical business scene of definite the foregoing description 1 is bestEffort simultaneously.
Then, according to the behavior operation and the object of above-mentioned selection, the concrete transaction interface of the practical business scene needs that utilize above-mentioned transactionRequest interface dynamically to construct to satisfy the foregoing description 1.This concrete transaction interface can specifically describe and be:
<transactionRequest>
<transactionName〉create department of computer science and its course</transactionName
<transactionMethod>bestEffort</transactionMethod>
<actionObjects>
<act>create</act>
<objects>
<department>
<name〉A university. department of computer science</name 〉
<extended attribute〉other attribute relevant with department of computer science</extendedattribute 〉
</department>
<course>
<name〉A university. department of computer science. data structure</name 〉
<creditHour>85</creditHour>
<extended attribute〉other attributes relevant with the data structures course</extendedattribute 〉
</course>
<course>
<name〉A university. department of computer science. Fundamentals of Compiling</name 〉
<creditHour>100</creditHour>
<extended attribute〉other attributes relevant with the Fundamentals of Compiling course</extendedattribute 〉
</course>
</objects>
</actionObjects>
</transactionRequest>
Embodiment 2: Zhang San will add the department of computer science in A school, according to stipulating that he must repair two degrees classes of data structure, Fundamentals of Compiling in the foregoing description 1.
At the practical business scene of the foregoing description 2, need in above-mentioned behavior set " Action_T ", select a behavior operation " associate "; Simultaneously in above-mentioned object class definition, select corresponding object: be<" Department 〉, student<student, course<course, and some base attributes of definite Object Side, student, course.The issued transaction mode of the transaction interface of the practical business scene of definite the foregoing description 2 is atomic simultaneously.
Then, the behavior operation and the object of above-mentioned selection made up the concrete transaction interface of the practical business scene needs that utilize above-mentioned transactionRequest interface dynamically to construct to satisfy the foregoing description 2.This concrete transaction interface can specifically describe and be:
<transactionRequest>
<transactionName〉Zhang San add department of computer science and select course</transactionName
<transactionMethod>atomic</transactionMethod>
<actionObjects>
<act>associate</act>
<objects>
<department>
<name〉A university. department of computer science</name 〉
</department>
<student>
<name〉A university. Zhang San</name 〉
</student>
</objects>
</actionObjects>
<actionObjects>
<act>associate</act>
<objects>
<student>
<name〉A university. Zhang San</name 〉
</student>
<course>
<name〉A university. department of computer science. data structure</name 〉
</cousrse>
<course>
<name〉A university. department of computer science. Fundamentals of Compiling</name 〉
</course>
</objects>
</actionObjects>
</transaction?Request>
In the concrete transaction interface of the practical business scene correspondence of the foregoing description 2, add department of computer science and Zhang San selects two concrete behaviors of course at Zhang San, use twice behavior operation associate, further illustrated the dirigibility of the above-mentioned transactionRequest interface of the present invention's proposition.
The XML Scheme that uses in the described method of the invention described above can change mutually with the type definition that other language such as C++, Java describe, so the treatment scheme of the described method of the invention described above also is applicable to other language such as C++, Java and waits the interface definition method of describing.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (7)

1. a method that defines the operation-interface of object oriented programming model is characterized in that, comprises step:
A, the object behavior in the object oriented programming model is separated with object definition, and set up corresponding behavior set and object set respectively;
B, be the transaction interface of a static state of parameter-definition with described behavior set and object set, and select and make up various actions and object in the transaction interface of described static state according to practical business scene needs, dynamically structure satisfies the concrete transaction interface of described practical business scene needs.
2. method according to claim 1 is characterized in that, described steps A specifically comprises:
With object class in the object oriented programming model become the object class definition with the directly related set of properties of interface operation, all object class definition in the object oriented programming model are combined form static object set;
The object class behavior is formed in the behavior directly related with interface operation of object class in the object oriented programming model, all object class behaviors in the object oriented programming model are combined form static behavior set.
3. method according to claim 2 is characterized in that, but the object number of Dynamic Selection and combination is 0 or a plurality of in the described object set; But the behavior number of Dynamic Selection and combination is 0 or a plurality of in the described behavior set.
4. according to claim 1,2 or 3 described methods, it is characterized in that described step B specifically comprises:
B1, be the coarse grained transaction interface of a static state of parameter type definition with the element of described behavior set and object set, the parameter of definition control affairs processing mode in this transaction interface;
B2, select and make up various actions and object in the described transaction interface according to practical business scene needs, and the parameter of selection control corresponding issued transaction mode, dynamically construct the concrete transaction interface that satisfies described practical business scene needs according to the parameter of the behavior and object and control affairs processing mode.
5. method according to claim 4 is characterized in that, described control affairs processing mode comprises: atom atomic mode and optimum efficiency bestEffort mode, wherein,
The issued transaction mode of atomic requires interface execution side handling by in the business process of this interface requests, as long as there have an operation to carry out in all transaction operations to be unsuccessful, then all operations carried out of front all will carry out rollback, and return failure result and give interface interchange side;
The issued transaction mode of bestEffort requires interface execution side handling by in the business process of this interface requests, when having the unsuccessful operation of execution in this transaction operation, as long as this carries out the processing that unsuccessful operation does not influence the subsequent operation of these affairs, then continue to carry out the subsequent operation of these affairs, and return success or the result of section processes failure gives interface interchange side.
6. method according to claim 4 is characterized in that, described step B2 specifically comprises:
At certain practical business scene, in the transaction interface of described static state, select the combination of one or more behaviors and object to construct the concrete transaction interface that satisfies these business scenario needs.
7. method according to claim 1 is characterized in that, described behavior set, object set and static transaction interface are described by extend markup language scheme XML Scheme or C++ or Java.
CNB2006101099861A 2006-08-25 2006-08-25 Method of operating interface of definition to object mould Active CN100410877C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101099861A CN100410877C (en) 2006-08-25 2006-08-25 Method of operating interface of definition to object mould

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101099861A CN100410877C (en) 2006-08-25 2006-08-25 Method of operating interface of definition to object mould

Publications (2)

Publication Number Publication Date
CN1912830A CN1912830A (en) 2007-02-14
CN100410877C true CN100410877C (en) 2008-08-13

Family

ID=37721773

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101099861A Active CN100410877C (en) 2006-08-25 2006-08-25 Method of operating interface of definition to object mould

Country Status (1)

Country Link
CN (1) CN100410877C (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164199B (en) * 2011-12-14 2016-05-18 中国银联股份有限公司 Application model generating apparatus and method based on hierarchy
CN105094846A (en) * 2015-08-21 2015-11-25 浪潮(北京)电子信息产业有限公司 Data processing method and system and event driven model establishment method and system thereof
CN109710235B (en) * 2018-12-29 2022-04-01 杭州趣链科技有限公司 Transaction implementation system and method based on Java intelligent contract service logic
CN112394927A (en) * 2020-12-08 2021-02-23 上海数设科技有限公司 Dimension-increasing form of product model and model definition method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5822587A (en) * 1995-10-20 1998-10-13 Design Intelligence, Inc. Method and system for implementing software objects
US6332210B1 (en) * 1998-12-22 2001-12-18 Litton Systems, Inc. Method of creating and using system-independent software components
CN1384432A (en) * 2001-04-27 2002-12-11 皇家菲利浦电子有限公司 Intenal data structure for appliction of interactive interfacing with HTML-or XML-type document
CN1648860A (en) * 2005-03-02 2005-08-03 优网通国际资讯股份有限公司 Developing method for sharing and converting user interface in various integration development environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5822587A (en) * 1995-10-20 1998-10-13 Design Intelligence, Inc. Method and system for implementing software objects
US6332210B1 (en) * 1998-12-22 2001-12-18 Litton Systems, Inc. Method of creating and using system-independent software components
CN1384432A (en) * 2001-04-27 2002-12-11 皇家菲利浦电子有限公司 Intenal data structure for appliction of interactive interfacing with HTML-or XML-type document
CN1648860A (en) * 2005-03-02 2005-08-03 优网通国际资讯股份有限公司 Developing method for sharing and converting user interface in various integration development environment

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
嵌入CORBA IDL的对象设计模型的导出. 何小卫,王基一,许黎明.浙江师范大学学报(自然科学版),第28卷第3期. 2005
嵌入CORBA IDL的对象设计模型的导出. 何小卫,王基一,许黎明.浙江师范大学学报(自然科学版),第28卷第3期. 2005 *
软件设计中应用框架技术的应用. 张敏娜,林国璋,刘玉树.教育信息化. 2000
软件设计中应用框架技术的应用. 张敏娜,林国璋,刘玉树.教育信息化. 2000 *

Also Published As

Publication number Publication date
CN1912830A (en) 2007-02-14

Similar Documents

Publication Publication Date Title
CN106528129B (en) A kind of Web application interface generation system and method
US9800675B2 (en) Methods for dynamically generating an application interface for a modeled entity and devices thereof
US7219328B2 (en) Model-based composable code generation
CN101046810B (en) System for automatic setting relation model and its method
US9146955B2 (en) In-memory, columnar database multidimensional analytical view integration
US8615731B2 (en) System and method for automating the development of web services that incorporate business rules
US8751437B2 (en) Single persistence implementation of business objects
CN104360859B (en) A kind of visual service development method and system
CN110443010A (en) One kind permission visual configuration control method, device, terminal and storage medium in information system
US20060048097A1 (en) System and method for automating the development of web services
CN102622227B (en) A kind of device of the component model and element factory for supporting dynamic configuration
CN103645908A (en) Full life circle development achievement system of intemetware
CN102981941A (en) Alarm handling method and alarm handling device
EP1217547A2 (en) Object integrated management system
CN103390018A (en) Web service data modeling and searching method based on SDD (service data description)
CN100410877C (en) Method of operating interface of definition to object mould
CN102316128A (en) A kind ofly be used to generate network service method and device
CN104899205A (en) Dynamic searching framework based on star-shaped structure business model
US7831958B2 (en) Systems and methods for distributing updated information
Sneed et al. Linking legacy services to the business process model
Rademacher et al. Towards Holistic Modeling of Microservice Architectures Using LEMMA.
JP2002049493A (en) Method and system for generating program control information, and recording medium stored with processing program therefor
Rahmouni et al. MDA-based modeling and transformation to generate N-Tiers web models
CN101963963A (en) Method for constructing database meta-model
CN101226540A (en) Method and device for dynamic construction of guideline code

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant