Você está na página 1de 7

Reading

InfSci 2511 Information Systems: Advanced Topics


Lecture 7 3/17/2003
Textbook: Applying UML and Patterns: an introduction to OOAD and the UP (2nd edition) C. Larman Chapters 35,36,37: OOAD in UP, Project Plan. Chapters 31,38: Package, Component, Deployment.

Topics
Mid-Term Review Assignment 5 The Unified Process of OOAD and Term Project documents required Package, Component, Deployment

Assignment 5
Given OO analysis, perform OO design. Provided: Domain Model, Use Case Model. Only one system event: pedestrian pressing the button, system responds with the operation to allow crossing. Design OOD solution; express in UML Interaction Diagrams. Formulate Design Class Diagram.

Topics
Mid-Term Review Assignment 5 The Unified Process of OOAD and Term Project documents required Package, Component, Deployment

The four phases of UP for OOAD


UP organizes the OOAD process into four phases:

Inception vision and scope (may be vague), business case with rough plan and estimates. Elaboration refinement of vision, core architecture, risk resolution, capturing requirements in context, and project scope, with more realistic plan and estimates. Construction implementation and system integration. Transition system deployment.
UP organizes the OOAD process into 4 phases
Inception Elaboration Construction Transition

Iterative Development Cycles in UP


phases

UP for OOAD: the Disciplines


Business Modeling Requirements Analysis Design Implementation Testing Configuration & Version Control Environment Project Management

Inception

Elaboration

Construction

Transition

iterations

Except the inception phase, all phases of UP consist of iterative development cycles; each is an iteration. A stable executable subset of the final product marks a release each iteration is a minor release. A mile stone marks an iteration endpoint when significant decision or evaluation occur. Each phase indicates the major disciplines involves in the iteration development cycles.

Inception Phase
Inception to capture most of the requirements expressed in the context of use cases, understood from the perspective of the stakeholders interests.
Inception Elaboration Construction Transition

Inception Phase Documents


Vision Statement Business Model and Business Case Use Case Model
Use Case Diagram Use Cases (descriptions in brief format) Supplementary Requirements Specification

1. Vision and Business Case 4. Data Dictionary 7. Phase Plan

2. Use Case Model 5. Risks and Risk Management 8. Iteration Plan

3. Supplementary Specification 6. Prototype and proof-of-concept 9. Development Case

Phase Plan Iteration Plan (with use case ranking)

Use Case Template (brief, casual, fully-dressed)


Use Case name: name of use case Primary Actor and Goal: primary actor and intention Stakeholders and interests: various stakeholders and the
interests represented.
.. .

Use Case Diagram


Treating the system to be built as a black box, the use case diagram defines the system boundary, and the actors (external parties) interacting with the system. The use case diagram presents a set of use cases in the context of the external actors as to how they would use the system. UML provides this notation:
Use Case 1

Pre-Conditions: Situation assumed in the use case. Post-Conditions: Situation to be achieved. Main Success Scenario: (1 column or 2 columns) Alternative Scenarios: (1 column or 2 columns)
.. .

Special Requirements: such as quality attributes Technology and data variations list: Innovation may imply risks Frequency of Occurrence: load: peak and average cases Open issues: to be resolved

Actor

Use Case 2

Actor

The System

Elaboration Phase
Elaboration The Elaboration Phase involves repeated development cycles; within each cycle, the system is extended
Inception Elaboration Construction Transition

OOAD Process: Iterative Development


Elaboration A strategy for each development cycle is to bound it within some time frame, a fixed period such as 4 weeks. (In practice, 2 weeks to 2 months OK.)
Inception Elaboration Construction Transition

Development Cycle 1

Development Cycle 2

Development Cycle 3

Development Cycle

Development Cycle 1

Development Cycle 2

Development Cycle 3

Development Cycle

Refine Plan

Sync. Artifacts

Analyze

Design

Construct

Test

fixed period of 2 weeks to 2 months

Elaboration Phase: OO Analysis


OO Analysis: choose use cases to re-write in expanded formats, build a conceptual model, define system events and system operations in a system sequence diagram, write contracts
Static structural analysis: Domain Model. Dynamic behavioral analysis: System Sequence Diagrams and the System Operation Contracts.
Refine Plan Sync. Artifacts Analyze Design Construct Test

Elaboration: OOA Documents


The Domain Model: a class diagram in the conceptual perspective. The Use Cases to fulfill: expand them into the fully-dressed format. System Sequence Diagrams: identifying the System events and System operations. System operation contracts.

1. Select Use Cases to expand. 4. Write System Operation Contracts

2. Build or Refine Domain Model 5. Define State Diagrams (if needed)

3. Define System Sequence Diagrams 6. Refine Glossary for Data Dictionary

OOA: Static Analysis


1..* 1..*

OOA: Structural Model


is placed on

Book Copy
1..* 1

0..* 1

Shelf

is located in
0..* 1

Library
1 1 1

Static Analysis: Choose Use Cases to expand in formats. (Delay design decisions such as user interfaces) Build a Domain Model: (aka Conceptual Model)
discover objects (Use category list, CRC method.) identify need-to-know associations sort out essential details for objects: attributes

is a copy of

is loaned out in
1

consists of

Book
1

is described by
1

Catalog Card
*

is kept in
* 1

Catalog
updates 1

is located in
1

generates
1

is located in manages J J

produces
1 *

New Books Arrival

initiates
1 1 1 0..4

Add Books

* *

Book Supplier

Book Loan
*

is kept in
* 1

Circulation
updates 1

1 1

generates
1

makes
1

Book Loan Request

initiates identifies 1 borrower


1

Loan out Books


*

* *

manages J J
1 1

Librarian
1

checks

Goal: build a structural model of the system (i.e., the domain model) to explain the problem domain, as expressed in the use cases.

Patron
1

Registration
*

is kept in
* 1

Membership
updates 1

is located in

generates
1

makes

Registration Request

initiates
1 1

Register Member

* *

manages J J

The Domain Model

OOA: Dynamic Analysis


Dynamic Analysis: System Sequence Diagrams and Contracts for System Operations Draw System Sequence Diagrams, at least one for each Use Case to be fulfilled in this development cycle. Identify System Events and System Operations. Write a Contract for each System Operation. Goal: build a Behavior Model of the system (i.e., the Use Case Model), the contracts serve to be our best guess of what should happen to the state of the system.
Use Case: Buy Items. (typical course of events) ..

OOA: Behavior Model


Cashier

The Use Case Model


:System
CONTRACT
Operation: Description:
... ...

makePayment(amount)

enterItem(prod,quantity)

CONTRACT
endSale( )
...

...

Operation: Description:
... ...

CONTRACT
enterItem(prod,quantity)
...

post-conditions:

Operation: Description:

post-conditions:

... ...

endSale( )

post-conditions:

makePayment(amount)

Use Cases

System Sequence Diagrams

Contracts for System Operations

Use Case Diagram

Elaboration Phase: OO Design


OO Design: define GUI and write concrete use cases to refine the domain model, design how objects would interact in collaboration and sequence diagrams to fulfill contracts and use cases (applying design patterns), construct design class diagram
Behavioral Model: Interaction Diagrams. Structural Model: Design Class Diagrams.
Refine Plan Sync. Artifacts

Elaboration: OOD Documents


The Use Cases to fulfill: expand them to cover the User Interface Design. Interaction Diagrams (Collaboration Diagrams and Sequence Diagrams) to fulfill the system operations. Design Class Diagram to formulate the software solution for the system class diagram in the specification perspective. Organize class diagram in packages for Component Diagrams and/or Deployment Diagrams.

Analyze

Design

Construct

Test

1. Write Concrete Use Cases with UI 4. Define Design Class Diagrams

2. Refine System Architectural Layers 5. Organize System into Packages

3. Define Interaction Diagrams 6. Define Database Schema

OO Design: structure to support behavior


Expand Use Cases, with GUI design. Interaction Diagrams (Behavior Model): to implement the system operations.
Collaboration Diagrams Sequence Diagrams

OOD: Design Class Diagram


Loan out Books
checkStatus(ID) checkOut(,ID)

Circulation Membership Loan List


fetchMember(ID) add_to_list(Loan) fetchBookLoan(ID) insertNewRecord(Loan)

Applying design patterns Goal: the intended solution as expressed in Design Class Diagram (Design Model).

Registration
ID name, address status

Loan
ID Call No, Copy No due date

activeMember( )

display( )

Construction: OOD Documents


Design Class Diagram to formulate the software solution for the system class diagram in the implementation perspective: with all details such as private fields and method definition. Test or demonstration of results, if system release was achieved. (No need to be complete; partial system acceptable!)

Topics
Mid-Term Review Assignment 5 The Unified Process of OOAD and Term Project documents required Package, Component, Deployment

Packages
A package is a collection of software classes. Organize classes into sub-systems. Traditional architecture (3-tiers):
Presentation Layer: graphical user interface Domain Logic Layer: business logic Services Layer: database, communication

Typical 3-Tier System


Presentation

Graphical User Interfaces

Domain Logic

Business and Application Logic

Services

Storage Management, Communication Persistent Storage, Network connection

Possibly Multiple Tiers Use UML Package Notation.

database

Motivation for Layered Architecture


Isolation of application logic into separate components which can be re-used. Distribution of tiers on different physical computing platforms (processors), and/or different processes for coordinated information sharing in Client/Server systems and for modular expansion. Allocation of developers in the construction effort: different teams for different tiers. (parallel effort) Effective management of a large system.

UML Package Notation


Library Info System

Membership

Catalog

Circulation

UML Package Notation


A folder for each package. Each package is primarily a collection of classes, but it may also contain related documents and artifacts such as interaction diagrams, conceptual models, use cases Each package has a name on the tab, or at the center, which ever is more convenient. A package may contain other packages. A package used to avoid class name conflicts should be implemented in its namespace or nested in some class definition.

Identifying Packages
Group classes that provide a common service, with relatively high coupling and collaboration among themselves into one package. Viewed from outside the package, the classes contained inside should have high cohesion referring to some common service. In contrast, the coupling between packages should be low.

Packages for architectural layers


Presentation

Other UML Package Notation


Presentation::LIS

LIS Portal

GUI Components

Domain Logic

Catalog

Membership

Circulation

Domain::Membership

Domain::Circulation

Services Service::DBMS

DBMS

Communications

Other UML Package Notation


Presentation Domain

Components
A component is a modular, deployable, and replaceable part of a system that encapsulates implementation and exposes a set of interfaces. Examples are: executable files, DLLs (-.dll or -.so), servers, JAR file, applets and servlets, executable models, and in some cases, source files and binary files.

Lib Info Syst

+
Membership Circulation

Service

DBMS

Component Diagram in UML


HTTP HTTP

Deployment Diagram in UML

Web Server Browser


HttpServlet Application: Presentation & Domain

JApplet API

Servlet Applet Database Server

Services

DBMS

System Deployment on the Web


Web Browser

Presentation Applet

Web Server

HTTP on the internet

Domain DBMS Services

Você também pode gostar