Tuesday, January 25, 2005

Framework vs Library

Definition of a framework:

1) "A reusable desing of all or part of a system that is represented by a set of abstract classes and the way their instances interact". (Reference 1)
2) "The skeleton of an application that can be customized by an application developer."(Reference 1)

Framework allows developers to reuse more than just code, the design and architecture reuse is important. Framework provides a structure where an application must follow certain flow and contracts. It provides a skeleton and unlike a class library, this one is active in that it has its own execution path, in other words the control is inverted where the container will call the application. Frameworks are a kind of domain-specific architecture.

Often time, framework leverages on design patterns to achieve flexibility and provide a general-purpose application design. Design patterns helps in creating indirections and abstractions so you can plug in your own classes. Frameworks are at a different level of abstraction than the design patterns. Design patterns are the micro-architectural elements of frameworks. Another way of looking at this is that a frameworks usually contains my design patterns.

Benefits of a framework:
1) Efficient, easy to maintain and reliable
2) Reusable context for components
3) High productivity
4) Design reuse

Despites all the benefits of reuse, using a framework requires investment in learing the framework's interactions and limitations. It is important to understand the following characteristics of a framework:

1) Strength
2) Weaknesses
3) Target applications
4) Its component and structure
5) Development process
6) Fundamental design patterns
7) Programming techniques

"Frameworks are firmly in the middle of resuse techniques. They are more abstract and flexible than components, but more concrete ans easier to reuse than a pure design." (Reference 1)
Reference:
1) Frameworks = (Components + Patterns) by Ralph E. Johnson

0 Comments:

Post a Comment

<< Home