Model driver development

zhaozj2021-02-16  51

OptimAlj: How to drive productivity

Introduction:

Optimalj is a senior enterprise-level application development environment. It uses a mature mode (Pattern) to generate comprehensive, runable J2EE applications from visual models, realize the best practical experience and write code based on J2EE rules. Using OMG model drive architecture standards, Optimalj helps streamline development, enabling architects, designers, and developers to quickly develop reliable application systems.

Optimalj is characterized by five key basic concepts, will discuss them in a series of technical white paper.

1. Model driver development - how to improve productivity

2, business rules - how to adapt to the rapid changes in business.

3, Mode - How to convert the UML model as a high quality J2EE application system.

4, dynamic synchronization - how to ensure the consistency of models and code.

5. Integrated deployment - how to simplify tests.

Before reading the technical white paper series, we strongly recommend that you visit the URL-HTTP: //www.compuware.com/products/optimalj/detail.htm so that the OJ has an overall concept and understanding the role of MDA in Optimalj.

Model Drive Architecture (MDA) Importance

In the deployment of the leadership, modeling is one of the core processes. Modeling is to communicate the structure and behavior of the system; modeling in order to visualize the system architecture and control it; modeling in order to better understand the system we are building; modeling often reveals opportunities for simplified and reuse; modeling Manage risk.

However, problems faced today is that models are written in many organizations. This produces synchronous problems between the model, that is, the application system blueprint and application system itself. Because the application system is updated and the model has not changed, the model is only used as a document (Perspective).

The key is to build a bridge between the flux between the modeling and development, so that modeling constitutes a portion required for the whole. The OMG model driver architecture is a framework to resolve this issue, and the model drives the development process in this framework. The MDA vision defines a new method for detailed and build a system, using UML as the foundation. MDA expands UML just a beautiful picture role before UML.

Unified Modeling Language (UML)

UML is one of the key technical standards for MDA. MDA is dominated by OMG, COMPARE is one of the members of the organization. UML is a standardized graphical language that can visualize browsing, detailed instructions, build and document a model of a software system. UML gives a standard method of depicting system blueprints, covering conceptual and specific things, concepts such as business processes and system functions, and specific programs, data base outlines, and reusable software components. UML is a widely used standard, which represents the best practices and experiences of experience in modeling experience in software systems. Modeling has the following main advantages:

l Provides an outline view of an application system architecture and behavior.

l Reuse of convenience objects and rules.

l Ensure consistency of the development process.

l Run independent implementation, so that the model remains valid when the change (such as the underlying technical architecture) occurs.

Model driver development practice

Optimalj is a MDA-based model-driven development environment that combines corporate standard modeling techniques and symbols used in UML to design and develop enterprise J2EE applications.

Optimalj allows design and developers to develop at a higher abstract level, reducing J2EE platforms and complexity from the beginning. From modeling to deployment, application development in Optimalj is a model driver. Optimalj ensures definition and reuse via a visual model. Model driver development examples allow design and developers to do what is done, not how to do it.

Definition of Optimalj Domain Model

The core of the Optimalj Advanced Model Driven Development Environment is the domain model based on UML. The domain model is a high-level object model that includes the information structure and behavior of the application system and the relationship between different data structures. The domain model is a commercially centered model and adjusts the integration of business information, which does not focus on technical details and the platform-independent model (PIM) in the OMG MDA. In other words, the domain model does not include implementation and code details, such as the technical classes that implement the application system. When developing and improving the domain model, Optimalj allows designers to define business rules in a statement, such as settings and cascading deletions of the initial value. All definitions of the domain model are reused and inherited in the low-level application model and the actual code. The more content defined in the domain model, the more content automatically produced from the domain model. The 1 domain model layer isolates the design of the designer and the underlying to make them focus on the functionality of the application system rather than the specific implementation details of the J2EE platform. Moreover, the designer can quickly modify the model layer.

OptimAlj identifies two models in the domain model: domain class model, and domain service model (Domain Services Model).

The domain model defines the information structure of the application system running dependence, such as customers, orders, products, and their properties, relationships, integration, business methods (operations), and business rules.

The domain service model defines the transaction of the application in an independent implementation, such as orders login, based on orders, orders, and other typical business tasks. The key advantage of the service model is that it generates automatic generation session components (Beans), and typical features for session components are the behavior of the application system.

Visualization of domain models

The editing domain model can be made in the graphical domain model editor or model resource navigation.

The domain model editor displays all classes and their relationships on the grid. Class maps are based on UML symbols and contain attributes and operations. Associated ends with a number and symbolic symbol display multiple properties. A small diamond identification polymerization relationship. You can put the class maps, narrow or move in the class editor, or you can easily view the graphs through the small thumb and layout management. In many cases, the structure or model already exists, and the structure or model of this present can be used as the starting point of the domain model. For example, a model that already exists for a certain UML model tool defined or a database containing a data relationship, can be reused in a domain model. Optimalj provides UML / XMI import / export tools, domain mode, and DBMS import tools to process these situations.

UML / XMI Import / Export Tool

When designers use third-party UML modeling tools, such as Rational Rose, they use them from modeling phase to effectively use the previous work results. There are several phases based on UML-based modeling, each with different model activities. The detail model of the final single component is analyzed from the high-rise in the concept phase. When the model is completed, eventually produce an available class model. The class model can be exported as an XML metadata interface (XMI) file. With Optimalj's UML / XMI Import / Export Tool, the XMI file can be ported to Optimalj domain model. Once imported, use Optimalj's domain model editor to view, expand, and modify the domain model. In addition, if you create or update a domain model, you can interact with other modeling tools and other modeling tools if necessary.

Domain patterns

UML modeling is a time consuming and complex process. Optimalj simplifies this process through domain mode. The domain mode helps designers create a reuse model, speed up the modeling phase and reduce errors. Therefore, the domain mode accelerates the creation of new models. The domain mode can copy the model to an empty target domain model or merge with the existing domain model. In Optimalj, this process is called a mode combination. When the mode is combined, the association and attribute can be inherited and merged from source domain mode.

Domain mode is created in a new domain model, but different from the domain model is created in the domain mode library. The mode library is saved, packet, and organizational domain mode, as a fully compatible UML / XMI format as a domain mode module.

Domain mode brings some key advantages to designers: 1. Designers can rewind the domain model or domain model between different application systems to reduce errors in the modeling phase.

2. The domain mode forced designers are modeling the application system based on standard and best practices.

3. The domain mode increases productivity in the modeling phase.

DBMS Import Tool

Customers in Optimalj can reuse the existing databases. If the database can be accessed via JDBC, the classification file can be imported into the DBMS model of the application model layer. Optimalj automatically converts the DBMS model to the domain model by "relational to object-oriented" mirror mode. Under normal circumstances, first define the domain model, then generate a DBMS model from the domain model, but in the case of importing the existing database as the application system.

Source of Optimalj Application Model

Once the first domain model iterates, the Optimalj automatic conversion domain model is used to the application model. The application model of Optimalj corresponds to the OMG's MDA object-related model (PSM), and the application model target is set in the J2EE platform. The mirroring and conversion from the domain model to the application model are processed by the technology mode 2 of Optimalj.

The generated application model contains three models:

l Display (web) model

l Business logic (EJB) model

l Database (DBMS) model

In order to complete the J2EE application, the application model defines the content needed to develop J2EE. The model exhibits an outline view of all J2EE components constructed by each layer. In this way, when the technology is upgraded and changed, the domain model from the business can remain unchanged.

Display (Web) model

The information required to generate the front end of the application system contains the web model. You can modify the appearance of the application system by editing the mode, laminated style form (CSSS), and JSP pages in the Code Model. Mirror mode Generates the element of the web model, the element of the automatic mirror domain model to the web model. Important elements in the web model are:

l Web Module (Modules) - Package container for web components.

l Web Data Outline - Defines a collection of data classes

l Web components - Define user interfaces for specifying data classes

l Web Verification Components - Define Verification Method for Application System

Web display type - definition display and verification

Developers can make a refine web model in accordance with the Wizards to decine. An example of refined is the extension of the user interface. Because layout and formatting properties can only be defined in Web model layers, Optimalj ensures that these properties are consistent within all application systems. Use a property in this model such as a attribute such as a JSP page to inherit the layout and formatting method defined in this model. Because many fine in a statement, the display components are developed faster. Define formatting and layout attributes in the model, eventually reflecting in the generated code.

Because there is a change, you only need to modify once in the application model, and the system's maintenance makes it easier. When the properties of the fine Web model elements, developers have more ideas for their configuration. This includes setting up dates or digital formats, selecting case translation, the HTML type of an element, and a stacked form. In addition, developers can model data checks (such as specific formats) in Optimalj. The defined attribute will be transmitted to the source code generated in the display layer.

Business logic model

Enterprise Java Bean models are middleware layers, handling such as trading, security, persistence, and scalability. It is an abstraction layer above the code model.

Optimalj generates an EJB model with a definition of a domain model, including model elements for application system entities and session components. The EJB model includes components related to entity components, data outlines, primary key classes, and other EJBs.

转载请注明原文地址:https://www.9cbs.com/read-22125.html

New Post(0)