(c) 2010 university of california, irvine – andré van der hoek

26
(c) 2010 University of California, Irvine – André van der Hoek 1 February 21, 2010 – 18:05:18 Informatics 122 Software Design II Lecture 9 André van der Hoek & Alex Baker Duplication of course material for any commercial purpose without the explicit written permission of the professor is prohibited.

Upload: duman

Post on 22-Jan-2016

22 views

Category:

Documents


0 download

DESCRIPTION

Informatics 122 Software Design II. Lecture 9 André van der Hoek & Alex Baker Duplication of course material for any commercial purpose without the explicit written permission of the professor is prohibited. February 21, 2010 – 18:05:18. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 1February 21, 2010 – 18:05:18

Informatics 122Software Design II

Lecture 9

André van der Hoek & Alex Baker

Duplication of course material for any commercial purpose without the explicit written permission of the professor is prohibited.

Page 2: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 2February 21, 2010 – 18:05:18

Today’s Lecture

Component reuse Assignment 5

Page 3: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 3February 21, 2010 – 18:05:18

A Critical Design Tradeoff

build(and thus design)

buy or get for free(and thus fit into a design)

Page 4: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 4February 21, 2010 – 18:05:18

A Critical Design Tradeoff: Benefits

build(and thus design)

buy or get for free(and thus fit into a design)

full controlfull understandingflexibilitycompetitive advantage

can be instantaneousexternal support

quality

Page 5: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 5February 21, 2010 – 18:05:18

A Critical Design Tradeoff: Drawbacks

build(and thus design)

buy or get for free(and thus fit into a design)

timecostmaintenancestandards

licensinglack of customizability

obsolescenceurgent bugs

evaluation cost

Page 6: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 6February 21, 2010 – 18:05:18

A Critical Design Tradeoff

build(and thus design)

buy or get for free(and thus fit into a design)

timecostmaintenancestandards

licensinglack of customizability

obsolescenceurgent bugs

evaluation cost

full controlfull understandingflexibilitycompetitive advantage

can be instantaneousexternal support

quality

Page 7: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 7February 21, 2010 – 18:05:18

Our Focus Today

build(and thus design)

buy or get for free(and thus fit into a design)

timecostmaintenancestandards

licensinglack of customizability

obsolescenceurgent bugs

evaluation cost

full controlfull understandingflexibilitycompetitive advantage

can be instantaneousexternal support

quality

Page 8: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 8February 21, 2010 – 18:05:18

A New Kind of Design Decision

Less fine control More learning and using and applying

Similar to recovery

Page 9: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 9February 21, 2010 – 18:05:18

Architectural Mismatch

Architectural mismatch stems from mismatched assumptions a reusable component makes about the system structure of which it is to be part

Components– functionality– interfaces– behavior– control model

Connectors– protocols– data model

System topology Construction

– dependencies– initialization

Difficult to predict a-priori

Page 10: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 10February 21, 2010 – 18:05:18

Architectural Mismatch

Architectural mismatch stems from mismatched assumptions a reusable component makes about the system structure of which it is to be part

Components– functionality– interfaces– behavior– control model

Connectors– protocols– data model

System topology Construction

– dependencies– initialization

How much adaptation is too much adaptation?

Page 11: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 11February 21, 2010 – 18:05:18

Component Reuse Process

identifypreliminaryarchitecture

identifypotentialplaces for

reuse

establishselection

criteria (perplace)

search forapplicable

components

evaluatecomponents

selectcomponent

updatearchitecture

Page 12: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 12February 21, 2010 – 18:05:18

Identify Preliminary Architecture

Largely as usual Familiarity with certain reusable components may

influence the architectural choices being made

Page 13: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 13February 21, 2010 – 18:05:18

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– …

Judiciously mark the architecture in terms of where reusable components may fit in

Page 14: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 14February 21, 2010 – 18:05:18

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

Page 15: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 15February 21, 2010 – 18:05:18

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

Research and professional development literature

Too many is no good Too few is no good either

– although one perfect component would solve the problem

Page 16: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 16February 21, 2010 – 18:05:18

sourceforge.net

Page 17: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 17February 21, 2010 – 18:05:19

apache.org

Page 18: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 18February 21, 2010 – 18:05:19

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– writing code using the component

Examine the component’s documentation Analyze architectural impact of the component

Perhaps even “mini integrate” the component

Page 19: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 19February 21, 2010 – 18:05:19

Select Component

Choose the optimum component– understand tradeoffs– be prepared to not choose a component

Page 20: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 20February 21, 2010 – 18:05:19

Update Architecture

Design any adapters necessary to fit the component

Redesign other components as needed Restructure architecture as needed

Consider implementers– special role for documentation

Page 21: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 21February 21, 2010 – 18:05:19

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 …

Page 22: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 22February 21, 2010 – 18:05:19

Assignment 5

Research available components that provide a particular kind of functionality for Calico, set up selection criteria, make a choice of the component that you believe is best, and detail how you would go about integrating the component

Specifically, research components for the following situations– speech recognition – we want to add the ability to use

speech to create text labels, for which we need some sort of speech-to-text conversion component that is as reliable as possible

– mouse gestures – we would like to integrate more complex mouse gestures; find an existing component that can recognize mouse gestures reliably, possibly employing a learning algorithm

– graphics – we want to replace Piccolo, as it is no longer supported, ideally with a drawing framework that has powerful functionality for future extensions yet has minimal impact on the current architecture

– distribution – we would like to replace the current home-grown mechanism with an actual real protocol and middleware that is lightweight, fast, and can handle long distance

Page 23: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 23February 21, 2010 – 18:05:19

Assignment 5

Additional constraint– we have $25,000 in funds to spend on this project, but we

want to save money for user studies and other assorted expenses, so cost should be (somewhat) minimized

– if truly warranted, management can be requested to fund one “big ticket” component, up to possibly $75,000

Page 24: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 24February 21, 2010 – 18:05:19

Assignment 5

Create a 10 minute presentation that describes for one of the four categories (specific assignments of which category by which team on slide 26)– your search process– candidate components you considered

strengths weaknesses

– your selection criteria– the component you deem best (and why)

Create a document that describes, at the design and code level, the impact of incorporating the chosen components (all four)– from this document, someone should be able to make these

changes “effortlessly”

Page 25: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 25February 21, 2010 – 18:05:19

Assignment 5

Presentation in class Thursday, February 25th

Document due at the beginning of class Thursday, February 25th

Graded on breadth and depth of component evaluation, as well as the thoroughness and insightfulness of the document

Each person also needs to submit a team evaluation (new forms available on class webpage)

Page 26: (c) 2010 University of California, Irvine – André van der Hoek

(c) 2010 University of California, Irvine – André van der Hoek 26February 21, 2010 – 18:05:19

Team Assignments

Team 1 (speech) ZIMING DAI RYAN CHRISTOPHER HSU SEAN LEW TSUSAKI KYLE STEPHEN LUTZE JAMES RICHARD BENSON

Team 2 (mouse) TAE SUNG KIM JORDANIEL CHARLES WOLK ARREN APPLEBAUM SOHRAB HEJAZI GARRETT KIM

Team 3 (graphics) RYAN SCOTT NISSENBAUM STACEY THUY VI DAO HUNTER GLENN GILLANE ALEX RYAN CHUNG MATTHEW JAMES PALMER

Team 4 (distibution) SAMUEL JAMES KAUFMAN KYLE PHILLIP MUSLER PATRICK CHAO-CHENG LU JOSHUA ALEXANDER PAPA JESSE MAYORGA DANIELSON

Team 5 (graphics) LEO ZEN FRANCISCO MORALES HIROE ONO SIMON HUYNH FRANCESCO MANTOVANI MICHAEL IDRIS MERCHANT