[2]
DejaVU Online:
Principles of Object-Oriented Software Development
(©)
[2]
-
[up]
[top] -
[I]
[II]
[III]
[IV] -
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12] -
[A]
[R]
Instructor's Guide
intro
polymorphism
idioms
patterns
events
summary,
Q/A,
literature
This chapter has introduced the idioms and patterns
of object-oriented programming.
We looked at a polymorphism in Java and C++,
and discussed assertions in C++
and canonical class idioms.
1
- inheritance and delegation in Java
- polymorphism in C++
- assertions in C++
- canonical class idioms
slide: Section 2.1: Polymorphism
In section 2, we
proceeded with a fairly detailed
discussion of the idioms in hush,
which illustrate basic solutions to
problems occurring in the development of frameworks.
2
slide: Section 2.2: Idioms in hush
Further, we looked at how these idioms are related
to patterns that provide a solution on the level of design.
3
slide: Section 2.3: A catalogue of design patterns
Following the treatment of idioms and patterns
in hush, section 3 gave an overview of the catalogue
of design patterns presented in [GOF94].
The catalogue includes creational,
structural and behavioral patterns.
4
slide: Section 2.4: Event-driven computation
In section 4, we discussed the
reactor pattern, which provides
a generalization of event-driven software architectures.
We concluded with looking at an example of a simple
temperature-monitoring system,
implemented using events to maintain internal consistency.
Instructor's Guide
intro
polymorphism
idioms
patterns
events
summary,
Q/A,
literature
- How would you explain the letter/envelope idiom?
- Characterize the notion of polymorphism.
Give some examples.
- What is a canonical class? Characterize its ingredients and give an example.
- Give a brief description of
the handle/body idiom, virtual self-reference,
and dynamic role switching.
- What kinds of patterns can you distinguish?
Why do you consider patterns to be of relevance?
- Give a detailed description of the Factory pattern
and also of the Observer pattern.
- Describe the Reactor pattern.
Why is it useful?
- Give an example of a system based on event-driven
computation.
slide: Questions
Instructor's Guide
intro
polymorphism
idioms
patterns
events
summary,
Q/A,
literature
For an introduction to Java, there is ample choice.
An excellent online tutorial can be found on
http://java.sun.com/docs/books/tutorial .
As textbooks on C++ I recommend
[Lippman91], and for the more advanced reader [Stroustrup98].
For an extensive introduction to STL, read [STL].
[Coplien92] is the original introduction to idioms in C++.
The by now classical book for patterns is [GOF94].
Well worth reading are the many articles in the POPL proceedings,
[POPL1], [POPL2] and [POPL3].
slide: Literature
[2]
-
[up]
[top] -
[I]
[II]
[III]
[IV] -
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12] -
[A]
[R]