CMPT 318 99-1: Assignment #5Updated: Mar 22Updates to this assignment will be sent to the mailing list if they are required. |
April 1 at 12:00 (noon) in the assignment box.
Late Policy: No penalty will be assessed for late assignments until April 5 at 12:00 (noon), after which there will be a 10% penalty assessed each day for a maximum of two days. No assignments will be accepted after April 7 at 12:00 (noon).
4% of your final mark
Important programming ideas are contained within the object-oriented design patterns (OODP) documented by the so-called "Gang of Four" design patterns book. That is one reason why Eckel devotes a chapter to it in his Java book: it is an important part of Java programming, just like event-based GUI programming, threading, and beans are. However it is difficult to learn OODPs and all their subtleties and implications in a classroom setting. This assignment reinforces the design pattern information you learned in class, but without forcing you to write code.After this assignment you should have a solid understanding of OODPs in general and know a few design patterns in particular in depth.
In all prior units I have sought to cover the same sort of material covered by Eckel, but from a slightly altered viewpoint in order to give you several views on the same material. In the DP unit, however, we relied less on course textbook material. For one thing not everyone has the GoF "Design Patterns" book, and Eckel's coverage of design patterns is too light for a serious study of OODP. Thus more emphasis is placed on the online notes (in contrast to the notes being more-or-less just a reading guide as it was for prior units). Thus extra reading is generally a good way of reinforcing the classroom material. This is especially true if you skipped classes, dozed through them, or were confused or missed points.If you own a copy of the GoF "Design Patterns" book, it would be wise to read chapter 1 and 6.
If you do not own a copy of the GoF "Design Patterns" book you should probably read some the following references. They are presented in order of simplicity with the simplest at the beginning.
(even if you do own a copy, these are good sources of reading material.) #1 is most recommended because it is so short, then #5 and #6.
- Design Patterns: Elements of Reusable Architectures
Linda Rising, in the Annual Review of Communications, 1996.- Software Design Patterns: Common Questions and Answers
James O. Coplien. In Proceedings of Object Expo New York, pages 39-42, June 1994. New York, SIGS Publications.- Software Patterns
Douglas C. Schmidt, Ralph E. Johnson, Mohamed Fayad, guest editorial, CACM, vol 39, no 10, 1996.
(prettier PDF is here)- Introduction to Design Patterns
Class Notes for Doug Schmidt's Design Patterns Course.- The Patterns FAQ
maintained by Doug Lea. A good read because it emphasises the general lack of easy answers which frustrates some people who expect there to be easy answers.- Patterns and Software: Essential Concepts and Terminology
long but valuable web-based document by Brad Appleton.- Design Patterns: Abstractions and Reuse of Object Oriented Design
Proceedings of ECOOP'93, Kaiserlautern, Germany.This is one of the original publications of the GoF, and is the precursor to the GoF book. NOTE: some of the terminology and patterns have evolved since then, but it is a good read so long as you understand the changes.
| Assigned Work |
| Read: |
The Pros and Cons of Adopting and Applying Design Patterns
In the Real Worldby Marshall P. Cline, CACM, v 39, no 10, 1996 |
This is a short article on the benefits and drawbacks of using design patterns in software development. There is a strong analogy between "benefits" and "drawbacks" and the consequences of the object-oriented design patterns. So this is a good place to test your hand at writing patterns.
When doing this part of the assignment, do not do more than necessary. I'm looking for something similar to Thomas Minka's style of writing short patterns in his Decorator Pattern (except obviously without the implementation or known uses).
Keep in mind these two points when you write:
(15 marks)
(5 marks)
(Optional question). Compare the use of a desgin pattern form versus the form of a research article for the presentation of solution knowledge. What does each form highlight? When is one form better than the other?
| Read: |
Non-Software Examples of Software Design Patterns
Michael Duell, Object Magazine, vol 7, no 5, July 1997, pg. 52-57, SIGS Publications. |
The example you choose should not be used in the GoF book (and minor variations of the given examples are not permitted) or one that was used in the class notes. If you do not have access to the GoF book, you should consult the list of online patterns, with preference for the ones I've translated from the GoF book since the same examples are used. Try to borrow the book from a friend for a few days if you can.
In a manner similar to Duell, briefly describe your example.
(4 marks)
(5 marks)
(4 marks)
(4 marks)
(3 marks)