Design Modeling
Design Modeling
Design Modeling
Application?
…Observer Pattern
• Chat rooms,
• Instant messaging, and
• Live weather updates are all examples of an observer who registers
with a subject to be notified of changes within the subject.
Enterprise Patterns
MVC (Model-View-Controller)
and
Inversion of Control
…Enterprise Patterns (MVC)
• Originally developed in the Smalltalk language, this pattern is
extremely prevalent today, especially with the proliferation of web
and mobile applications.
• Model—represents the data and optionally the business logic of the
system.
• View—accepts inputs to the system and displays results to the client.
This is typically some type of GUI but doesn’t necessarily have to be a
human interface.
• Controller—accepts input from the view and requests data from the
model; determines actions for both the view and model based on
programmed logic.
…Enterprise Patterns (MVC)
…Enterprise Patterns (MVC)
Advantages?
…Enterprise Patterns (Inversion of Control)
• IoC, aka Dependency Injection (DI), is a very important pattern for
systems that have many distributed components and must be tested
separately.
• It extends the concept of “separation of duties”.
• If a class makes use of the services of another class, the consumer of
the service should NOT create instances of the provider of the service.
Rather, the provider should define an abstraction (typically an
interface) and the consumer should use that.
…Enterprise Patterns (Inversion of Control)
Reading Assignment
All Design patterns,
Architecture Pattern: N-Tier
Structural Modeling
• Unlike Behavioral Modeling, Structural modeling never describes the dynamic
behavior of the system.
• It captures the static features of a system and represents the framework for
the system.
• Class Diagram
• Object Diagram
• Component Diagram
• Deployment Diagram
• Package Diagram
• Composite Structure Diagram
Class Diagram Example