资源描述
,*,Click to edit Master title style,Click to edit Master text styles,Second level,Third level,Fourth level,Fifth level,*,Design Recovery 1,Informatics 122,Alex Baker,1,What is Design Recovery?,Sort of like reverse engineering,2,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),3,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),4,Also like a double-waterfall,General model for recovery,(Byrne, 1992),Existing System,Target System,Implementation,Design,Requirements,Requirements,Con-,ceptual,Con-,ceptual,Design,Implementation,re-think,re-specify,re-design,re-build,Alteration,Reverse,Engineering,Abstraction,Forward,Engineering,Refinement,5,Why do we need to know this?,Working with others code,Debugging,Maintenance,Reuse,Working with your own code,6,Motivation: No design,Lost design,Build-and-fixed,Agile methodologies,Incomprehensible design,7,Motivation: Design Drift,8,Motivation: Design Drift,Design not followed,9,Motivation: Design Drift,Design not followed,10,Motivation: Design Drift,Design deviations,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,18,Motivation: Design Drift,?,19,Motivation: Design Drift,?,20,Design Recovery in Diamond,Goal,Dom Materials,Rep (Code),Domain of Use,Knowledge,Activity,Ideas,concern,manipulates,informs,captures,enhances,21,Design Recovery in Diamond,Goal,Dom Materials,Representation,Domain of Use,Knowledge,Activity,Ideas,concern,manipulates,informs,captures,enhances,Someone made a design,22,Design Recovery in Diamond,Goal,Dom Materials,Rep (Design),Domain of Use,Knowledge,Activity,Ideas,concern,manipulates,informs,captures,enhances,Someone used that to create code (fairly rotely),Rep (Code),23,Design Recovery in Diamond,Goal,Dom Materials,Rep (Code),Domain of Use,Knowledge,Activity,Ideas,concern,manipulates,informs,captures,enhances,You get ideas from the code,But do the captures relationships hold?,24,Design Recovery in Diamond,Goal,Dom Materials,Rep (Code),Domain of Use,Knowledge,Activity,Ideas,concern,manipulates,informs,captures,enhances,So when you modify the code, who knows?,25,Could even be your own code,Youve often recovering, in some sense,?,26,Also, remember,Design recovery recreates design abstractions from,Code,Existing design documentation (if available),Personal experience,General knowledge about problem and application domains,27,Design Recovery in Diamond,Goal,Dom Materials,Representation,Domain of Use,Knowledge,Activity,Ideas,concern,manipulates,informs,captures,enhances,Every part is involved,28,Isnt this Reverse Engineering?,Not just recreating the UML diagram,Program flows,Rationale,Metaphor,29,Also like a double-waterfall,General model for recovery,(Byrne, 1992),Existing System,Target System,Implementation,Design,Requirements,Requirements,Con-,ceptual,Con-,ceptual,Design,Implementation,re-think,re-specify,re-design,re-build,Alteration,Reverse,Engineering,Abstraction,Forward,Engineering,Refinement,30,Finding the structure(not the same as the design),Entities,Classes,Methods,Variables,Relationships,Inheritance,Method calls,References,31,Approaches,Reverse engineering tools,E.g. Omondo,Reading documentation,Code reading,Reading class names,Talking to people,32,But wheres 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,33,An example: Jetris,34,Jetris Design Recovery,Run the game,Reading names,What is HTMLLink?,What is Figures.java?,Whats with those arrays?,What about the big classes?,Omondo,35,What will you actually create?,It depends:,How difficult?,Who else?,The future,36,The other side of the coin,How easy is your program to understand?,How is your:,Documentation,Naming,Code,37,Assignment 4,Recover the design of Cake,Layered design environment, uses Archstudios 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 programs design, including patterns, principles etc.,Must provide good high and low level explanation,Due Sunday at Midnight,Email to,and,Paper copies in class on Monday,38,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?,39,Some tips,Wont have room for rote completeness, will need to be,elegant,Use representations of classes to organize,Look for,implements,relationships,40,Useful links,Archstudio Source,Descriptions for BnA Package Classes,BNA Hierarchy,41,
展开阅读全文