Can someone illustrate what really is the difference between the two?
Pattern support reuse of software architecture and design - Pattern capture the static and dynamic structures and collaboration of successful solution to problem that arise when building application in particular domain
Framework supports reuse of detail design and code - A framework is an integrated set of a component that collaborate to provide a reusable architecture for a family of related application
Together, design patterns and frameworks helps to improve software quality and reduce development time.
|------------------------|
| (------) |
| (ClassA) |
| (------) |
| (-----------) |
| ((Singleton)) |
| (-----------) |
| (---------) |
| ((Factory)) |
| (---------) |
| |
| |
|------------------------|
Legend:
|---| Framework
(---) Class
() Design Pattern
A framework is a set of related classes to perform a certain task. Those classes may or may not implement a certain design pattern.
Pattern: Set of guild-lines, architecturing the application.
Framework: To follow particular pattern, set of pre-build classes and libraries to create architecture pattern.
From Object -Oriented Software Development Using Java by Xiaoping Jia:
Although both design patterns and frameworks are mechanisms used to capyure reusable designs, they are quite different. On the one hand, design patterns are schematic descriptions of reusable designs that are not concrete programs and that are language independent. On the other hand, frameworks are compilable programs written in a specific programming language and often contain abstract classes and interfaces. Design patterns are the architectural building blocks of frameworks. They help make frameworks extendable and reusable. Frameworks usually contain implementations of many cooperating design patterns.
Even though they are two very different things, one can argue they both solve a software architecture problem
a design pattern solves many software architecture issues (about creation, behavior, concurrency, ...) with different pre-defined design. (design being an implementation of an architecture topic)
a framework is based on the Hollywood Principle ("Don't call us, we call you"), where you implement some high level requirements as specified, and leave the framework do the rest of the work, calling your implementations.
A key difference is the scope cohesion:
design pattern have a tight scope:
framework has a large scope:
For instance, .NET is a framework composed of:
A design pattern is a concept, or a receipt for how to get a specific problem done.
A Framework is code ready for use, usually packaged in a way that makes creating an application much easier.
It does not make sense to explain the differences because they are two totally different things.