Rational®XDETM provides a true seamless integrated visual modeling environment for the most popular integrated development environment (IDE). Rational XDE does not only have the function of automated generation code and code / model, but it also has more features to assist software development. In order to better utilize Rational XDE, you need to understand the powerful J2EE mode and code template provided by XDE, you can apply J2EE mode and code template in the development, you can also define and create them. This article will show you how to use the capabilities of Rational XDE to complete a simple J2EE project development.
An overview of a simple application In order to show how to use the unique ability of Rational XDE, we will implement some features of a simple web application. This is a loan management application system that allows the lender and the loan administrator to perform some simple tasks. Lender
Online payment through the browser view installment plan loan administrator
To create one or more loan items to obtain information about booking reply, we must use the existing infrastructure platform: an IBM WebSphere application server and several databases. First we can use the free form of Rational XDE to model the direction and ideas of the relevant scheme, such as Figure 1. This free form of pictures provide us with apparent benefits: they allow you to use the same tool and make it easy to integrate the planned document into the project. Figure 1: Free form diagram is more extensive to display the key point automation analysis and design behavior once the initial plan is completed, we can start analysis and design. Although Rational XDE runs in a software development tool, it provides all the ability to complete traditional analysis and design activities - use case modeling, timing chart, etc. In fact, Rational XDE also provides Rational Unified Process? Configuration for Java Developers (RCJD), and RCJD provides the development of Java software has been proved. Figure 2 shows the initial use case model of a simple loan management system, which is obtained by discussions with customers and a step of refinement. Figure 2: The use case model of a simple loan management system For the sake of simplicity, we will only describe one of these uses to show the role of Rational XDE in the process. We choose "Show installment payment" this use case. The initial timing diagram refine the basic example of the scenario, see Figure 3. Figure 3: Detained timing chart showing the basic process of the installment payment case is obvious, this is a high-level interactive view and does not involve the details of the work inside any system. Rational Unified Process recommends using an analysis level class to provide more detailed content. See Figure 4. Figure 4: Show the refinement of the installment loan use case how to more accurately describe the content expressed in this figure has exceeded the scope of this article, you can get more detailed in the first three resource references listed in the article. information. Note In the example, we chose to divide the edge class into two pages. A more simple practice is to accept all edge interactions through a single element. Creating a model using a custom mode You may have a certain understanding of the design pattern of "4 people" (Gang of Four). These have defined patterns are supported in Rational XDE, and we will show the usage of certain modes in the rear section of this article. Rational XDE further supports the mode, which provides the ability to simplify the ability to define your own mode via UML. The ability of this custom mode not only allows you to implement your own design, but it can automate some work of boring in the modeling process, such as generating a plurality of cases. Typically, the use case has more than one event stream. For example, it shows installment lending cases with at least two event streams: one is a successful archive scene, and the other is a scene that does not fail when obtaining loan details. Figure 5 shows a custom mode (ucartifacts) that will generate a primary event stream (success), and two failed event streams. Figure 5: Custom Mode (ucartifacts) Automation Event Flow Chart This simple mode contains two input parameters: AuseCase acts as an input of an example model element, anactor as an input of the role model element. The name of the mode is created with the name of the input parameter, and the name of the use case is added to the Boundary, Control, or Entity name. These objects are used to define the framework of the timing diagram of the primary event flow diagram and two optional event flow graphs, which is based on the standard UML map provided by XDE. To create a timing chart is very simple, you can complete the work of creating the timing chart by dragging / disclosing the object in the model browser.
Each of the two optional event streams can use the role created by the pattern, any edgeary object, control (Control) object, and entity (entity) object. We can complete the example examples by drawing the required messages between different objects and deleting any analytical objects without participating event streams. Implementation Design Figure 6: Initial Class Diagram of "Show installment loan" example diagram Figure 6 shows the initial class diagram of "display installment loan" use case. This figure shows the basic role of implementing key requirements, but does not take into account other types used in the implementation. In order to achieve unified analysis modeling, we need to analyze other uses with the same method, and then combine the results. At this stage, our main goal is to identify and exclude duplicate classes, and combine similar and overlapping functions into the same class. For example, we can combine amortization and makepaymentControl into a separate control object, which can handle multiple use cases. Here we focus on "display installment loans", but there is no display of all the use case operations. You can get more knowledge about the use case through the first three reference resources of this article. J2EE Implementation This is almost independent of the specific implementation technique. Now let's take a look at how the XDE described earlier is applied to J2EE's development. Normally, the analysis class we discussed above will be mapped to the following J2EE technology: Edge Object (Boundary) HTML JavaServer Page (JSP) Control Object (Control)
Servlets Session Beans Message Driven Beans Entity Object (Entity)
Entity Beans Javabean For the development of the correct and reasonable J2EE technology when developing your application system, this is just a start point. Because different technologies can be used to achieve similar programs, the most reasonable choice depends on your requirements for details and systems. Of course, the coolest part of the Rational XDE J2EE mode is that each mode is fully implemented by XDE. What you have to do is to provide business logic for your app. In this section, let's take a look at the specific details you need to know in order to use the Front Controller mode. Establish a request between request and use case (for example, a form of submission) must be able to be simply specified to a particular use case. In the implementation of the Front Controller mode we discussed, this information should be conveyed through hidden domains in the form, and the name of the use case should be set when the form is created. When the form is submitted, the controller is simple to analyze the parameters to determine which case should be called. When the request is not specified to specify a certain case, usually a default use case function is set to process the request (see below).