Why Use the J2EE and the UML Together?

Any reasonably proficient programmer can develop a piece of software that will do the job—for a while. But building an enterprise system that is maintainable, scalable, and evolvable is a different matter altogether. And these days, when a system must evolve at a breakneck pace or face obsolescence, it is all the more important to take the long term view because you will need to maintain, scale, and evolve the system you are building!

It is possible to survive and thrive for a while by coding, compiling, fixing, and deploying your application. Sooner rather than later, you will most likely find that your system is not able to scale to the new growth demands. This is because your system probably was not architected and designed so that it could evolve easily in the face of new requirements.

The UML provides the tools necessary for architecting and building complex systems, such as those required for an enterprise. It supports, among other disciplines, requirements engineering, architecture-level design, and detailed design. In addition, UML modeling tools are evolving to where they can be used to impose consistent design patterns upon a J2EE-based system model and to generate a significant portion of the system's executable source code.

UML's support for requirements engineering is mainly manifested in its support for use cases, which are used to understand and communicate functional requirements. Using UML for requirements modeling, in conjunction with a use case driven development process, facilitates traceability from requirements to design. Traceability, in this context, implies the ability to determine the elements in a design that exist as a result of a specific requirement. In a use case driven development process, specific design elements are created for the purpose of satisfying a use case. Thus, traceability is often achieved implicitly.

Such traceability has various benefits. For example, the ability to identify the impact of changes in requirements on the design can not only simplify the task of modifying a system to meet new requirements, but also help focus testing of the system after the changes are complete. Similarly, the ability to determine the requirements that led to the existence of specific design elements can assist in eliminating unnecessary design elements.

Let's walk through a simple scenario to illustrate this. Imagine that your project has a requirement R1. In the use case model, you create a use case named deliver in response to R1. In the analysis model, two classes compute and route are created to fulfill the use case. The use case is realized by a deliver use case realization and classes compute.java and route.java are created to fulfill the deliver use case realization. If there is a change to R1, can you easily determine which classes will likely need to be tested? Conversely, can you justify the existence of compute.java in the implementation model?

As the functional requirements change or new ones are added, the system model can be examined to determine which portions of the system's architecture and detailed design are impacted by the changes.

UML includes modeling constructs that can help developers understand how large-scale portions of the system interact at runtime and depend upon each other at compile time. Additionally, UML modeling tools can include checks to ensure that design details do not violate architecture-level constraints. Such tools thereby can help ensure that the quality of the system's architecture is maintained through multiple releases.

UML diagrams, such as interaction diagrams, activity diagrams, and class diagrams, can be used to understand and document complex interactions within the system. These help in the analysis of the problem and also provide a detailed record of the as-designed behavior and structure of the system. So when it is time to incorporate new functionality in the system, you know what the design intent was and what the inherent system limitations are.

In addition to supporting the ability to create generic UML models, UML modeling tools are evolving rapidly to a point where they will help impose consistent, accepted patterns of object interaction into a system design. For example, consider the challenge of determining when to make use of session beans versus entity beans, when to use stateful versus stateless session beans, and when to use JavaServer Pages (JSP) versus servlets. In the future, these types of design decisions may be codified within a tool and applied upon demand.

Finally, using UML enables developers to move to a true visual development paradigm. In addition to enabling developers to impose consistent modeling patterns into their designs, modern UML modeling tools generate an increasing amount of highly functional J2EE source code. As a result, developers can concentrate on higher value design activities and leave much of the labor-intensive coding to the modeling tools. A visual representation is also excellent for communicating the design among the team. In addition, it can be used effectively to ramp-up new team members rapidly.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.156.202