Trusted Components: Reuse, Contracts and Patterns - Lecture 14
1
Chair of Softw are Engineering
Last update: 2 November 2004
Trusted Components
Reuse, Contracts and Patterns
- Prof. Dr. Bertrand Meyer
- Dr. Karine Arnout
Trusted Components Reuse, Contracts and Patterns Prof. Dr. Bertrand - - PowerPoint PPT Presentation
1 Last update: 2 November 2004 Trusted Components Reuse, Contracts and Patterns Prof. Dr. Bertrand Meyer Dr. Karine Arnout Trusted Components: Reuse, Contracts and Patterns - Lecture 14 Chair of Softw are Engineering 2 Lecture 14: Observer,
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
1
Chair of Softw are Engineering
Last update: 2 November 2004
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
2
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
3
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
4
Chair of Softw are Engineering
2.1 Skeleton 2.1.2 No method 2.1.1 Method 2.3 Some library support 1. Componentizable 2.2 Possible skeleton 2. Non-componentizable 1.3 Newly componentized 1.1 Built-in 1.2 Library- supported 1.3.2 Componentizable but not comprehensive 1.3.1 Fully componentizable 1.3.3 Componentizable but unfaithful 1.3.4 Componentizable but useless Design pattern 2.4 Design idea 1.4 Possible component Prototype Flyweight Observer Mediator Abstract Factory Factory Method Visitor Command Composite Chain of Responsibility Builder Proxy State Strategy Memento Decorator Adapter Template Method Bridge Singleton Iterator Facade Interpreter
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
5
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
6
Chair of Softw are Engineering
deferred class SUBJECT inherit ANY redefine default_create end feature {NONE} -- Initialization default_create is
do create observers.make end feature -- Observer pattern add_observer (an_observer: OBSERVER) is
require not_yet_an_observer: not observers.has (an_observer) do
ensure
end
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
7
Chair of Softw are Engineering
remove_observer (an_observer: OBSERVER) is
require is_an_observer: observers.has (an_observer) do
ensure
end notify_observers is
do from observers.start until observers.after loop
end end
invariant
end
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
8
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
9
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
10
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
11
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
12
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
13
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
14
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
15
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
16
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
17
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
18
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
19
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
20
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
21
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
22
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
23
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
24
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
25
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
26
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
27
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
28
Chair of Softw are Engineering
2.1 Skeleton 2.1.2 No method 2.1.1 Method 2.3 Some library support 1. Componentizable 2.2 Possible skeleton 2. Non-componentizable 1.3 Newly componentized 1.1 Built-in 1.2 Library- supported 1.3.2 Componentizable but not comprehensive 1.3.1 Fully componentizable 1.3.3 Componentizable but unfaithful 1.3.4 Componentizable but useless Design pattern 2.4 Design idea 1.4 Possible component Prototype Flyweight Observer Mediator Abstract Factory Factory Method Visitor Command Composite Chain of Responsibility Builder Proxy State Strategy Memento Decorator Adapter Template Method Bridge Singleton Iterator Facade Interpreter
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
29
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
30
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
31
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
32
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
33
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
34
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
35
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
36
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
37
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
38
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
39
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
40
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
41
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
42
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
43
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
44
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
45
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
46
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
47
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
48
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
49
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
50
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
51
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
52
Chair of Softw are Engineering
Trusted Components: Reuse, Contracts and Patterns - Lecture 14
53
Chair of Softw are Engineering