Apply Rational Tool Simplify J2EE-based projects
Part 5: Architecture and design
Steven Franklin Software Designers and Process experts in April 2004
This project has entered a more technically phased phase when the J2EE sample item of RUP and other Rational tools is converted into architecture and design (including data modeling and construction test design imaginary prototype). This series of Part 5 first checks the time schedule of the project, and then when we enter the architecture, design, data modeling, and create prototypes, we have made it in the next stage.
Part 5 Snapshots in Part 5 Demo Tools and Techniques:
Rational Rose Enterprise Edition is used to create a design model (including Data Modeler using ROSE) Rational RequisitePro - The product used to add or refine demand or updated:
Design Model (Rational Rose) - Created to add architectures and design information (including database planning (Schema) RequisitePro Database - updated to add or refine demand based on architecture and design exploration
Project time progress
Let's check the overall progress of the ASDI project before starting a detailed architecture and design work. As you can recall in Part 1, this series of articles composed of multiple parts cover the first stage of the project: a series of needs, a reference architecture and code (ideal reusable) as the result of the results Verification. So far, we probably use one-third of the first phase budget, but we are approaching the project time progress. This is among our expectations, because we are interested in making progress slightly slow. Analysis and planning activities are always moving with slower pace, and teams should have gradually established them at the beginning of the project.
Because the first phase requires evidence of a related structured and formal concept, we use it as a small project to complete it by testing and QA (peer review) on the evolved product. RUP has some mechanisms for developing concept evidence, which is basically in the synthesis of the implementation architecture of the workflow. We are further transforming the concept's evidence into available beta products. We can put more features, risk reduction, and product maturity. The more we use skills and knowledge to use the system's product version, the more happy our customers will.
This next series of tasks will be more technical than the previous activities. We are very good to architecture. Design, data modeling and prototype advancement. In Part 4, we discussed some prototypes and assessment how our tool selection; now our prototypes focus on testing our ideas, system descriptions and design.
Transition to architecture and design
Architecture and design activities are the most pleasant and creative tasks in the ASDI project. We are proud of us to promote the efficient, safe and simple and elegant and elegant system plan. The prospects of the technical solution have been produced in many exciting meetings, free discussions and technical explorations.
Simply put, architecture is intended to capture technical flexible programs, which can cover the system requirements we defined last month. Whether it is to look forward (for design) or backward (for demand), the architecture team will suffer huge pressure. Rational Rose's integrated development environment simplifies this challenge by letting us do the following things:
Use SODA to generate documents to allow architectures and design elements to simplify check and keep everyone have consistent current vision. Directly update the class's signature (method and attribute) from the scene to make us not need to return to the class's instructions to add a missing method. To automate tasks, such as generating Rosescripts, checking the integrity and validity of the naming habits, and test models of the model (you can get access to the Tools menu). With ROSE's RUP template, provide a model framework for RUP guides. Drag the class from the J2EE class frame in Rose. The model decomposes the model decomposes the model with Rose's "unit control" feature. Note that because the system we created in the past project is similar to the current system, if we reference some reference architecture, our architecture will benefit from it. However, we cannot find any reusable opportunities in existing packages or design patterns, so we just refer to the ideas and classes that may be used in future uses.
Transformation from the use case to the design class is slow, and multiple iterations are needed. This involves analysts and designers, because we have few more comfortable and customer discussions in the field of business.
The goal of this event
Sometimes it is tempting to convert a direct conversion into code. In fact, we do this in the previous project (because we have a very detailed demand instructions), we are very confident in our understanding of the project. This creates an error. Demand is missing, the range is difficult to be tracked, and a lot of work and rework is useless. Use design models to connect between demand and code is important; design models can capture errors and problems in the development and testing.
In the process of transformation from the use case, we hope to be able to achieve:
The knowledge of the analysis team will teach the engineering team. Identify technical solutions that meet all needs - or where it is not possible, identifying the needs of technical solution conflicts, and determines if they are important or changed or deleted. Identify help determine the team structure, architecture hierarchy, and a candidate for purchasing software. Specify the details of the technical solution and start plan how to assign work in the team. Prevalence of Plan and Budget Based on Design Models. Assign classes to platforms, products and private code. For feedback and synchronization, software architectural documentation is generated, and the software architecture document can be distributed to internal and external team members.
Stable design
Transformation from use cases and analysis and design and design is inevitable. We need to do a lot before we can have a satisfactory design. Figure 1 shows the main activities we define a stable design in our way.
Figure 1: Transformation from the use case model to the design model
The previous article part discusses most of the activities and products prepared as "architecture" as "architectures, especially SOW requirements, use cases, business object models, and analysis classes). In addition, these other activities are also important for design work:
Determining the structure of the package (create a database plan) Creating prototypes and screen simulations
These will be discussed along with how to handle new and changing needs together.
Package and subsystem structure
The entire team has to agree on a good package structure before starting to consider the design class. Regardless of our final decision, it should be a guideline in the design process, and all team members must comply with this guideline.
The choice of package structure We have been arguing that it is divided according to subsystems (Fig. 2) or in the hierarchy of the architecture (Figure 3). Table 1 lists the actions and disadvantages of each method.
Figure 2: Follow the subsystem definition package
Figure 3: Division of the package according to the level of the architecture
Method advantage of the disadvantage, according to subsystem definition packages
It simplifies the management of the model. Complex subsystems can be assigned to large teams with a single * .cat file or * .cat file. It can be easily tested for dependent dependence on subsystems. It simplifies the plan for project increments. It encourages reducing subsystems to make architectures easier to understand. It increases the possibility of subsystem reuse. Consistency between subsystems and the shared relationship will be harder to coordinate. For example, DBA may be more struggling to understand the blueprint of the data layer, or dependence between data abstractions and planned entities. It promotes the discouraged reuse of universal service packages. Follow the architecture level
Consistency between levels should be maintained. It isolates different technical fields: JavaServer Pages (JSP) of the user interface; Enterprise JavaBeans (EJB) and servlets in the business logic layer; entity beans, classes, and data layers. It adds the possibility of reuse system architectures.
Not all code is just a layer in line with the three-layer architecture. For a subsystem, team leadership or remote team must check (check out) several * .cat files to update or obtain all permissions of subsystem models. If all models are not detected (Check Out), it is often difficult to report or present a specific subsystem.
Table 1: Comparison of packaging methods
In the end we used the first method, divided the design model according to the subsystem. We think the system is small enough, we can keep the consistency between the subsystem.
Subsystem structure design Our top-level package structure is like Figure 4. You can see the identified subsystem from the top package (so prototype << subsystem >> is assigned to each subsystem).
Figure 4: Structure of top bag
We conducted a lot of discussion before we turned this early draft into the final stable package structure. Below is some of our concerns:
How do we organize universal services? Answer: Public services are placed separately in a sub-package (log service; data synchronization and backup service; access control service and login service). Should we draw a line between Shipping and Part Management? Answer: We don't need to connect them two. We define subsystems based on the field or architecture? Answer: Architecture can be combined with the domain in most places. Do we allow bidirectional dependence between packets? Answer: No. This is a bad design practice that violates our internal design guidelines.
As an example, we will focus on the Command Gateway subsystem. Although many places in the system are centered on an internal and external Web interface, we still plan to provide a secure, XML-based command gateway (Command Gateway), this command gateway allows ASDI's system with its large customers A B2B (Business-To-Business) interface is formed. This feature allows these customers to be able to query, submit, and update information from their existing systems. This is very important because some companies' needs cannot be accessed through the web interface. On the contrary, they need to be batch from the company's code or behind the scenes.
In each package, our initial class maps come from our usage example, business object model, annotation, and interviews. Figure 5 shows the evolution process of the Command Gateway subsystem from early thinking to detailed design.
Figure 5: Initial design of Command Gateway
In this first round of design, we simply identify the main part of the Command Gateway subsystem, there is a problem that must be concerned at this level:
Do we use XML? (Problems include broadband consumption, stability, and interpreter maturity). Do we want to send and receive data to customers? We want to provide a client software for command or just a specification for this command? Do we want to transfer XML via SSL (Secure Sockets Layer, HTTP or private socket communication In subsequent design (Figure 6), we identify more dependencies in the system and start identifying things that look like implementing classes. We are still in debate the high-level concept, so we are not interested in the signature of documents and classes (methods and properties). The signature of the document and class should be filled in when we feel that the design began to stabilize.
Figure 6: Medium design of Command Gateway
As shown in Figure 7, we will later refine some of our identified dependencies, appropriate methods and properties (hidden in the figure to save space), and add some techniques. For example, by establishing a prototype we identify a solution to the JSSE (Java Secure Socket Extension as an SSL connection between the customer and the server. JSSE is integrated directly into JDK 1.4, which is just an additional part to JDK 1.4.
Figure 7: Mature CommanD Gateway Design
This design is not final. Although the design has been tested through numerous scenes, it will find incorrect or missing details in the design in the next few week and months.
Change of management requirements
When we are architectural and design, we identify the need to add new needs or refine the required system requirements. Ignore some small changes is tempting, but we see a considerable budget to complete changes. Small gaps on the budget will increase the time required and give the customer a poor precedent. We find that all adds and changes will help us keep your expectations and forced us to ask, "Do we really need this in the future?" This is a key point we usually ignore: If a demand is not enough Enter the system, this demand is not worth implementing.
Sometimes the introduction of demand will have a negative impact on existing evolution and budget. This requires us to sit down and discuss the choice - but first, we should discuss our internal, so that we can trustworthy to make an alternative, not a simple "impromptu performance." Selection usually includes the following aspects:
Postpone the demand. This usually occurs when demand is not important, or other needs are not currently being built. Remove the demand. This happens when it is more important. Instead of replacing an existing demand with a new requirement. If there is something that already exists is not important or this is not particularly urgent, we can postpone or remove this demand for new demand in time schedule and budget. Add demand to current work. This choice is only considered only when unacceptable risks to existing needs and the entire system plan. Adding any important needs naturally require additional time and budget.
Change the use case is not a problem because we have strict version controls for the use case and can be updated directly in the model. In addition, it is also easy to use Rational RequisitePro's use to integrate programming back to SOW. However, traceability we hope, we have spent time to establish Rational ClearQuest to manage the changes in demand. Sometimes the change is identified inside, but more cases are external requests. Our changes management process is very awkward, including monthly conferences, hard-copy files, and more. A more seamless change request process is almost growing in the control range, producing better systems and higher and more than a more opportunity.
Data modeling
When we started the design work described above, we also started modeling data. In the previous project, we used Rational Rose to design and found that the split between persistent classes and temporary classes was a bit awkward: once we identified a class for lasting storage, we set its persistent attributes and started Other tools model him. In ASDI projects, we used Data Modeler integrated in Rational Rose Enterprise to perform data modeling and found over more mature. In fact, we originally used the old way to make a mistake - put your lasting object into their own folders, and forgot them - but we could make them with ROSE to convert these objects into data models. . Put all collected persistent classes into a package, we can click on the package with the mouse button and convert them into data models (select Data Modeler> through the context menu).
The data modeling creates a database plan in the ROSE model. We will then translate these plans from its logic to a physical DB2 installation and access the watch and test data to the engineering team.
prototype
As the foundation of architecture and design, good analysis is important, but prototype is also very valuable. Many ideas look very good on paper, but our assumption only has evidence to provide.
The engineering team is very like prototype activity. Typical time plan for these activities is very confident, the goal is blurred, technology is new, and QA is relaxed, so prototype is usually very interesting - a lot of waste of money. We have found that if the prototype does not have clear, we can measure the target, it will soon fall to "what I can do ...", rather than reducing risk.
We usually do our best to maintain consistent with RUP's evolution product theory. RUP can guide us to evolve all our prototypes into ultimate products. In fact, we retain the term "prototype" for fast exploration. In order to release the greatest value from the prototype, we often ignore the code standard, the same level check, and similar processes. Some aspects of prototype (instructions, design modes or coding habits) may be reused, but we have a very small pressure to reuse this. Instead, our prototypes are often summarized as a technique for technical comments or become a sample application that can be found in the project.
It's right away, a work package must be drafted. For its developers, this package can summarize the target of specific prototypes. We allocate budget and time plan for each prototype, including interim checks before the task is completed.
We don't always create prototypes by direct coding. Sometimes we execute tools for the tool by learning any code. When evaluating the database, for example, we are based on our experience, the information provided by the supplier and the third party check from the class list.
We have found several ways to build prototypes and tools:
Review (read, repeated view, interview) Code (in-depth code snippet can explore specific interface, demand or performance issues, and clear, concise code snippets can display connectivity, workflow and availability) Prototype installation and demo tools Provider's demo
The key to the use of prototypes is to determine the degree of realization of prototype. Few prototypes can be designed to be 100% confidence in recommendation. Instead, the prototype must demonstrate enough results to reduce risk to an endurance level.
Table 2 lists some specific prototype activities we have adopted in this project.
Prototype activity results Research (Coverty Characteristics, Cost and Performance) Orion Application Server Selection (MORE INFORMATION, see Section 4) OOBD evaluation (overlay features and market share) to meet customer preference decision to give up using OODB Information, see Section 4) Research Relational Database (Coverage Characteristics, Cost and Performance) Select DB2 (More Information, See Section 4) JSSE Evaluation (Cover Complexity, Stability and Security) In the B2B scheme, JSSE User interface simulation (test availability, workflow, and "Outwork") For "Outwork, User Interface Guide and Standard Development", data modeling (using Rose's Data Modeler) is familiar with Rose Data Modeler Generate create tables, triggers, etc. For early prototypes, Tao XML exploration (see "related resources") and create a B2B interface prototype unanimously agreed that the good format of XML is better than trusted third-party interpretation. Marked XML more important EJB and JSP and Servlets comparison Decide to use JSP and Servlet Table 2 in Section 1: Prototype Activity
to sum up
Our architecture and design of the system is quite mature; our prototype has achieved great success, and we will soon be started. This means that the process of tracking projects is more important than maintaining project vision in the prescribed direction and carefully planning every iteration and incremental.
To now, we have tried and selected all the main technologies and third-party tools, and we are very satisfied with tool providers to do their work. We made this decision through the planned prototype, and not just hope or believe in silver. The prototype also helps our engineering team, giving us our skills and skills.
Planning the future in the near future, we will enter the implementation of the system. We plan to achieve the following objectives:
Command Gateway, there has been some largest technical risk graphical user interface, which will provide customers with useful inspection products for some general services needed by many subsystem functions.
Before doing any implementation, we must prepare in multiple aspects, including updating our team's structure to meet our new needs, documentation code, and design agreements and exchange efficient development methods (including unit testing and same). Level check). The engineering team will need a complete understanding of bidirectional engineering, debugging, analysis, and more things.
The main risk JSSE prototype points out that JSSE is a more complex API we initially expected. In particular, security has a huge opportunity for the spread of the project, so we must work closely with ASDI to understand what kind of security they need. Work from demand does not involve key length, encryption mechanism, and details of other underlying.
Finally, we choose and JSP and servlets on EJB, we know that our architecture may need to rework on the second phase. We are willing to reserve it as the risk of that stage, because we fully submit this technology to choose