KIT206 Tutorial 5 – Design Patterns
KIT206 Software Design & Development KIT506 Software Application Design & Implementation
1/2
Tutorial 5: Design Patterns
Purpose: To identify one or more patterns from the set of ‘important patterns’ indicated in the Design
Patterns teaching module that could apply to the design of the Human Resources Information System,
and then to adapt your team’s existing OO design to apply these (may be only one) where they look
like better solutions than the existing design.
Outline
Design patterns are heuristic solutions to recurring software design challenges. A pattern is described
by the problem that it addresses, a description of the approach it implies (how classes are related
structurally or behaviourally) and the known impacts of using that pattern, both good and bad. That
is, a particular pattern often won’t (can’t) eliminate all complexity from the problem, but can help to
manage it. Use of patterns also allows for a shared vocabulary among designers that allows a lot of
information to be conveyed succinctly. By identifying that a particular design pattern may apply in a
given situation, the designer can apply the pattern as part of his or her solution with confidence that
the solution is similar to other designs for that kind of problem and has been thoroughly tried in other
projects.
1 What patterns have emerged in the HRIS system? (~30 minutes)
Below is a list of patterns that are likely to be most useful to you during the remainder of your
university education in ICT. Some, but certainly not all, could be implicated in the design of the HRIS.
• Model-view-controller (MVC)
• Abstract Factory, and the related Factory Method
• Adapter
• Observer
• Strategy
• Command
• Singleton
• Iterator
Task: Which of these look like suitable design solutions to parts of the HRIS? Construct a table like the
one below and place each of the patterns in one of the four sections, depending on how relevant you
see that pattern being, along with a brief (few words to a sentence) explanation of why. Also consider
if a combination of two patterns looks like a suitable solution to part of the system. Are there design
patterns not listed above you think could be applied? If so, include them in the table.
Applicable & will lead to new
classes or change existing
relationships between classes
Applicable but will be an
implementation detail, merely
part of the low-level code
Potentially applicable but
excluded because it supports
features beyond those required
Not applicable
As a whole-of-class group, discuss your conclusions with the tutor.
KIT206 Software Design & Development KIT506 Software Application Design & Implementation
2/2
2 Applying some patterns
Task: Select which pattern or patterns look both applicable and helpful (i.e., they produce a design
that is more robust or easier to implement than what you have at present), modify your class diagrams
to suit. This will also lead to changes in your sequence diagrams, which you can do simultaneously or
once you’ve finished adjusting your class diagrams.
If you selected more than one pattern you will probably find they apply to different parts of the
system, so work on implementing one before you do the second or third.
Reminder: This is the last tutorial during which you will work on your first assignment. That doesn’t
mean you have to complete your assignment now, but it does mean you will need to allocate time
outside of class for your team to meet to finalise your submission.
Outline
1 What patterns have emerged in the HRIS system? (~30 minutes)
2 Applying some patterns