Systems Analysis and Integration assignments

profileiAREduce
w3c11.ppt

CIS320
Systems Analysis and Integration

Week 3 – Use Case Realizations

*

Systems Analysis and Design in a Changing World, 6th Edition

*

Chapter 11

  • Overview
  • This chapter focuses on the Design Process, proceeding use case by use case, and within each use case, layer by layer
  • Outline
  • Detailed Design of Multilayer Systems
  • Use Case Realization with Sequence Diagrams

Systems Analysis and Design in a Changing World, 6th Edition

*

Systems Analysis and Design in a Changing World, 6th Edition

*

Detailed Design of Multilayer Systems

  • CRC Cards focuses on the business logic, also known as problem domain layer of classes
  • Three layers include view layer, business logic/problem domain layer, and data access layer
  • Questions that come up include
  • How do objects get created in memory?
  • How does the user interface interact with other objects?
  • How are objects handled by the database?
  • Will other objects be necessary?
  • What is the lifespan of each object?

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Use Case Realization with Sequence Diagrams

  • Use case realization—the process of elaborating the detailed design of a use case with interaction diagrams
  • Two types of interaction diagrams
  • UML sequence diagram
  • UML communication diagram
  • Sequence diagrams, aka use case realization sequence diagrams, extend the system sequence diagram (SSD) to show:
  • View layer objects
  • Domain layer objects (usually done first)
  • Data access layer objects

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Start with System Sequence Diagram (SSD)


Use case Create customer account

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Sequence Diagram to show View Layer and Part of Problem Domain Layer

Systems Analysis and Design in a Changing World, 6th Edition

This is a two layer architecture, as the domain class Customer knows about the database and executes SQL statements for data access

Three layer design would add a data access class to handle the database resulting in higher cohesiveness and loose coupling

Note :CustomerForm is an object of the CustomerForm class, :CustomerHandler is an object of the CustomerHandler class playing the role of a controller stereotype (both underlined becuase they are objects)

aC:Customer is an object of the Customer class known by reference variable named aC

Note: the create message to aC:Customer points to the object symbol to indicate create

*

Systems Analysis and Design in a Changing World, 6th Edition

*

Overview of Detailed Design Steps
Shown previously in Chapter 10

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Create Customer Account Use Case
Start with domain model for Customer Account Subsystem

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Create Customer Account Use Case
First cut design class diagram for use case

Select needed classes, elaborate attributes, add controller, and add navigation visibility

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Create Customer Account Use Case
First cut sequence diagram expanding SSD, adding controller, and adding needed classes

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Create Customer Account Use Case

Add messages and activation to complete collaboration

This is just the domain layer

These domain classes handle data access, so this is a two layer architecture

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Developing a Multilayer Design

  • View Layer
  • With users, there is always a view layer. Add forms or pages
  • Data Access Layer
  • Persistent classes need some mechanism for storing and retrieving their state from a database
  • Separate layer required when the business logic is complex and there is a need to separate connection to database and SQL from the domain classes.
  • For each domain class, add a data access class to get data and save data about an instance

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Adding Data Access Layer
Example of a use case

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Adding View Layer
Fill shopping Cart use case

Sequence diagram just shows View interaction with the controller

View classes don’t need to even know about the domain or data access layer

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Designing with UML Communication Diagrams

  • Shows the same information as a sequence diagram
  • Symbols used in a communication diagram:

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Communication Diagram for Fill Shopping Cart Use Case

  • This diagram should match the domain layer sequence diagram shown earlier
  • Many people prefer them for brainstorming

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Updating the Design Classes

  • Design class diagram (DCD) focuses on domain layer
  • When an object of a class receives a message, that message becomes a method in the class on the DCD
  • If :InventoryItem receives the message updateQty(qty), then a method signature is added to InventoryItem:

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Updated Design Class Diagram for Domain Layer

After Create customer account use case and Fill shopping cart use case

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Summary

  • This chapter went into more detail about use case realization and three layer design to extend the design techniques from last chapter
  • Three layer design is an architectural design pattern, part of the movement toward the use of design principles and patterns.
  • Use case realization is the design of a use case, done with a design class diagram and sequence diagrams. Using sequence diagrams allows greater depth and precision than using CRC cards.
  • Use case realization proceeds use case by use case (use case driven) and then for each use case, it proceeds layer by layer

Systems Analysis and Design in a Changing World, 6th Edition

Systems Analysis and Design in a Changing World, 6th Edition

*

Summary (continued)

  • Starting with the business logic/domain layer, domain classes are selected and an initial design class diagram is drawn.
  • The systems sequence diagram (SSD) from analysis is expanded by adding a use case controller and then the domain classes for the use case.
  • Messages and returns are added to the sequence diagram as responsibilities are assigned to each class.
  • The design class diagram is then updated by adding methods to the classes based on messages they receive and by updating navigation visibility.
  • Simple use case might be left with two layers if the domain classes are responsible for database access. More complex systems add a data access layer as a third layer to handle database access

Systems Analysis and Design in a Changing World, 6th Edition