Frameworks and Design References Building Application Frameworks Object

Frameworks and Design

References Building Application Frameworks: Object. Oriented Foundations of Framework Design; Mohammed Fayed, Douglas Schmidt, Ralph Johnson; Wiley 1999 Framework-Based Software Development in C++; Gregory Rodgers; Prentice Hall; 1997 Fall 2004 2

Lighter Overviews • Wikipedia's "Software Frameworks" • http: //www. wikipedia. org/wiki/Software_framework • “Evolving Frameworks”, Roberts & Johnson • http: //st-www. cs. uiuc. edu/users/droberts/evolve. html • ACM Crossroads • http: //www. acm. org/crossroads/xrds 7 -4/frameworks. html Fall 2004 3

Definition-What is a framework? A reusable design that describes how system in decomposed into objects. A class library that captures interaction patterns between objects. A set of abstract and concrete classes Fall 2004 4

Examples Sunit Morphic Microsoft Foundation Classes Fall 2004 5

Frameworks vs. Design Patterns Both let you reuse design, but frameworks: include code include many more classes are not as widely reusable are more pragmatic, less abstract Fall 2004 6

vs. Applications Both include code, but frameworks: Have loose ends that need instantiating Are MUCH more expensive to develop Fall 2004 7

vs. Libraries Frameworks are like libraries except: They use inheritance more heavily They evolve more quickly They are often modified on the spot if they are not quite right Fall 2004 8

Framework Issues Development Complexity Learning Curve (Usability) Extensibility Maintainability Validation Efficiency Composition Fall 2004 9

Framework Development Domain Analysis Build Examples Framework Design base it on observed patterns in the examples Framework Implementation Documentation If it takes too long to learn, people will roll their own Rinse, Repeat: Evolve or Fade Fall 2004 10

Domain Analysis Context Analysis Abstraction Modeling Domain Architecture (Clustering) Focus is on the problem space and problem category. Work with people who already work in the area. . Fall 2004 11

Case study of a framework Sunit – unit testing frameworks Domain analysis: What are concepts in domain of testing? Test Case Test Suite Test Fixture Test Check Test Result Something to run the tests Fall 2004 12

SUnit Architecture Test. Case uses the Command Pattern, implements abstract run inter Run is a Template Method Pattern: run set. Up run. Test tear. Down Test. Suite Composite Pattern Fall 2004 13

SUnit Architecture Fall 2004 14

Framework design issues Have default behavior Design to prevent user errors Users may not want to master your system! Balance power versus simplicity Consider carefully what hooks you add The framework that does everything does nothing Have documentation Framework not equal to Class Library Expect to Change Fall 2004 15
- Slides: 15