CSC/ECE 517 Summer 2008/wiki2 3 kb: Difference between revisions
Line 41: | Line 41: | ||
==Java the UML Way== | ==Java the UML Way== | ||
The goal is to have a lightweight client browser at the front end sending requests to a Web server, which then acts as a broker in a container product that implements the application's business rules. The Web server uses servlets and JSPs to intercept the requests. For the business rules, alternate solution strategies involving JavaBeans and EJBs with Bean-managed/container-managed persistence are discussed, implemented, and compared. | The goal is to have a lightweight client browser at the front end sending requests to a Web server, which then acts as a broker in a container product that implements the application's business rules. The Web server uses servlets and JSPs to intercept the requests. For the business rules, alternate solution strategies involving JavaBeans and EJBs with Bean-managed/container-managed persistence are discussed, implemented, and compared. | ||
Although the application is simple, it makes use of a core set of UML diagrams and the Java framework. | |||
example: | |||
The Case | The Case | ||
*To renovate an apartment: | *To renovate an apartment: |
Revision as of 20:31, 25 June 2008
Unified Modeling Language(UML)
what is UML?
The Unified Modelling Language (UML) is a diagramming language or notation to specify, visualise and document models of Object Orientated software systems. UML is not a development method, that means it does not tell you what to do first and what to do next or how to design your system, but it helps you to visualise your design and communicate with others. UML is controlled by the Object Management Group (OMG) and is the industry standard for graphically describing software.
UML is designed for Object Orientated software design and has limited use for other programming paradigms.
UML is composed of many model elements that represent the different parts of a software system. The UML elements are used to create diagrams, which represent a certain part, or a point of view of the system. The following types of diagrams are supported by Umbrello UML Modeller:
- Use Case Diagrams show actors (people or other users of the system), use cases (the scenarios when they use the system), and their relationships
- Class Diagrams show classes and the relationships between them
- Sequence Diagrams show objects and a sequence of method calls they make to other objects.
- Collaboration Diagrams show objects and their relationship, putting emphasis on the objects that participate in the message exchange
- State Diagrams show states, state changes and events in an object or a part of the system
- Activity Diagrams show activities and the changes from one activity to another with the events occurring in some part of the system
- Component Diagrams show the high level programming components (such as KParts or Java Beans).
- Deployment Diagrams show the instances of the components and their relationships.
Web extensions to UML: Using the MVC Triad
Current Web Modelling Languages (WMLs) fall short of the requirements for the modelling of web system development. In particular, those WMLs with a hypermedia basis are more closely focussed on the information architecture whereas software system WMLs are more focussed on the functional architecture. Generally, modelling languages have failed to bridge the gap between these two areas. They also do not handle well the connection between different levels of abstraction and are largely unable to connect well with business models. Based on an analysis of existing modelling approaches, we propose a conceptual extension to modelling approaches that attempts to address these limitations. We show how it can implemented using UML modelling along with the addition of concepts taken from Web information modelling approaches, WebML in particular. The extensions are structured around the Model- View-Controller concept, which we argue provides an appropriate integrating modelling framework.
Java the UML Way
The goal is to have a lightweight client browser at the front end sending requests to a Web server, which then acts as a broker in a container product that implements the application's business rules. The Web server uses servlets and JSPs to intercept the requests. For the business rules, alternate solution strategies involving JavaBeans and EJBs with Bean-managed/container-managed persistence are discussed, implemented, and compared.
Although the application is simple, it makes use of a core set of UML diagrams and the Java framework.
example: The Case
- To renovate an apartment:
- How much paint, or wallpaper, will you need for a wall? Or how much flooring?
- Here: A little program calculating the area of a surface, e.g. afloor or a wall.
- We'll work with this case throughout the book. At last we'll have a useful program with graphical user interface (Fig. 15.8)
- Basic questions when solving a programming problem:
- utput data: What do we expect to get? What will the program display to theuser?
- Input data: What has the user to input for the program to produce the given output?
In this case:
- Output data: the area in square meters
- Input data: length and width
Example Run: Length: 5.8 m Height: 2.4 m The area of the wall is 13.92 square meters.
Unfortunately, it is rather difficult to read data in to a program in Java. The Source Code
class WallCalculations{public static void main(String[] args) { double length = 5.0; double height = 2.3; double area = length * height; System.out.println("The area of the wall is " + area + " square meters."); }
/* Example Run:The area of the wall is 11.5 square meters.*/input data are coded directlyinto theprogram, rather than readfrom the user calculation ouput data Three variables. A variableis a place of storage in the computer's memory. The contents of a variable are interpreted according to the data type.Here the type is a decimal numeral (double).
Ruby the UML Way
- ruby-uml tries to trace different aspects of an existing application, which is intended to provide support for refactorisations by generating UML-graphs.
- ruby-uml is able to generate textual representations of the gathered informations.
- These representations include pic- or dot-code that can be converted to images by their corresponding applications.
- At this time ruby-uml is able to generate sequence- and class-diagrams.
References
- http://www2.tisip.no/JavaTheUmlWay/
- http://ruby-uml.rubyforge.org/
- Gu, A., Henderson-Sellers, B., Lowe, D.: Web modelling languages: the gap between
requirements and current exemplars. In: AusWeb. (Submitted, 2002)
- OMG: OMG Unified Modeling Language specification, version 1.3 (released to the
general public as OMG document formal/00-03-01 in March 2000) (2000)
- Booch, G., Rumbaugh, J., Jacobson, I.: The Unified Modelling Language User
Guide. Addison-Wesley (1999)