Download presentation
Presentation is loading. Please wait.
1
Informatics 122 Alex Baker
Design Recovery 1 Informatics 122 Alex Baker
2
What is Design Recovery?
Sort of like reverse engineering
3
What is Design Recovery?
Design recovery recreates design abstractions from Code Existing design documentation (if available) Personal experience / general knowledge about problem and application domains Talking to people (Biggerstaff, 1989)
4
What is Design Recovery?
Recovered abstractions need: Formal specifications Module breakdowns Data abstractions Dataflows Informal knowledge All information required to understand What How Why (Biggerstaff, 1989)
5
Also like a double-waterfall…
General model for recovery (Byrne, 1992) Alteration Reverse Engineering Abstraction Con- ceptual re-think Con- ceptual Forward Engineering Refinement re-specify Requirements Requirements re-design Design Design re-build Implementation Implementation Existing System Target System
6
Why do we need to know this?
Working with others’ code… Debugging Maintenance Reuse Working with your own code
7
Motivation: No design Lost design Build-and-fixed Agile methodologies
Incomprehensible design
8
Motivation: Design Drift
9
Motivation: Design Drift
Design not followed
10
Motivation: Design Drift
Design not followed
11
Motivation: Design Drift
Design deviations
12
Motivation: Design Drift
Design deviations ?
13
Motivation: Design Drift
Design deviations
14
Motivation: Design Drift
Design deviations ??? ???
15
Motivation: Design Drift
Design deviations ??? ???
16
Motivation: Design Drift
Design deviations ??? ???
17
Motivation: Design Drift
Design deviations
18
Motivation: Design Drift
19
Motivation: Design Drift
???
20
Motivation: Design Drift
???
21
Design Recovery in Diamond
Dom Materials Domain of Use Knowledge Rep (Code) Ideas Activity concern manipulates informs captures Goal enhances
22
Design Recovery in Diamond
Someone made a design… Dom Materials Domain of Use Knowledge Representation Ideas Activity concern manipulates informs captures Goal enhances
23
Design Recovery in Diamond
Someone used that to create code (fairly rotely) Dom Materials Domain of Use Knowledge Rep (Design) Rep (Code) Ideas Activity concern manipulates informs captures Goal enhances
24
Design Recovery in Diamond
You get ideas from the code But do the captures relationships hold? Dom Materials Domain of Use Knowledge Rep (Code) Ideas Activity concern manipulates informs captures Goal enhances
25
Design Recovery in Diamond
So when you modify the code, who knows? Dom Materials Domain of Use Knowledge Rep (Code) Ideas Activity concern manipulates informs captures Goal enhances
26
Could even be your own code
You’ve often recovering, in some sense ???
27
Also, remember Design recovery recreates design abstractions from Code
Existing design documentation (if available) Personal experience General knowledge about problem and application domains
28
Design Recovery in Diamond
Every part is involved Dom Materials Domain of Use Knowledge Representation Ideas Activity concern manipulates informs captures Goal enhances
29
Isn’t this Reverse Engineering?
Not just recreating the UML diagram… Program flows Rationale Metaphor
30
Also like a double-waterfall…
General model for recovery (Byrne, 1992) Alteration Reverse Engineering Abstraction Con- ceptual re-think Con- ceptual Forward Engineering Refinement re-specify Requirements Requirements re-design Design Design re-build Implementation Implementation Existing System Target System
31
Finding the structure (not the same as the design)
Entities Classes Methods Variables Relationships Inheritance Method calls References
32
Approaches Reverse engineering tools Reading documentation
E.g. Omondo Reading documentation Code reading Reading class names Talking to people Want to point out that you can learn a lot from just reading the file names, what patterns are used, what sorts of classes you’re using – and it’s a way to see everything at the high level – importance of making these good
33
But where’s the design? What principles were applied?
What were their priorities? What patterns emerged? What actual patterns were used? This will save you a lot of trouble
34
An example: Jetris
35
Jetris Design Recovery
Run the game Reading names What is HTMLLink? What is Figures.java? What’s with those arrays? What about the big classes? Omondo
36
What will you actually create?
It depends: How difficult? Who else? The future…
37
The other side of the coin…
How easy is your program to understand? How is your: Documentation Naming Code Goes at the end somewhere
38
Assignment 4 Recover the design of Cake Each group: Each group member:
Layered design environment, uses Archstudio’s BnA Framework You may use any tools you like Each group: A Complete UML (-ish) Diagram Each group member: A 4-6 page double-spaced paper explaining your understanding of the program’s design, including patterns, principles etc. Must provide good high and low level explanation Due Sunday at Midnight to and Paper copies in class on Monday
39
Possible subjects What types of classes appear
What do they do? What do they mean? What do other specific classes do? How to they all relate? How is layering implemented? What was the effect of using BnA in the design? What principles might have guided the design?
40
Some tips Won’t have room for rote completeness, will need to be elegant Use representations of classes to organize Look for implements relationships
41
Useful links Archstudio Source Descriptions for BnA Package Classes
Descriptions for BnA Package Classes BNA Hierarchy
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.