Informatics 122 Software Design II Lecture 11 Andr

  • Slides: 24
Download presentation
Informatics 122 Software Design II Lecture 11 André van der Hoek Duplication of course

Informatics 122 Software Design II Lecture 11 André van der Hoek Duplication of course material for any commercial purpose without the explicit written permission of the professor is prohibited. 10 September 2021 – 05: 13: 53 (c) 2006 University of California, Irvine – André van der Hoek 1

Today’s Lecture n Reverse engineering n Design – Implementation – Reverse Engineering n Brief

Today’s Lecture n Reverse engineering n Design – Implementation – Reverse Engineering n Brief recap n Feedback 10 September 2021 – 05: 13: 54 © 2006 University of California, Irvine – André van der Hoek 2

Reverse Engineering 10 September 2021 – 05: 13: 55 © 2006 University of California,

Reverse Engineering 10 September 2021 – 05: 13: 55 © 2006 University of California, Irvine – André van der Hoek 3

Design – Implementation – Reverse Engineering 10 September 2021 – 05: 13: 56 ©

Design – Implementation – Reverse Engineering 10 September 2021 – 05: 13: 56 © 2006 University of California, Irvine – André van der Hoek 4

Review: Design Diamond Domain of Materials Domain of Use Representation Knowledge Ideas Activity Goal

Review: Design Diamond Domain of Materials Domain of Use Representation Knowledge Ideas Activity Goal 10 September 2021 – 05: 13: 57 © 2006 University of California, Irvine – André van der Hoek concern manipulates informs captures enhances 5

System and Implementation Design n System design – describes what the software system should

System and Implementation Design n System design – describes what the software system should do – focus towards addressing Goal and Domain of Use v “How do we fundamentally approach the problem? ” – typically represents an intermediate “design in progress” – architecture design can be part of system design n Implementation design – describes what the implementer should do – focus towards addressing Domain of Materials v “How do we make the approach reality? ” – typically represents a final “completed design” – module design can be part of implementation design 10 September 2021 – 05: 13: 58 © 2006 University of California, Irvine – André van der Hoek 6

Goals of Implementation Design n Provide a shared plan to follow – consistency n

Goals of Implementation Design n Provide a shared plan to follow – consistency n Ensure the plan meets its recipients’ needs – helpfulness n Ensure the solution is appropriate – effectiveness 10 September 2021 – 05: 13: 59 © 2006 University of California, Irvine – André van der Hoek 7

From Informatics 121 to Informatics 122 n To – – date, much of our

From Informatics 121 to Informatics 122 n To – – date, much of our focus has been on system design creative thinking learning to rely on colleagues incomplete specifications no implementation n Now, it is time to turn our attention to implementation design – nuts and bolts (but still some creative thinking) – specifying for colleagues (but still relaying some on colleagues) – complete specifications – implementation 10 September 2021 – 05: 13: 59 © 2006 University of California, Irvine – André van der Hoek 8

But How to Get There? n Practice, practice… n Examples, examples… n Some guidelines

But How to Get There? n Practice, practice… n Examples, examples… n Some guidelines exist 10 September 2021 – 05: 14: 00 © 2006 University of California, Irvine – André van der Hoek 9

Patterns Apply Two Design Principles n Program to an interface, not an implementation –

Patterns Apply Two Design Principles n Program to an interface, not an implementation – interface should be separately defined, using abstract classes n Favor object composition over inheritance 10 September 2021 – 05: 14: 00 © 2006 University of California, Irvine – André van der Hoek 10

Original Catalogue of Patterns Purpose Creational Scope Structural Behavioral Class Abstract Method Adapter (class)

Original Catalogue of Patterns Purpose Creational Scope Structural Behavioral Class Abstract Method Adapter (class) Interpreter Template Method Object Abstract Factory Builder Prototype Singleton Adapter (object) Bridge Composite Decorator Façade Flyweight Proxy Chain of Responsibility Command Iterator Mediator Memento Observer State Strategy Visitor 10 September 2021 – 05: 14: 01 © 2006 University of California, Irvine – André van der Hoek 11

Abstract Factory (Creational, Object) 10 September 2021 – 05: 14: 01 © 2006 University

Abstract Factory (Creational, Object) 10 September 2021 – 05: 14: 01 © 2006 University of California, Irvine – André van der Hoek 12

How Much Design Is Too Much Design? low 10 September 2021 – 05: 14:

How Much Design Is Too Much Design? low 10 September 2021 – 05: 14: 02 likelihood of future changes © 2006 University of California, Irvine – André van der Hoek high 13

Assignment 2 a: Basic Structure n Implement the game “Theseus and the Minotaur” according

Assignment 2 a: Basic Structure n Implement the game “Theseus and the Minotaur” according to the UML design provided on the course web site n You are free to make any updates to the design you desire, but if you do so they must be properly documented and your implementation has to follow your new design n A sample running version of the game is available on the web – http: //www. logicmazes. com/theseus. html – compared to this game, we do not use walls, but blocks to delineate possible paths 10 September 2021 – 05: 14: 02 © 2006 University of California, Irvine – André van der Hoek 14

Assignment 2 b: Basic Structure n Design and implement a modified version of the

Assignment 2 b: Basic Structure n Design and implement a modified version of the game “Theseus and the Minotaur” n You may use your design from Assignment 2 a as the basis, but you may also build an entirely new design from scratch, as long as all your decisions are properly documented and your implementation follows your new design 10 September 2021 – 05: 14: 02 © 2006 University of California, Irvine – André van der Hoek 15

Assignment 3 n Refine the official design of Theseus and the Minotaur (as provided

Assignment 3 n Refine the official design of Theseus and the Minotaur (as provided on the course web site) by – furnishing any missing classes, methods, and local variables – applying design patterns to improve the structure of the design n Deliverables – a print-out of your final UML design – a print-out of your design rationale v which critical decisions did you make, and why? n Print-outs are to be handed in in class 10 September 2021 – 05: 14: 04 © 2006 University of California, Irvine – André van der Hoek 16

Design Recovery n Recovered abstractions need: – formal specifications – module breakdowns – data

Design Recovery n Recovered abstractions need: – formal specifications – module breakdowns – data abstractions – dataflows – informal knowledge n All – – – information required to understand what how why (Biggerstaff, 1989) 10 September 2021 – 05: 14: 05 © 2006 University of California, Irvine – André van der Hoek 17

Cake Recovery n How difficult was this? n Why? n What would have helped

Cake Recovery n How difficult was this? n Why? n What would have helped more: – Access to Bn. A/Archstudio design docs – Access to running code – Another 5 days of time n Rather have done something Jetris-like? 10 September 2021 – 05: 14: 05 © 2006 University of California, Irvine – André van der Hoek 18

A Critical Design Tradeoff full control full understanding flexibility competitive advantage build (and thus

A Critical Design Tradeoff full control full understanding flexibility competitive advantage build (and thus design) time cost maintenance standards 10 September 2021 – 05: 14: 06 can be instantaneous external support quality buy or get for free (and thus fit into a design) evaluation cost licensing lack of customizability obsolescence urgent bugs © 2006 University of California, Irvine – André van der Hoek 19

Component Reuse Process Identify preliminary architecture Update architecture 10 September 2021 – 05: 14:

Component Reuse Process Identify preliminary architecture Update architecture 10 September 2021 – 05: 14: 07 Identify potential places for reuse Select component Establish selection criteria (per place) Evaluate components © 2006 University of California, Irvine – André van der Hoek Search for applicable components 20

Assignment 5 n Research available components that provide a particular kind of functionality for

Assignment 5 n Research available components that provide a particular kind of functionality for a layered software design environment, set up selection criteria, and make a choice of the component that you believe is best n Create a 15 minute presentation that describes – your search process – candidate components you found v v strengths weaknesses – your selection criteria – the component you deem best (and why) – a (rough) architecture 10 September 2021 – 05: 14: 07 © 2006 University of California, Irvine – André van der Hoek 21

Final Project System Design Arch. Imp. Design Code 10 September 2021 – 05: 14:

Final Project System Design Arch. Imp. Design Code 10 September 2021 – 05: 14: 07 © 2006 University of California, Irvine – André van der Hoek 22

Assignment 6 – Groups n n n Group 1: – MIKE WADHERA, MITCH WILLIAMS,

Assignment 6 – Groups n n n Group 1: – MIKE WADHERA, MITCH WILLIAMS, JULIE RICO, SAM ARCHER, SAM CHANG – a mini spreadsheet – a mini database – a mini web authoring tool – a mini slide authoring and presentation tool Group 2: – KYLE STRASSER, CHRIS BAKER, SEAN CASHIN, JAMES GARY, NICK INGERSOLL Group 3: – GABRIELA MARCU, ANGELO PIOLI, BRYANT HORNICK, NG WENG LEONG, PETER LEE Group 4: – JUNG HO KIM, CYNTHIA K. LAM, MICHELLE ALVAREZ, JASON DRAMBY Focus on a simplementation – – 10 September 2021 – 05: 14: 08 all projects need to be able to save and open files we will guide you during Monday’s meetings, adaptability © 2006 University of California, Irvine – André van der Hoek 23

In Closing… n Thanks for a fun (albeit very busy) quarter n If you

In Closing… n Thanks for a fun (albeit very busy) quarter n If you have feedback on the class, I would love to hear it (both positive and negative; after all, this was a first) n Do not forget to fill out the online course evaluations 10 September 2021 – 05: 14: 08 © 2006 University of California, Irvine – André van der Hoek 24