Learning Outcomes:
On successful completion of this module, the student should be able to:
1. Understand core design principles and be able to assess the quality of a design with respect to these principles.
2. Be capable of applying these principles in the design of object oriented systems.
3. Demonstrate an understanding of a range of design patterns. Be capable of comprehending a design presented using this vocabulary.
4. Be able to select and apply suitable patterns in specific contexts. Be able to critically analyse these applications and assess tradeoffs associated with pattern implementations
5. Understand and apply refactoring techniques in the context of design patterns.
6. Understand the broader scope addressed by Architectural Styles. Be capable of relating design patterns to these styles.
Syllabus Content:
Building on an undergraduate-level software development knowledge base, the central focus of the module is to broaden the design vocabulary of the student to incorporate best practice in object oriented software development.
The module will revisit core design principles and frame these in the context of design patterns. A set of patterns are examined in detail, both in isolation and in the context of integrated applications. Particular attention is paid to relating patterns and assessing design tradeoffs. Alternative Pattern classifications are examined. The role of refactoring in is examined and pattern-based refactoring techniques are presented.
Broader software architectural issues are explored and attention is given to relating the scope of architectural styles to the design pattern literature.
Pre-requisites:
Agile Software Development (from this programme).
or
Basic understanding of computer architecture and of operating systems.
Programming experience in an Object Oriented Programming Language (graduate of a Honours BSc or BEng involving significant programming experience).
Some exposure to software modelling concepts and notations.
Experience of Test Driven Development.
Indicative syllabus content:
1 Principles
1.1 Types & Classes
Fragile Base Classes, Programming to Interfaces
1.2 Design Principles
Single Responsibility, Open Closed, Liskov Substitution, Dependency Inversion
1.3 Packaging Principles
Acyclic Dependencies
1.4 Refactoring
Code smells, named refactorings & the role of unit testing
2 Design Patterns
2.1 Creational Patterns
Singleton, Factory, Prototype
2.2 Behavioural Patterns
Command, Observer, Strategy, Template Method, State, Iterator, Chain of Responsibility
2.3 Structural Patterns:
Faade, Proxy, Bridge, Composite, Adapter
2.4 Pattern Based Refactoring
Refactoring towards & away from specific patterns
3 Architectural Styles
3.1 Data Flow, Replication
3.2 Hierarchical, Peer-to-peer
3.3 Mobile code
Practical Programme:
This module has a strong practical element. The focus of this element is on the application of a subset of the design patterns presented in the curriculum, with particular attention paid to the interaction of multiple patterns in a single system. Additionally, best practice in agile development will be assumed & inspected in submitted assignments (particularly unit tests and code style issues).
Students will be required to submit three completed assignments. The first assignment is to be presented by the students early in the module, delivering a base-line feature set realised by the students independent of a pattern vocabulary. This is re-implemented in two subsequent assignments, introducing patterns in isolation and in combination. Sample solutions to these assignments are a core pedagogical tool in presenting and exploring patterns. Additionally, patterns encountered in standard platform components (JDK and other) will be an integral part of the assignments.