DOC PREVIEW
SJSU CMPE 196G - Common Techniques
Pages 13

This preview shows page 1-2-3-4 out of 13 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 23ToolkitsFramework DefinitionsDistinguishing Framework CharacteristicsGoals of FrameworksFramework Design ProcessFrameworks StrengthsFrameworks Potential WeaknessesPattern and FrameworkDifferences Between Class Libraries & FrameworksGeneric ApplicationsWhen to Use PatternsDiscussion QuestionsCopyright © 1995-2004 Active Frameworks Inc. - All Rights Reserved - V2.0Introduction - Page L1-1PS95&96-MEF-L1-1Dr. M.E. FayadCommon Techniques for Reuse•Topics–Toolkits–Frameworks–Generic ApplicationsCopyright © 1995-2004 Active Frameworks Inc. - All Rights Reserved - V2.0Introduction - Page L1-2PS95&96-MEF-L1-2Dr. M.E. FayadToolkits•A toolkit is a set of related and reusable classes designed to provide useful, general-purpose functionality without dictating a particular application architecture.•A toolkit is known as a “class library”.•Examples:–C++ I/O stream library–Class libraryCopyright © 1995-2004 Active Frameworks Inc. - All Rights Reserved - V2.0Introduction - Page L1-3PS95&96-MEF-L1-3Dr. M.E. FayadFramework Definitions•A framework is a set of cooperating classes that comprise a reusable backbone for a specific application domain.–A set of abstract classes and how objects in those classes collaborate.•A framework is customized to a particular application by deriving application specific classes from abstract classes defined by the framework.–Use framework to build application by:»Creating new subclasses»Configuring objects together»Modifying working examples•Examples: Frameworks for user interfaces (MVC, MacApp, Interviews, ET++, ...), operating systems, structured drawing editors (Unidraw & Hotdraw), distributed objects, etc.Copyright © 1995-2004 Active Frameworks Inc. - All Rights Reserved - V2.0Introduction - Page L1-4PS95&96-MEF-L1-4Dr. M.E. FayadDistinguishing Framework Characteristics1. A framework provides an integrated set of domain- specific functionality–e.g., business applications, telecommunication applications. window systems, databases, distributed applications, OS kernels2. Frameworks exhibit inversion of control at run-time–i.e., the framework determines which methods to invoke in response to events3. A framework is a semi-complete application–Complete applications are developed by inheriting from, and instantiating parameterized framework componentsCopyright © 1995-2004 Active Frameworks Inc. - All Rights Reserved - V2.0Introduction - Page L1-5PS95&96-MEF-L1-5Dr. M.E. Fayad•Capture the common abstractions across a range of similar applications to minimize the code needed to implement any one of them.•Balance generality and leverage•Build application from preexisting components•Write as little code as possible Goals of FrameworksCopyright © 1995-2004 Active Frameworks Inc. - All Rights Reserved - V2.0Introduction - Page L1-6PS95&96-MEF-L1-6Dr. M.E. Fayad•Study problem domain and explore solution domains•Select a real problem•Select a wide range of carefully chosen examples (programs)•Generalize, such as–Find Common abstractions–Decompose the problem into standard componentsFramework Design Process A framework is a generalization of the implementation of several problems. A framework is a generalization of the implementation of several problems.Copyright © 1995-2004 Active Frameworks Inc. - All Rights Reserved - V2.0Introduction - Page L1-7PS95&96-MEF-L1-7Dr. M.E. Fayad•Substantial and even dramatic code savings•Reliable and debugged framework code•Leveraging Experience•Tuning critical paths and representations for efficiencyFrameworks StrengthsCopyright © 1995-2004 Active Frameworks Inc. - All Rights Reserved - V2.0Introduction - Page L1-8PS95&96-MEF-L1-8Dr. M.E. Fayad•Developing a good framework is hard.•Framework users must climb a steep learning curve.•Frameworks invariably evolve, and applications that use them must evolve with them.•It is usually hard to distinguish bugs in the framework from bugs in one’s own code.•A framework’s suitability for a particular application may not be apparent until after learning curves have been climbed and code has been specialized.•Frameworks generality and flexibility may work against its efficiency in a particular application.Frameworks Potential WeaknessesCopyright © 1995-2004 Active Frameworks Inc. - All Rights Reserved - V2.0Introduction - Page L1-9PS95&96-MEF-L1-9Dr. M.E. FayadPattern and Framework•Patterns and frameworks are highly synergistic concepts, with neither subordinate to the other•Patterns have been characterized as more abstract descriptions of frameworks, which are then implemented in a particular language •Sophisticated frameworks typically embody dozens of patterns•Likewise, patterns have been used to document frameworksCopyright © 1995-2004 Active Frameworks Inc. - All Rights Reserved - V2.0Introduction - Page L1-10PS95&96-MEF-L1-10Dr. M.E. FayadDifferences Between Class Libraries & FrameworksCLASS LIBRARIESOBJECT-ORIENTED FRAMEWORKAPPLICATIONSPECIFICLOGICAPPLICATIONSPECIFICLOGICNETWORKINGDATABASEUSERINTERFACEEVENTLOOPEVENTLOOPUSERINTERFACENETWORKINGMATHMATHDATABASEADTsADTsInvokesCallBacksC.B.InvokesInvokesCopyright © 1995-2004 Active Frameworks Inc. - All Rights Reserved - V2.0Introduction - Page L1-11PS95&96-MEF-L1-11Dr. M.E. FayadGeneric Applications•A generic application is one that has no particular problem domain, but just defines an application structure.•A generic application can be targeted to a particular domain by tailoring its frameworks and re-configuring objects defined by these frameworks.Copyright © 1995-2004 Active Frameworks Inc. - All Rights Reserved - V2.0Introduction - Page L1-12PS95&96-MEF-L1-12Dr. M.E. FayadWhen to Use Patterns1. Solutions to problems that recur with variations–No need for reuse if the problem only arises in one context1. Solutions that require several steps–Not all problems need all steps–Patterns can be overkill if solution is simple linear set of instructions1. Solutions where the solver is more interested in the existence of the solution than its derivation–Patterns leave out too much to be useful to someone who really wants to understand»They can be a temporary bridge, however .....Copyright © 1995-2004 Active Frameworks Inc. - All Rights Reserved - V2.0Introduction - Page L1-13PS95&96-MEF-L1-13Dr. M.E. Fayad1. What are the properties of


View Full Document

SJSU CMPE 196G - Common Techniques

Download Common Techniques
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Common Techniques and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Common Techniques 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?