Subsystem Design
Background and the
Dynamic Part
Architectural
Analysis
Describe
Architectural
Concurrency
Design
Describe
Distribution
Subsystem Design
Use-Case
Analysis
Review the
Design
Use-Case
Design
Design
Reviewer
Class
Design
Architectural
Analysis
Describe
Architectural
Concurrency
Design
Architect
Describe
Distribution
Subsystem Design
Use-Case
Analysis
Review the
Design
Use-Case
Design
Design
Reviewer
Class
Design
Use-Case Realization
Design
Guidelines
Subsystem
Design
Use-Case Realization
(updated)
Design Classes
Interface
<<subsystem>>
Subsystem
Name
Interface
Subsystem
<<subsystem>>
Subsystem Name
Interface
<<subsystem>>
Subsystem Name
Subsystem
<<subsystem>>
Subsystem Name
Interface
Realization (Elided form)
Interface
<<subsystem>>
Subsystem Name
Subsystem
<<subsystem>>
Subsystem Name
Interface
Realization (Elided form)
Subsystem Guidelines
Goals
Loose coupling; as independent as possible
Insulation from change - minimized
Replaceable elements in the model.
Key is abstraction
and encapsulation
<<subsystem>>
A
<<subsystem>>
B
<<subsystem>>
C
Subsystem Guidelines
Exception: can share some class definitions
done with packages in lower layers to ensure
common definition of classes which must pass
between subsystems
All dependencies on a subsystem should be
dependencies on the subsystem interfaces
only!!
clients not dependent on inside!
Key is abstraction
and encapsulation
<<subsystem>>
A
<<subsystem>>
B
<<subsystem>>
C
<<subsystem>>
CourseCatalogSystem
<<subsystem proxy>>
CourseCatalogSystem
11
Now,
Subsystem Responsibilities
subsystem responsibility
<<subsystem>>
CourseCatalogSystem
13
Modeling Convention:
Subsystem Interaction Diagrams - General
Subsystem Client
Subsystem Proxy
Design Element 1
Design Element 2
performResponsibility( )
Op1()
subsystem
responsibility
Op2()
Internal subsystem
interactions
Op3()
Op4()
Modeling Convention:
Subsystem Interaction Diagrams - General
Subsystem Client
Subsystem Proxy
Design Element 1
Design Element 2
performResponsibility( )
Op1()
subsystem responsibility
Op2()
Internal subsystem
interactions
Op3()
Op4()
: RegisterFor
CoursesForm
: Registration
Controller
: ICourseCatalog
System
: Schedule
: Student
1: // create schedule( )
Student wishes to
create a new
schedule
subsystem responsibility
This sequence diagram sets the context of what
will be performed in Subsystem Design.
Puts requirements on the subsystem, and
18
: RegisterFor
CoursesForm
: Registration
Controller
: ICourseCatalog
System
: Schedule
: Student
1: // create schedule( )
2: // get course offerings( )
3: getCourseOfferings(Semester)
The ICourseCatalogSystem::getCourseOfferings()
documentation specifies: Retrieve the course
offerings available for the specified semester.
Remember, the proxy class is the class that manages the responsibilities of
the subsystem as found in its interface.
You may think of it as a control class for a particular interface.
In the next couple of slides, we are doing exactly that with the
DBCourseOffering class in attempting the access
the legacy RDBMS to
(continued)
read data, execute a query, and more.
We have a DBCourseOffering along with CourseOfferingList and a
20
CourseOffering to get results from executeQuery() (ahead)
more
They do not show the context for the subsystem or its interface;
21
CourseCatalogSystem DBCourseOffering
1. getCourseOfferings(Semester)
Subsystem Proxy
: Connection
: Statement
CourseOffering
: ResultSet
Retrieve all available course Internals of subsystems should yield interaction dia
offerings for the current
that look like this.
semester
RDBMS
Read
2. getString( )
3. setData( )
4. add(CourseOffering)
Add the retrieved course offering
to the list to be returned
: Connection
CourseCatalogSystem DBCourseOffering
: Statement
: ResultSet
CourseOffering
RDBMS
Read
1.1.3. new( )
1.1.4. new( )
2. getString( )
3. setData( )
4. add(CourseOffering)
Idea behind the Billing System is almost the same, but the
Billing System does not require a persistency mechanism.
24
: Student.
IBillingSystem
This
is at portion of the Close Registration useRetrieve a list of course
offerings for the current realization sequence diagram.
semester
2.1. getCourseOfferings(Semester)
Repeat twice this is
for simplicity;
realistically, an
indefinite number of
iterations could
occur)
: Schedule
Close
registration for
each course
offering
2.3. // level( )
Finally commit or
cancel the course
offering once all
leveling has occurred
Send student and tuition to
the Billing System, which will
do the actual billing to the
student for the schedule.
2.4. // close( )
subsystem responsibility
25
: Schedule
: Student.
IBillingSystem
each course
offering
2.3. // level( )
Finally commit or
cancel the course
offering once all
leveling has occurred
Send student and tuition to
the Billing System, which will
do the actual billing to the
student for the schedule.
2.4. // close( )
subsystem responsibility
26
More coming
27
:
BillingSystem
:
StudentBillingTransaction
1. submitBill(Student, double)
1.1. create(Student, double)
: Student.
:
BillingSystemInterface
: Billing System
Retrieve the
information that must
be included on the bill
1.2. submit(StudentBillingTransaction)
28
:
BillingSystem
:
StudentBillingTransaction
1. submitBill(Student, double)
1.1. create(Student, double)
: Student.
:
BillingSystemInterface
: Billing System
Retrieve the
information that must
be included on the bill
1.2. submit(StudentBillingTransaction)
1.2.1. // open connection( )
29
:
BillingSystem
:
StudentBillingTransaction
1. submitBill(Student, double)
1.1. create(Student, double)
: Student.
:
BillingSystemInterface
: Billing System
1.2. submit(StudentBillingTransaction)