CN1912830A - Method of operating interface of definition to object mould - Google Patents
Method of operating interface of definition to object mould Download PDFInfo
- Publication number
- CN1912830A CN1912830A CN 200610109986 CN200610109986A CN1912830A CN 1912830 A CN1912830 A CN 1912830A CN 200610109986 CN200610109986 CN 200610109986 CN 200610109986 A CN200610109986 A CN 200610109986A CN 1912830 A CN1912830 A CN 1912830A
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 33
- 230000006399 behavior Effects 0.000 claims abstract description 61
- 230000003068 static effect Effects 0.000 claims abstract description 31
- 230000009471 action Effects 0.000 claims description 10
- 238000012545 processing Methods 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 9
- 230000004044 response Effects 0.000 description 26
- 238000010586 diagram Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 3
- 238000012423 maintenance Methods 0.000 description 3
- 230000008439 repair process Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 239000011362 coarse particle Substances 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 239000008280 blood Substances 0.000 description 1
- 210000004369 blood Anatomy 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000004883 computer application Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000035800 maturation Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
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
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:com?plexType>
<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:sequence>
<xsd:element?name="result"type="xsd:boolean"/>
</xsd:sequence>
</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:complexType>
</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:sequence>
<xsd:element?name="name"type="xsd:string"/>
<xsd:element?name="creditHour"type="xsd:integer"/>
<xsd:element?name="extended?attribute"type="xsd:any"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
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:sequence>
</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:string"/>
<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:sequence>
<xsd:element?name="studentName"type="xsd:string"/>
<xsd:element?name="courseName"type="xsd:string"/>
</xsd:sequence>
</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:sequence>
</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: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>
2, professor selects postgraduate's request of operating and response interface
<xsd:element?name="associateStudentToProfessorRequest">
<xsd:complexType>
<xsd:seq?uence>
<xsd:element?name="professorName"type="xsd:string"/>
<xsd:element?name="studentName"type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</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 physical 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 physical 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:complexType>
</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 a ction 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>
</transactionRequest>
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 kind of 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 physical 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 physical 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.
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 true CN1912830A (en) | 2007-02-14 |
CN100410877C CN100410877C (en) | 2008-08-13 |
Family
ID=37721773
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2006101099861A Expired - Fee Related 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) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013087008A1 (en) * | 2011-12-14 | 2013-06-20 | 中国银联股份有限公司 | Device and method for generating application model based on layered structure |
CN105094846A (en) * | 2015-08-21 | 2015-11-25 | 浪潮(北京)电子信息产业有限公司 | Data processing method and system and event driven model establishment method and system thereof |
CN109710235A (en) * | 2018-12-29 | 2019-05-03 | 杭州趣链科技有限公司 | A kind of affairs realization system and method based on Java intelligence contract service logic |
CN112394927A (en) * | 2020-12-08 | 2021-02-23 | 上海数设科技有限公司 | Dimension-increasing form of product model and model definition method |
Family Cites Families (4)
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 |
EP1260911A1 (en) * | 2001-04-27 | 2002-11-27 | Koninklijke Philips Electronics N.V. | Internal data structure for applications intended to interface to an 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 |
-
2006
- 2006-08-25 CN CNB2006101099861A patent/CN100410877C/en not_active Expired - Fee Related
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013087008A1 (en) * | 2011-12-14 | 2013-06-20 | 中国银联股份有限公司 | Device and method for generating application model based on layered structure |
US9239720B2 (en) | 2011-12-14 | 2016-01-19 | China Unionpay Co., Ltd. | Device and method for generating application model based on layered structure |
CN105094846A (en) * | 2015-08-21 | 2015-11-25 | 浪潮(北京)电子信息产业有限公司 | Data processing method and system and event driven model establishment method and system thereof |
CN109710235A (en) * | 2018-12-29 | 2019-05-03 | 杭州趣链科技有限公司 | A kind of affairs realization system and method based on Java intelligence contract service logic |
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 |
Also Published As
Publication number | Publication date |
---|---|
CN100410877C (en) | 2008-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1097795C (en) | Document processing method and device and computer readable recording medium | |
CN1318163A (en) | System and method for selectively defining access to application features | |
CN1522006A (en) | System and method for switchingin and transmission of different data frames in digital transmission network | |
CN1870523A (en) | Allocation system and method of network equipment | |
CN1172239C (en) | Method of executing mobile objects and recording medium storing mobile objects | |
CN1290889A (en) | Edition adaption for program object serialization and de-serialization | |
CN1794729A (en) | Data arrangement management method, data arrangement management system, data arrangement management device, and data arrangement management program | |
CN101030138A (en) | Application framework | |
CN1534504A (en) | Paralled processing system using single processor operating system and parallel processing program | |
CN1260643C (en) | Data processing system and data processing method, information processing device and information processing method, and storage medium | |
CN1955956A (en) | Method of graphic and XML file interexchange based on BPEL | |
CN1862538A (en) | Data configuration system and method for implementing data configuration | |
CN1776621A (en) | Program converting method | |
CN1862522A (en) | Data checking apparatus and checking method | |
CN1285032C (en) | External event processor system and method | |
CN1889039A (en) | Method for realizing universal browsing device tool bar based on XML | |
CN1662864A (en) | Method of transferring information specifying a tool utilized for processing a content protected by IPMP | |
CN1809829A (en) | Database device, database search device, and method thereof | |
CN1799048A (en) | A universal database schema | |
CN1912830A (en) | Method of operating interface of definition to object mould | |
CN1046360C (en) | Method for specifying user interfaces and programming system running multiple user interface type computer | |
CN1545303A (en) | Method for implementing multi-party conference service in communication network with separated bearing and controlling | |
CN1471026A (en) | Type-setting systme and type-setting programme and type-setting method | |
CN1199198A (en) | Adjustment rule generating method and adjustment rule generating apparatus and adjustment control apparatus | |
CN1237731A (en) | Data processing method, recording medium, and data processing apparatus |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20080813 |