CN102368217A - Metadata driven REST (representational state transfer) style application development method and system - Google Patents
Metadata driven REST (representational state transfer) style application development method and system Download PDFInfo
- Publication number
- CN102368217A CN102368217A CN2011103228158A CN201110322815A CN102368217A CN 102368217 A CN102368217 A CN 102368217A CN 2011103228158 A CN2011103228158 A CN 2011103228158A CN 201110322815 A CN201110322815 A CN 201110322815A CN 102368217 A CN102368217 A CN 102368217A
- Authority
- CN
- China
- Prior art keywords
- service
- rest
- metadata
- resource
- framework
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 28
- 238000011161 development Methods 0.000 title claims abstract description 27
- 238000012546 transfer Methods 0.000 title abstract description 3
- 238000012360 testing method Methods 0.000 claims abstract description 54
- 238000006243 chemical reaction Methods 0.000 claims description 14
- 230000006870 function Effects 0.000 claims description 9
- 238000013461 design Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 abstract description 5
- 230000003993 interaction Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000000344 soap Substances 0.000 description 1
- 230000009897 systematic effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The invention discloses a metadata driven REST (representational state transfer) style application development method and a metadata driven REST style application development system. In the method, through analyzing a business service by using a model converter, and converting the business service into a RMF (remote management facility) based resource model, reading the resource model and generating a corresponding code framework, a client tool, a test case framework, a user interface template and an API (application program interface) document of a REST service, forming a system test case, and perfecting an implementation code of the REST service until the system test case passes, the universality of the REST service is realized, thereby expanding the application scope of the REST service. The system comprises a resource metadata framework, a model converter, a code generator and a service engine; through a unified metadata management framework, the definition of the REST service is standardized, and the consistency and maintainability of the service are improved; and through carrying out abstraction on the metadata of the REST service and following a popular programming style, the system is easy to be learned and grasped by developers, so that the reusability and automation degree of the system are improved, and the development process of modern agile software can be effectively supported.
Description
Technical field
The present invention relates to a kind of software development technique of model-driven, be applicable to the REST style application and development method and system of the SOA system architecture, particularly a kind of metadata driven of REST style.
Background technology
Characterize state transitions (Representational State Transfer is called for short REST) and be a kind of software architecture style that doctor RoyFielding put forward in his PhD dissertation in 2000.Because the Web service of REST pattern and complicated SOAP and XML-RPC are apparent more succinct to recently explaining, increasing web service begins to adopt design of REST style and realization.Although occurred technology and the standard (JAX-RS for example of the application and development of some REST styles in recent years; Restlet, WSDL 2.0, WADL etc.); But still the method and the instrument of shortage system, and the development efficiency reusability lower, software module that the REST style is used is poor.
The subject matter of current REST style application and development comprises:
(1) definition of REST service does not have formal standard, along with the growth of software, is difficult to safeguard the consistance of API.(like WSDL 2.0, WADL) depend on XML, developing instrument is also more limited for existing standard.
(2) REST servive programming style varied, study and maintenance cost are high.For example, the programming framework based on Java language just has Restlet, Apache CXF, Wink, Jersey etc.
(3) lack the design of systematic tool and method support software, coding, test, the whole process of documenting, especially can't satisfy the needs of Modern Agile software development process.
Summary of the invention
Goal of the invention: the REST style application and development method and system that the objective of the invention is to provide the metadata driven of development efficiency that a kind of REST of raising style uses and software module reusability to the problem and shortage that exists in the above-mentioned prior art.
Technical scheme: a kind of REST style application and development method of metadata driven comprises the steps:
(1) the analytical applications demand is also through design or programming language definition business service;
(2) resolve said business service through the model conversion device, and convert business service to resource model based on RMF;
(3) through the resource model in the code generator read step (2) and generate code skeleton, client utility, test case framework, user interface templates and the API document of corresponding REST service;
(4) fill said test case framework, write test logic, the test case framework is filled to the system testing use-case through machine language;
(5) operational system test case, do not accomplish because of REST service implementing code this moment, and the system testing use-case does not pass through;
(6) improve REST service implementing code, pass through until the system testing use-case;
(7) repeat above-mentioned (1) to (6) step, pass through until the function realization and the test of all REST services.
Said method is resolved said business service through the model conversion device; And convert business service to resource model based on RMF; Read resource model then and generate code skeleton, client utility, test case framework, user interface templates and the API document that corresponding REST serves; Form the system testing use-case, realize the versatility of REST service, expanded its range of application.
Said business service is the business service of Java, C++ or the definition of UML programming language.
Said REST service comprises metadata service, general utility functions service and custom service service.
Machine language is Java described in the step (4).
Said system testing use-case comprises the compatible row test of REST, general utility functions test, custom service logic testing.
A kind of REST style application development system that realizes the metadata driven of said method comprises resource metadata framework, model conversion device, code generator and service-Engine; Said resource metadata framework is used to provide the metadata service of resource model interoperability, comprises the operate services to resource type, resources relationship, Resource Properties, far call interface; Said model conversion device is used for converting the business service of programming language definition to based on RMF resource model, and resource model is sent to code generator; Said code generator is used for resource model is generated service end code skeleton, client utility, test case framework, user interface templates and API document; Said service-Engine is the running environment of deployment services end code, is used to provide the far call interface based on http protocol; Said testing engine is used for the running environment of executive system test case.
Through unified metadata management framework, standard the definition of REST service, improved service-conformance property and maintainability.System is based on OO design of modern times and programming (OOD/OOP) method and tool implementation, and practicality is high; Be easy to expansion, can be used for supporting existing open standard, like WSDL 2.0 and WADL.It does not introduce new standard; But the REST service metadata being carried out abstract, the coding style of follow popular (for example JAX-RS) is easy to developer study and grasps; System's reusability and automaticity are improved, can effectively support the Modern Agile software development process.
Beneficial effect: the REST style application and development method of metadata driven provided by the invention, realize the versatility that REST serves, expanded its range of application.The REST style application development system of metadata driven provided by the invention is through unified metadata management framework; Standard the definition of REST service; Service-conformance property and maintainability have been improved; Be easy to developer's study and grasp, system's reusability and automaticity are improved, can effectively support the Modern Agile software development process.
Description of drawings
Figure l is the fundamental diagram of the REST style application development system embodiment of metadata driven of the present invention;
Fig. 2 is REST service interaction DLL among the REST style application development system embodiment of metadata driven of the present invention;
Fig. 3 is the resource metadata framework among the REST style application development system embodiment of metadata driven of the present invention;
Fig. 4 is the structured flowchart based on the model conversion device of EMF among the REST style application development system embodiment of metadata driven of the present invention.
Embodiment
Below in conjunction with accompanying drawing and specific embodiment; Further illustrate the present invention; Should understand these embodiment only be used to the present invention is described and be not used in the restriction scope of the present invention; After having read the present invention, those skilled in the art all fall within the application's accompanying claims institute restricted portion to the modification of the various equivalent form of values of the present invention.
A kind of REST style application and development method of metadata driven comprises the steps:
(1) the analytical applications demand is also through Java programming language definition business service;
(2) resolve said business service through the model conversion device, and convert business service to resource model based on RMF;
(3) through the resource model in the code generator read step (2) and generate code skeleton, client utility, test case framework, user interface templates and the API document of corresponding REST service, wherein the REST service comprises metadata service, general utility functions service and custom service service;
(4) fill the test case framework, write test logic through the Java programming language, the test case framework is filled to the system testing use-case, wherein the system testing use-case comprises the compatible row test of REST, general utility functions test, custom service logic testing;
(5) operational system test case, do not accomplish because of the service implementing code this moment, and the system testing use-case does not pass through;
(6) improve the service implementing code, pass through until test case;
(7) repeat above-mentioned (1) to (6) step, pass through until the function realization and the test of all REST services.
As shown in Figure 1, a kind of REST style application development system that realizes the metadata driven of said method comprises resource metadata framework, model conversion device, code generator and service-Engine; Said resource metadata framework is used to provide the metadata service of resource model interoperability, comprises the operate services to resource type, resources relationship, Resource Properties, far call interface; Said model conversion device is used for converting the business service of programming language definition to based on RMF resource model, and resource model is sent to code generator; Said code generator is used for resource model is generated service end code skeleton, client utility, test case framework, user interface templates and API document; Said service-Engine is the running environment of deployment services end code, is used to provide the far call interface based on http protocol; Said testing engine is used for the running environment of executive system test case.
The client/server of REST style is mutual to be the conversion of resource expression form in fact.Native system carries out abstract to REST service interaction pattern; Isolate the relevant resources bank (Repository) of HTTP/REST, resource (Resource), request (Request), response (Response), read-write converter (Reader and Writer), state variable (Variant), as shown in Figure 2.
Resource model is described with resource metadata framework (RMF) shown in Figure 3.On the network anything can be conceptualized as resource (Resource); The corresponding unique resource identification (URI) of each resource; Through the operation of http protocol to resource, all operations all is stateless, the different expression forms that client can request resource.Resource can through towards programming language (OOPL) describe, any object can be wanted to bind with resource.A resources bank is made up of the resource of predefined type, one group of resource type of a resource model package definition, and a resource type comprises one group of attribute, and link, operation etc., operation comprise the predefined parameter of row.Resource comprises simple resource type and mobilize resources type.
The resource metadata framework is that the realization of said system device provides the metadata service.Because metadata also is to pass through the URI accessed resources, so the metadata service also can be passed through the HTTP/REST interface operation.Fig. 4 has described resource metadata service commonly used.
The definition of REST service is converted into the model with the RMF frame description by the model conversion device, has shown the implementation of model conversion device like Fig. 4, and this method originates in Eclipse modeling framework (EMF) realization.Converter provides interface to be used for expansion service definitional language resolver.Through resolver, realize to numerous open standards (like WSDL2.0, WADL), design and programming language (like UML, EMF, support Java).For example, the Java language resolver can realize that the EMF model can be realized through Ecore DLL (org.eclipse.emf.ecore.*) through calling Java reflection DLL (java.lang.reflect.*).
Claims (6)
1. the REST style application and development method of a metadata driven is characterized in that, comprises the steps:
(1) the analytical applications demand is also through design or programming language definition business service;
(2) resolve said business service through the model conversion device, and convert business service to resource model based on RMF;
(3) through the resource model in the code generator read step (2) and generate code skeleton, client utility, test case framework, user interface templates and the API document of corresponding REST service;
(4) fill said test case framework, write test logic, the test case framework is filled to the system testing use-case through machine language;
(5) operational system test case, do not accomplish because of the service implementing code this moment, and the system testing use-case does not pass through;
(6) improve REST service implementing code, pass through until the system testing use-case;
(7) repeat above-mentioned (1) to (6) step, pass through until the function realization and the test of all REST services.
2. the REST style application and development method of metadata driven as claimed in claim 1 is characterized in that: said business service is the business service of Java, C++ or the definition of UML programming language.
3. the REST style application and development method of metadata driven as claimed in claim 1 is characterized in that: said REST service comprises metadata service, general utility functions service and custom service service.
4. the REST style application and development method of metadata driven as claimed in claim 1, it is characterized in that: machine language is Java described in the step (4).
5. the REST style application and development method of metadata driven as claimed in claim 1 is characterized in that: said system testing use-case comprises the compatible row test of REST, general utility functions test, custom service logic testing.
6. a system that realizes the REST style application and development method of the said metadata driven of claim 1 is characterized in that: comprise resource metadata framework, model conversion device, code generator and service-Engine; Said resource metadata framework is used to provide the metadata service of resource model interoperability, comprises the operate services to resource type, resources relationship, Resource Properties, far call interface; Said model conversion device is used for converting the business service of programming language definition to based on RMF resource model, and resource model is sent to code generator; Said code generator is used for resource model is generated service end code skeleton, client utility, test case framework, user interface templates and API document; Said service-Engine is the running environment of deployment services end code, is used to provide the far call interface based on http protocol; Said testing engine is used for the running environment of executive system test case.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2011103228158A CN102368217A (en) | 2011-10-20 | 2011-10-20 | Metadata driven REST (representational state transfer) style application development method and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2011103228158A CN102368217A (en) | 2011-10-20 | 2011-10-20 | Metadata driven REST (representational state transfer) style application development method and system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN102368217A true CN102368217A (en) | 2012-03-07 |
Family
ID=45760782
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2011103228158A Pending CN102368217A (en) | 2011-10-20 | 2011-10-20 | Metadata driven REST (representational state transfer) style application development method and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102368217A (en) |
Cited By (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102932483A (en) * | 2012-11-19 | 2013-02-13 | 西北大学 | Lightweight dynamic resource definition method |
| CN104038562A (en) * | 2014-07-02 | 2014-09-10 | 浪潮软件股份有限公司 | Method for conducting service message pushing under tobacco industry cloud application |
| CN104423968A (en) * | 2013-08-23 | 2015-03-18 | 乐金信世股份有限公司 | Method of designing business logic, server performing the same and storage medium storing the same |
| CN104484216A (en) * | 2014-12-29 | 2015-04-01 | 广州唯品会网络技术有限公司 | Method and device for generating service interface document and on-line test tool |
| US9294543B2 (en) | 2014-04-09 | 2016-03-22 | International Business Machines Corporation | Generation of representational state transfer interface from application programming interfaces |
| CN105593844A (en) * | 2013-09-20 | 2016-05-18 | 甲骨文国际公司 | Runtime custom infrastructure |
| US9600547B2 (en) | 2014-05-30 | 2017-03-21 | International Business Machines Corporation | System and method of consuming and integrating with rest-based cloud and enterprise services |
| CN106663002A (en) * | 2014-06-25 | 2017-05-10 | 甲骨文国际公司 | REST service source code generation |
| CN106886406A (en) * | 2017-01-19 | 2017-06-23 | 阿里巴巴集团控股有限公司 | The generation method and device of exploitation code or document |
| CN106951231A (en) * | 2017-02-23 | 2017-07-14 | 微梦创科网络科技(中国)有限公司 | A kind of computer software development approach and device |
| US9734044B2 (en) | 2014-03-05 | 2017-08-15 | International Business Machines Corporation | Automatic test case generation |
| CN107346249A (en) * | 2017-07-13 | 2017-11-14 | 重庆电子工程职业学院 | A kind of computer software development approach based on model |
| CN110058846A (en) * | 2019-04-19 | 2019-07-26 | 深圳市康拓普信息技术有限公司 | A kind of service application software development system and method |
| CN110955416A (en) * | 2019-10-12 | 2020-04-03 | 平安普惠企业管理有限公司 | Interface document generation method, apparatus, device and computer storage medium |
| CN111008051A (en) * | 2018-10-04 | 2020-04-14 | 甲骨文国际公司 | Dynamic layout based on multidimensional rules |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1926021A1 (en) * | 2006-11-27 | 2008-05-28 | Sysopen Digia Oyj | Software test case generation |
| CN101410798A (en) * | 2006-04-27 | 2009-04-15 | 国际商业机器公司 | A method and system for generating application data editors |
| CN101441560A (en) * | 2007-11-23 | 2009-05-27 | 国际商业机器公司 | Method and policy engine for executing context model-based service-oriented architecture policy |
| US20100319002A1 (en) * | 2009-06-11 | 2010-12-16 | Compiere, Inc. | Systems and methods for metadata driven dynamic web services |
| CN102129469A (en) * | 2011-03-23 | 2011-07-20 | 华中科技大学 | Virtual experiment-oriented unstructured data accessing method |
-
2011
- 2011-10-20 CN CN2011103228158A patent/CN102368217A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101410798A (en) * | 2006-04-27 | 2009-04-15 | 国际商业机器公司 | A method and system for generating application data editors |
| EP1926021A1 (en) * | 2006-11-27 | 2008-05-28 | Sysopen Digia Oyj | Software test case generation |
| CN101441560A (en) * | 2007-11-23 | 2009-05-27 | 国际商业机器公司 | Method and policy engine for executing context model-based service-oriented architecture policy |
| US20100319002A1 (en) * | 2009-06-11 | 2010-12-16 | Compiere, Inc. | Systems and methods for metadata driven dynamic web services |
| CN102129469A (en) * | 2011-03-23 | 2011-07-20 | 华中科技大学 | Virtual experiment-oriented unstructured data accessing method |
Cited By (24)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102932483A (en) * | 2012-11-19 | 2013-02-13 | 西北大学 | Lightweight dynamic resource definition method |
| CN104423968B (en) * | 2013-08-23 | 2018-10-12 | 乐金信世股份有限公司 | It designs the method for service logic, execute its server and storage medium |
| CN104423968A (en) * | 2013-08-23 | 2015-03-18 | 乐金信世股份有限公司 | Method of designing business logic, server performing the same and storage medium storing the same |
| CN105593844A (en) * | 2013-09-20 | 2016-05-18 | 甲骨文国际公司 | Runtime custom infrastructure |
| US9734044B2 (en) | 2014-03-05 | 2017-08-15 | International Business Machines Corporation | Automatic test case generation |
| US9767008B2 (en) | 2014-03-05 | 2017-09-19 | International Business Machines Corporation | Automatic test case generation |
| US9811402B2 (en) | 2014-04-09 | 2017-11-07 | International Business Machines Corporation | Generation of representational state transfer interface from application programming interfaces |
| US9294543B2 (en) | 2014-04-09 | 2016-03-22 | International Business Machines Corporation | Generation of representational state transfer interface from application programming interfaces |
| US9600547B2 (en) | 2014-05-30 | 2017-03-21 | International Business Machines Corporation | System and method of consuming and integrating with rest-based cloud and enterprise services |
| US10095760B2 (en) | 2014-05-30 | 2018-10-09 | International Business Machines Corporation | System and method of consuming and integrating with rest-based cloud and enterprise services |
| US10984012B2 (en) | 2014-05-30 | 2021-04-20 | International Business Machines Corporation | System and method of consuming and integrating with rest-based cloud and enterprise services |
| CN106663002A (en) * | 2014-06-25 | 2017-05-10 | 甲骨文国际公司 | REST service source code generation |
| CN106663002B (en) * | 2014-06-25 | 2020-11-10 | 甲骨文国际公司 | REST service source code generation |
| CN104038562A (en) * | 2014-07-02 | 2014-09-10 | 浪潮软件股份有限公司 | Method for conducting service message pushing under tobacco industry cloud application |
| CN104484216A (en) * | 2014-12-29 | 2015-04-01 | 广州唯品会网络技术有限公司 | Method and device for generating service interface document and on-line test tool |
| CN104484216B (en) * | 2014-12-29 | 2018-03-16 | 广州品唯软件有限公司 | Service interface document and on-line testing instrument generation method, device |
| CN106886406A (en) * | 2017-01-19 | 2017-06-23 | 阿里巴巴集团控股有限公司 | The generation method and device of exploitation code or document |
| CN106951231A (en) * | 2017-02-23 | 2017-07-14 | 微梦创科网络科技(中国)有限公司 | A kind of computer software development approach and device |
| CN106951231B (en) * | 2017-02-23 | 2021-02-26 | 微梦创科网络科技(中国)有限公司 | A computer software development method and device |
| CN107346249A (en) * | 2017-07-13 | 2017-11-14 | 重庆电子工程职业学院 | A kind of computer software development approach based on model |
| CN111008051A (en) * | 2018-10-04 | 2020-04-14 | 甲骨文国际公司 | Dynamic layout based on multidimensional rules |
| CN111008051B (en) * | 2018-10-04 | 2024-04-23 | 甲骨文国际公司 | Dynamic layout based on multidimensional rules |
| CN110058846A (en) * | 2019-04-19 | 2019-07-26 | 深圳市康拓普信息技术有限公司 | A kind of service application software development system and method |
| CN110955416A (en) * | 2019-10-12 | 2020-04-03 | 平安普惠企业管理有限公司 | Interface document generation method, apparatus, device and computer storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102368217A (en) | Metadata driven REST (representational state transfer) style application development method and system | |
| CN101930370B (en) | System structure for realizing data conversion in service integration of SOA (Service Oriented Architecture) application system and method thereof | |
| CN102426519B (en) | Linked data-based multiplexing method of business process execution language (BPEL) templates and services, and system thereof | |
| Rohjans et al. | UML-based modeling of OPC UA address spaces for power systems | |
| CN104020992B (en) | The method and device of Java Web services is generated by C/C++ | |
| CN101853156B (en) | Method for realizing web service call in component-based software system | |
| CN110471698A (en) | The generation method and device, storage medium and computer equipment of API document | |
| CN102811257B (en) | Automatic publication and combination method for Web service | |
| CN102253974A (en) | Dynamic combination method for geographic model network services | |
| CN107463614A (en) | Eco-hydrological Model structure and parameter simulation method based on modeling framework | |
| CN103581310B (en) | A kind of automatic generation method of web service agent | |
| Autili et al. | A development process for self-adapting service oriented applications | |
| Iglesias-Urkia et al. | Enabling easy Web of Things compatible device generation using a Model-Driven Engineering approach | |
| Wakil et al. | Extensibility interaction flow modeling language metamodels to develop new web application concerns | |
| Jingyong et al. | Middleware-based distributed systems software process | |
| Jia et al. | AXIOM: A Model-driven Approach to Cross-platform Application Development. | |
| Manev et al. | Facilitation of IoT software maintenance via code analysis and generation | |
| Kulscár et al. | Bringing Clouds down to Earth: Modeling Arrowhead Deployments via Eclipse Vorto. | |
| Biehl et al. | Model-based service discovery and orchestration for OSLC services in tool chains | |
| CN108234167A (en) | Webmaster northbound interface is adapted to middleware automatic generation method and device | |
| CN116974579A (en) | Project code generation method, device, equipment and medium of low code platform | |
| Parizi et al. | An ensemble of complexity metrics for BPEL web processes | |
| Jiang et al. | UML-based modeling and validity checking of web service descriptions | |
| Lobunets et al. | Applying flow-based programming methodology to data-driven applications development for smart environments | |
| Osborne et al. | Ozy: a general orchestration container |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120307 |