Notwithstanding the advancement of software engineering for enterprise applications, the process of software implementation is still time-consuming and error-prone. This situation is more severe when developing the custom software, because the requirements are always changing during the whole development processes. This issue could be alleviated by reusing exiting code or services in the private and public repositories. Nevertheless, the reuse could fail if no existing service is matched or existing services could not be composited to satisfy the requirements. Eventually, the developers have to implement the business logic manually for the un-satisfied requirements. In this project, we present an approach which can automated generate business logic from requirement model for enterprise applications. Unlike other works, our approach does not need to specify design model such as sequence diagram, the business logic could be directly generated from operation contracts of requirement model. Operation contracts only contain the preconditions before executing the action, and the postconditions after execution. Moreover, the generated off-the-shelf code is adopted the same multi-layer structure as Java EE and .NET platforms which are robust, scalable, and widely used in enterprise application developments. Finally, a case study of library management system demonstrates the feasibility and efficiency of the proposed approach in our implemented RMCode tool.
Furthermore, a case study of library management system is demonstrated in the implemented tool RMCode, which has some features:
Bi-directionally synchronized graphic and textual requirement model: RMCode provides both UML and an equiva- lent textual model to specify the requirements. RMCode take both advantages from graphic and textual models. Graphic model provides concrete visualization, which could be easy to communicate with non-technical stakeholders, and clear to show the relations among entities. Comparing to graphic model, textual requirement model could elaborately define the behaviour such as operation contract. and support modeling at any time without heavy CASE tool.
Automated generation off-the-shelf business layer and persistence layer: RMCode can not only generate business logic, but also generate the whole business and persistence layers same as Java EE platform. Under the principles of separation of concerns, persistence layer focuses on conceptual domain, storage state and life-cycle management of the domain. Business layer is charged for business logic and provides API to presentation layer. Hence, the generated code could be directly invoked in GUI or wrapped as services to be integrated into other enterprise applications.
Supporting incremental requirement retrieved: Requirement usually can not be precisely retrieved only one time. RMCode supports incremental requirement retrieving from different phases. In retrieved phase, behaviours of use cases are retrieved refering to actors involved in the system. In arrange phase, behaviours are arranged into different modules in the business layer. In specification phase, behaviours are precisely defined in each operation contract. Furthermore, those phases could be iterated in any epoch, and requirement could be immediately validated by generated code.