Frameworks and Hooks
by
Garry Froehlich
Paul Sorenson
SERL
(Software Engineering Research Lab)
SERL - Software Engineering Research Lab
slide1
Software Reuse
Software reuse is the process of creating
software systems from existing software
systems. (Krueger, 1992)
High level languages
Code scavenging
Code components
Design patterns
Object-oriented frameworks
Application generators
SERL - Software Engineering Research Lab
slide2
Object-Oriented Frameworks
The reusable design of
a system or subsystem
implemented through a
set of classes and their
collaborations.
Users complete or
extend the framework
by adding or
customizing application
specific components to
produce an application.
SERL - Software Engineering Research Lab
Framework
Application
Components
slide3
Users and Developers of
Frameworks
There are three main roles associated with
frameworks:
Framework designers, also called framework
developers or framework builders, develop the
original framework
Framework users, also called framework clients or
application developers, use the framework to
develop applications.
Framework maintainers refine and redevelop the
framework to fit new requirements.
SERL - Software Engineering Research Lab
slide4
Framework Design
Frameworks differ from applications
the level of abstraction is different as frameworks
provide a solution for a family of related problems,
rather than a single one.
to accommodate the family of problems, the
framework is incomplete, incorporating hot spots
and hooks to allow customization
Frameworks must be designed for flexibility,
extensibility, completeness and ease of use.
SERL - Software Engineering Research Lab
slide5
HotDraw Overview
A framework for
developing structured
graphical editors.
Smalltalk version
maintained by Ralf
Johnsons group at the
University of Illinois.
SERL - Software Engineering Research Lab
slide6
HotDraw Framework
Drawing
Controller
Tool
Figure
Drawing
View
Rectangle
Figure
Arrow
Figure
Handle
Composite
Figure
Drawing
SERL - Software Engineering Research Lab
slide7
Hot Spots and Hooks
Frozen Spots:
capture the
commonalties across
applications.
Hot Spots: general
areas of variability
within a framework.
Hooks: specific ways
in which a
framework can be
customized.
SERL - Software Engineering Research Lab
Drawing
Controller
Tool
Select Tool
New Tool
New Tool
Type
slide8
RCIM Graphical Display
Figure
Rectangle
Figure
Text
Figure
Handle
Composite
Figure
RCIM
Figure
Layout
Manager
SERL - Software Engineering Research Lab
Drawing
RCIM
Drawing
slide9
Framework Use
A framework is chosen to match the application
requirements.
Framework users must learn the framework
before they can develop an application from it.
The application design has to conform to the
concepts provided by the framework. Users
build extensions to the framework.
Multiple frameworks can be used in a single
application, but there may be gaps or overlap
in the functionality they provide.
SERL - Software Engineering Research Lab
slide10
Learning to Use the Framework
Frameworks can be difficult to learn so a means
of lowering the learning curve is needed.
Tutorial sessions can be held to allow the framework
builders to show users what can be done with the
framework.
Tools can be used to investigate the operation of the
framework and to allow the use of the hooks without
learning the whole framework.
Documentation can describe the design and intended
use of the framework, and provide examples of use.
SERL - Software Engineering Research Lab
slide11
Framework Experience
Framework developments
we have been involved in:
EAF (Engineering Application Framework)
and Prothos (e-commerce framework)
- see [Link]
CSF - Client Server Framework
- see [Link]/~garry/framework/
Sandwich - Personal Proxy Assistant Framework
SERL - Software Engineering Research Lab
slide12
Framework Evolution
Framework evolution might be categorized as
anything beyond use as-is and completion.
Refactorings can be used to restructure the
framework while preserving its behavior.
Design patterns can be applied to make the
framework more flexible.
What happens to applications when
frameworks evolve?
SERL - Software Engineering Research Lab
slide13
Framework Benefits
Reusable implementation and design that
captures the expertise of developers within a
domain.
The framework should have a quality design
which will be inherited by applications.
Decreased development time.
Reduced maintenance costs from maintaining
a common code base.
SERL - Software Engineering Research Lab
slide14
Framework Concerns
Building a framework requires more resources
than building a single application.
When a framework evolves, all applications
built from the framework are affected.
A complex framework can take a significant
amount of time to learn before it can be used
effectively.
It isnt always easy to determine if the
framework is compatible with the desired
application.
SERL - Software Engineering Research Lab
slide15
Research Issues
What constitutes framework breakage and
what are the issues related to evolvability?
(Role of design patterns)
How are frameworks most effectively learned?
Creating of tools in support of framework use in particular HookMaster.
Exploring the use of experience bases in
conjunction with framework development, use
and evolution. (FrameScan study)
Continuing to build new frameworks to
understand the issues better.
SERL - Software Engineering Research Lab
slide16
Conclusion
An object-oriented framework is the reusable
design and implementation of a system or
subsystem.
Frameworks are meant to help solve a set of
related problems through design reuse.
Design patterns are proven solutions to
common design problems and can be used to
build frameworks.
SERL - Software Engineering Research Lab
slide17
Potential Collaborative Work
Integration framework.
Identifying hotspots in current
customizations => use cases for framework
development and evolution
Use of reengineering tools to assist in better
understanding of the existing code base.
Process and quality issues??
SERL - Software Engineering Research Lab
slide18