Frameworks vs Class Libraries
Class libraries and framework s are (by definition) set of classes. But framework s have some distinctive characteristics that are not met by class libraries. Frameworks implement the concept of inversion of control while classes in class libraries are used and methods in these classes are called by the main program. This main control flow is written by the user not the developer of the class library. Class groups in frameworks almost always share invariants while classes in class libraries do not usually share invariants. Classes libraries have shared invariants if they incorporate frameworks.
Frameworks prescribe architecture for a problem solution and collaboration between the
objects. Class libraries do not describe architecture and implement only a very limited functionality. There are, of course, some class libraries which incorporate frameworks. In that case both the characteristics for the frameworks as well as the qualities for the class libraries hold.
Frameworks vs Abstract Classes
Both, the framework and the abstract class are abstract designs with a responsibility.Framework s almost always incorporate abstract classes and, therefore, use the concept of abstract classes.
But, the differences between abstract classes and framework s are:
An abstract class is exactly one class while a framework is a set of classes.
An abstract class is a small design with a limited functionality. A framework however,represents a larger design for an entire application or a subsystem.
Frameworks vs Design Patterns
At the first sight, it seems as if framework s were implemented design patterns. Even a careful analysis of the definitions of design pattern and framework does not help. A pattern is ``a recognizable way in which something is done, organized or happens'' .This definition certainly matches a framework. The definition of design pattern is too broad to be useful.
The definition of pattern in the pattern community is based on the observation that there is reoccurring solution to reoccurring problems. Thus, the problem a pattern solves is just as much a part of the pattern as the arrangement of objects that makes up the solution. A pattern is, therefore, ``a solution to problem in a context''. These patterns can not be easily expressed in object-oriented languages as we know them today.
On the other side, a framework is more than a design pattern as it is also code. A framework is an abstract design expressed in abstract classes and, therefore, in code. A framework contains a model for the object interaction and defines the kinds of classes. A framework will contain several design patterns.
So, both framework s and design pattern s are abstract designs to a given problem or problem family. But, design pattern s are much smaller and more abstract while frameworks use design pattern s and are expressed in code.
Links
URL Link: http://swt.cs.tu-berlin.de/~ron/diplom/node42.html