SE450: Lecture 8 (More Patterns)

Contents [0/10]

Overview of Today's Class [1/10]
Announcements [2/10]
Patterns [3/10]
Creational Patterns: Builder [4/10]
Creational Patterns: Prototype [5/10]
Behavioral Patterns: Visitor [6/10]
Behavioral Patterns: Observer [7/10]
Behavioral Patterns: Iterator [8/10]
Architectural Patterns [9/10]
Architectural Patterns: Model-View-Controller [10/10]

Overview of Today's Class [1/10]

Announcements

More Patterns

Builder

Prototype

Visitor, Observer, Iterator

Model-View-Controller

Announcements [2/10]

Sign ups for final presentations will start next week

The SE450 Core exam guide is here. Look it over and let me know if there are areas you would like me to cover in more detail/review for the last class.

I'll schedule a few days at O'Hare in the next few weeks for discussing projects (and anything else related to SE450) depending on interest

Patterns [3/10]

Purpose
Creational Structural Behavioral
Scope Class Factory Method (107) Adapter (class) (139) Interpreter (243)
Template Method (325)
Object Abstract Factory (87)
Builder (97)
Prototype (117)
Singleton (127)
Adapter (object) (139)
Bridge (151)
Composite (163)
Decorator (175)
Facade (185)
Flyweight (195)
Proxy (207)
Chain of Responsibility (223)
Command (233)
Iterator (257)
Mediator (273)
Memento (283)
Observer (293)
State (305)
Strategy (315)
Visitor (331)

Creational Patterns: Builder [4/10]

Creational Patterns: Prototype [5/10]

Behavioral Patterns: Visitor [6/10]

Behavioral Patterns: Observer [7/10]

Behavioral Patterns: Iterator [8/10]

Architectural Patterns [9/10]

What is architecture?

The highest level of abstraction in your design.

a description of the subsystems and components of a software system and the relationships between them

Components and subsystems can be shown from different views

Patterns fit into the context of the architecture.

Dictionary definitions:

  1. the art or science of building; specifically : the art or practice of designing and building structures and especially habitable ones
  2. formation or construction as or as if as the result of conscious act, a unifying or coherent form or structure
  3. a method or style of building
  4. the manner in which the components of a computer or computer system are organized and integrated

SEI definitions:

  1. Bass, Clements, and Kazman. Software Architecture in Practice, Addison-Wesley 1997: The software architecture of a program or computing system is the structure or structures of the system, which comprise software components, the externally visible properties of those components, and the relationships among them.
  2. Booch, Rumbaugh, and Jacobson, 1999: An architecture is the set of significant decisions about the organization of a software system, the selection of the structural elements and their interfaces by which the system is composed, together with their behavior as specified in the collaborations among those elements, the composition of these structural and behavioral elements into progressively larger subsystems, and the architectural style that guides this organization---these elements and their interfaces, their collaborations, and their composition (The UML Modeling Language User Guide, Addison-Wesley, 1999).
  3. Software Architecture: An abstract system specification consisting primarily of functional components described in terms of their behaviors and interfaces and component-component interconnections. The interconnections define provide by which components interact.

Architectural Patterns are like the Software patterns we have been studying, except they are on a higher level

An architectural pattern is the fundamental structural organization of the system

Deals with subsystems and their interactions - the rules and guidelines for how they interact.

Architectural Patterns: Model-View-Controller [10/10]

Comes from the Smalltalk-80 user interface design of user interfaces

Model - application object, the core data and functionality of the application. The model should not know about which view is using it. This allows you to move from a Text User Interface (TUI) to a Graphical User Interface (GUI) without changing the Model.

View - screen presentation. This could be a command line interface, a JSP/Servlet, a Swing Application, or a backend interface. The view will know about the Model, but doesn't necessarily have to have a reference to the model directly.

Controller - defines the way the View reacts to user input. Also decides whether requests are sent to the view or model. Should know about (and enforce) the relationships between views. Should decide whether a model gets updated or not. Many times, the Model will use a Command pattern to accept changes from the View.

Based on subscribe/notify. The view can subscribe to the model, and ensure that it will get notified. This is the Observer pattern. Views can be nested, in a CompositeView (using the Composite pattern). The View relates to the Controller via the Strategy design pattern. Factory Method can be used to specify the default controller class for a view, and Decorator could add scrolling or other GUI elements to a view.

Example files are here


Revised: 2003/2/23