Informatics 122 Software Design II Lecture 8 André van der Hoek Duplication of course material for any commercial purpose without the explicit written permission of the professor is prohibited. November 14, 2018 – 02:52:53 (c) 2006 University of California, Irvine – André van der Hoek
© 2006 University of California, Irvine – André van der Hoek Today’s Lecture Component reuse Assignment 5 November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
© 2006 University of California, Irvine – André van der Hoek Design Tradeoffs November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
© 2006 University of California, Irvine – André van der Hoek Design Tradeoffs November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
© 2006 University of California, Irvine – André van der Hoek Design Tradeoffs November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
A Critical Design Tradeoff build (and thus design) buy or get for free (and thus fit into a design) November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
© 2006 University of California, Irvine – André van der Hoek Design Tradeoffs November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
© 2006 University of California, Irvine – André van der Hoek Design Tradeoffs November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
A New Kind of Design Decision Less fine control More learning and using and applying Similar to recovery November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
A Critical Design Tradeoff build (and thus design) buy or get for free (and thus fit into a design) November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
A Critical Design Tradeoff: Benefits full control full understanding flexibility competitive advantage can be instantaneous external support quality build (and thus design) buy or get for free (and thus fit into a design) November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
A Critical Design Tradeoff: Drawbacks build (and thus design) buy or get for free (and thus fit into a design) time cost maintenance standards licensing lack of customizability obsolescence urgent bugs evaluation cost November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
A Critical Design Tradeoff full control full understanding flexibility competitive advantage can be instantaneous external support quality build (and thus design) buy or get for free (and thus fit into a design) time cost maintenance standards evaluation cost licensing lack of customizability obsolescence urgent bugs November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
© 2006 University of California, Irvine – André van der Hoek Our Focus Today full control full understanding flexibility competitive advantage can be instantaneous external support quality build (and thus design) buy or get for free (and thus fit into a design) time cost maintenance standards evaluation cost licensing lack of customizability obsolescence urgent bugs November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
Architectural Mismatch Architectural mismatch stems from mismatched assumptions a reusable component makes about the system structure it is to be part of. Components functionality interfaces behavior control model Connectors protocols data model System topology Construction dependencies initialization Difficult to predict a-priori November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
Architectural Mismatch Architectural mismatch stems from mismatched assumptions a reusable component makes about the system structure it is to be part of. Components functionality interfaces behavior control model Connectors protocols data model System topology Construction dependencies initialization How much adaptation is too much adaptation? November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
Component Reuse Process Identify preliminary architecture Identify potential places for reuse Establish selection criteria (per place) Update architecture Select component Evaluate components Search for applicable components November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
Identify Preliminary Architecture Largely as usual Familiarity with certain reusable components may influence the architectural choices being made November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
Identify Potential Places for Reuse There are components for just about anything graph layout database access regular expression handling numerical computing protein visualization speech recognition e-mail handling index and search maps geocoding … Do not be afraid to judiciously mark the architecture in terms of where reusable components may fit in November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
Establish Selection Criteria (Per Place) What kind of component does the architecture really need? functionality absolutely necessary versus desired functionality software qualities How is the component to fit with the rest of the architecture? some adaptation can be accommodated Investment cost future cost Reputation component provider component itself SLIDE NEEDS WORK November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
Search for Applicable Components Google is a wonderful thing www.google.com code.google.com Component repositories rich in available components many junk some decent occasional gems Too many is no good Too few is no good either although one perfect component would solve the problem The cost of a design activity NEEDS WORK November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
© 2006 University of California, Irvine – André van der Hoek sourceforge.net November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
© 2006 University of California, Irvine – André van der Hoek apache.org November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
© 2006 University of California, Irvine – André van der Hoek Evaluate Components Apply selection criteria to each of the components found beware of the platform, deployment needs, licensing terms matrix of criteria versus components Additional approaches trial / evaluation licenses reading component code examine sample programs using the component Examine the component’s documentation SLIDE NEEDS WORK November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
© 2006 University of California, Irvine – André van der Hoek Select Component Choose the optimum component understand tradeoffs be prepared to not choose a component November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
© 2006 University of California, Irvine – André van der Hoek Update Architecture Design any adapters necessary to fit the component Redesign other components as needed Restructure architecture as needed Consider implementers Special role in documentation Look what happened to Cake… NEEDS WORK November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
A Quick Sample Among the Graduate Students Xalan Xerces Lucene Jung Kaffe Bcel Equip JLoox Schematron GraphViz Jython Scriptalicious … Xacml SWT JOAL Jetty Batik JmDNS Darwin Streaming Server Spook Mplayer MySQL live.com RTP/RTSP gaim im client … November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
© 2006 University of California, Irvine – André van der Hoek Assignment 5 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 Create a 15 minute presentation that describes your search process candidate components you found strengths weaknesses your selection criteria the component you deem best (and why) a (rough) architecture November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek
© 2006 University of California, Irvine – André van der Hoek Assignment 5 Group 1: a component for laying out architectures on the drawing canvas Group 2: a component for managing consistency among layers in an architecture Group 3: a component for taking mouse gestures as input Group 4: a component for persisting layered architectures Presentations given on Monday November 14, 2018 – 02:52:53 © 2006 University of California, Irvine – André van der Hoek