Database (DBMS) model
In J2EE development, data persistence is an important issue. The generic method is to store data with relational data. In order to store data, it is necessary to define objects in the object model and the database - relationship mirroring.
OptimAlj automatically generates a database model from the model with a model 3 to handle object-relational mirroring. The database model is used to model all related database definitions. The database model supports outlines, tables, fields, rows, external keys, primary keys, and unique constraints.
For each element in the model, it is important to be detailed in the definition, which means that no type of technical class or component is generated at this stage.
All the above models can be viewed in a graphical manner with the corresponding graphics editor, so that the model is more intuitive and easier to understand.
Implementation of Optimalj Model
Once the application model is generated from the domain model, the Optimalj automatically converts the application model to the actual code.
The code for commercial logic (EJB), database (DBMS), and display (web) model can be generated or all generated separately. When these models are created or updated, they inherit all relevant definitions of the domain model. Once all application models exist, OptimAlj produces actual code to complete components of their respective models. Automatically generated processes ensure consistency of domain models, saving a large amount of time and reduces errors from potential programming. Natural, web models rely on business logic models, while business logic models rely on database models. Optimalj maintains the mutual dependence between the model.
OptimAlj uses its dynamic synchronization tool (Active Synchronization Facility5) to ensure that the model and code remain synchronized. The code generated by OptimAlj is the J2EE all function and it is consistent with its specification. The resulting code consists of Java, JSP, and XML files, entity beans, sessions beans, and SQL scripts.
All code generated by Optimalj is placed in the guard block (Guarded Blocks). "Guarded" means that the code produced is protected, and all developers cannot modify. However, Optimalj provides free blocks to enable developers to increase the extension of the generated code. When the application system is regenerated, OptimAlj retains custom code in the free block.
Independent development environment
Developers can customize code in Optimalj, and Optimalj contains a Java integrated development environment based on source code development environment NetBeans. Optimalj features all NetBeans features, for example:
l Java syntax sensitive source code editor, containing code automatic completion and keyword color identity.
l Engineering supports structured application systems, allowing developers to quickly switch the context.
l Remote debugging
l constructor and compiler
l Java archive wrapper can package Java class collection to deploy packages.
In addition, developers can view in image by using the Java class diagram editor in Optimalj. The Java Class Diagram editor automatically generates and displays a class diagram of the UML style from the package where the Java source file is located. Java class diagrams and Optimalj resource navigation trees and Java source editors are fully synchronized. This means that any of these three windows (chart, navigation, and source editor) will change in other two windows.
Even if Optimalj contains the NetBeans integrated development environment and sharing menus and windows with developers interface, developers can choose to integrate development environments or other integrated development environments. Optimalj has extended support for Borland JBuilder, IBM WebShpere Applicatin Studio Developer (WSAD), and Sun Sunone Studio. This expansion support helps developers distinguish from Optimalj to generate code-saving blocks and development of free blocks extending to generate code. In addition, these integrated development environments also include a series of OptimalJ specific menu items, such as SQL Workbench and an integration test deployment environment.
Implementation of EJB model
EJB1.1 or EJB2.0 generated by Optimalj, the EJBs, which is defined in the domain model. The EJB model contains the functionality of the front-end component (JSPS) interaction also has a method of interacting with the Database and the EJB server. OptimAlj exists as follows main EJB model elements:
l EJB Module (Module) - All generated EJB model elements of the package container.
l EJB Data Outline - Specifically specifies the data structure of the EJB component, contains the EJB data class and EJB data association relationship.
l EJB primary key class - represents the primary unique constraint. The EJB primary key attribute in the EJB primary key class is derived from the primary unique constraint in the domain model.
l EJB Entity Components - A business approach acting on the database and the data.
l EJB Session Components - Abstraction of a combined dataset. A session component is a service-centric comprehension that performs operations for entity components. It provides related data on behalf of the client's service to aggregate logic and a service from a single interface. Session components are created based on domain services.
l EJB Message Driver Components - represents a JMS message consumer designed in the EJB model. It or consumes a specific message or consumes all messages for special purpose (subject or queue). The code generated for this component is an implementation of a J2EE message driver bean.
OptimAlj reduces the complexity of generating EJBS and helps developers maximize productivity, flexibility and quality. Optimalj ensures that the efforts of the application system more efficiently, truly distinguish the company's business and reduces the time to submit to the market. However, in order to increase productivity, it is essential to care about EJB in the development of code, but also is essential for the deployment and testing of EJBS. Optimalj provides this integrated test and deployment environment. 6
Database model implementation
Develop a new application system requires a database script to create a database table. When the domain model is completed, the menu item "Generate Database from Domain" will generate a data model from the domain model. The data model contains the relational database definition of the application system. OptimAlj Generates the SQL command script for creating / deleting the corresponding database table for the underlying DBMS.
Developers need to define which data generates SQL scripts. Optimalj provides an integrated SQL workbench to perform SQL scripts. Optimaj Access the database with JDBC (Java Database Connectivity).
OptimAlj generates a deployment descriptor file, the J2EE package container 7 deploys the J2EE application through this file.
Optimalj also provides designs to design data access data (DAO) to designers. However, when saving data, EJBS is a better solution because it ensures safeity of the transaction.
Optimalj Generates a Data Access Object (DAO) component when converting from domain classes into database models. The Data Access Object (DAO) component also contains the functionality of page iterator. Itecher is an extension of data access object components. When browsing large quantities of data, it improves the performance of the application system. Do not return the entire data set, but maintenance represents the primary key list of the data set object, the iterator only returns the required data to the client browser. The amount of the list and page is defined in the properties file.
Display model implementation
The display layer defines a collection of default display components. These components are implemented based on JSPS and servlets and for HTML or WML clients. Display layers of domain models, domain models ensure the quality of consistency and front-end components.
Separation of display and business layers enable developers to create new web front ends on the existing EJB layer. Therefore, Optimalj contains a set of display models for generating an attachment. For example, by selecting a different display model, the same EJB layer can be used with a window-based user interface component with an HTML-based web component. Optimalj's detachable model architecture makes the same EJB to be used in different forms of expression. After generating a web component, the developer has a simple display layer and menu structure. Since the Web component is connected to the EJB layer, the database can be read, new, deleted, and updated immediately. OptimAlj implements a display model with an Apache Struts architecture based on model-view-controller (MVC) concept. The design of MVC is mainly in order to facilitate changes in control. It separates the interface of commercial logic and data and provides multiple advantages only based on JSP9. Editing JSP, CSS and JSP templates can change due to the system's appearance. Designers use the available web actions definitions and the user interaction of the application system, the web action can be edited. Adding new web actions is very easy. The designer enhances interaction with the HTML table by nested Java scripts in the JSP page. The Dreamweaver plugin provided by Optimalj can change the layout, which is convenient for web designers to change the look of the web components.
Model drive integration
Today's business facing the biggest business challenge is how to effectively use existing resources, such as systems currently being applied. Therefore, the collection of each development project requires a level of integration. Because development and integration are closely related, Optimalj extends its model-driven development environment, including model-driven integration environments. As an extension to the application model, OptimAlj provides an integrated model. When developing a new J2EE application system, the integrated model reduces complexity and accelerates the integration of the application system.
Optimalj can be integrated:
l Existing Web Services, including web services on the .NET platform.
l OS / 390 platform, through the Java Connector Architecture (JCA) standard.
l Existing Java application system
l Existing CORBA application system.
Optimalj's call mode is the basis for integrating models. Designers can accelerate and simplify the application integration by importing as follows files:
l Web Service Description Language (WSDL) file.
l Dynamic Program Connection (DPL) CICS COBOL Application
l Writing a message handler (MPP) IMS transaction with COBOL
l Java class signature
l CORBA Interface Definition Language (IDL) file.
Actuator mode recommends WSDL, CICS, IMS application, Java signature, and interface definition files to domain service models. From the domain service model, the JSP page is generated as a user interface for testing these components.
In addition, a session bean and its deployment descriptor are generated, and the session bean contains call code for third-party components. When Optimalj needs to call a method written in Java or any other technology, the actuator mode generates the corresponding code to call this method 10.
to sum up:
In the model-driven development environment, the first step in building a power application system is to model comprehensively and accurate modeling. In order to manage large application systems, model-based design and development is extremely important.
Optimalj Based on MDA / J2EE-based model-driven development and integrated environments for commercial modeling and software development, the gap is built with bridges, and is built by building a correct business model drive application, rather than other methods. OptimAlj provides a substantial potential reuse at different abstractions, which makes it easier for re-modeling for commercial needs to use changes. By separating commercial models and architectural models, separation architectural models and implementations, OptimAlj also enhances the quality of system performance, swing, and maintainability. Through these methods, Optimalj determines which layer of the system is applied to the system:
l Business change in the domain model.
l Architecture changes in the application model.
l Code changes in the code layer.
1 See Compuware White Paper "Optimalj: How to make a fast response to changes in the business rules
2 See Compuware White Paper "Optomalj: How to convert UML models to high quality J2EE applications."
3 See Compuware White Paper "Optomalj: How to convert the UML model to high quality J2EE applications.
4 See Compuware White Paper "Optomalj: How to convert UML models into high quality J2EE applications.
5 See Compuware White Paper "Optomalj: Dynamic Synchronization How to ensure the consistency of the code of the model."
6 See Compuware White Paper "Optomalj: How to integrate deployment is easy to test."
7 See Compuware White Paper "Optomalj: How to integrate deployment is easy to test."
8 See Compuware White Paper "Optomalj: Mode how to convert UML models to high quality J2EE applications."
9 See Compuware White Paper "Optomalj: Mode how to convert UML models to high quality J2EE applications."
10 See Compuware White Paper "Optomalj: How to convert UML models into high quality J2EE applications."