Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Design patterns vs Frameworks

Tags:

Can someone illustrate what really is the difference between the two?

like image 890
sarego Avatar asked Nov 26 '08 09:11

sarego


People also ask

What are the advantages of using design patterns over frameworks?

Design patterns help promote easier program changes and object reusability. Loosely coupled objects are easier to reuse and change. Keeping objects small and specialized promotes loose coupling. Design patterns are built with many small specialized objects.

What are the patterns and frameworks in UML explain?

The generalized UML pattern framework is an object-oriented framework that provides support for the base classes that the standard pattern implementation model extends. The specialized patterns framework provides additional functionality such as role-marking and traceability features for pattern participants.


2 Answers

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.

like image 137
OregonGhost Avatar answered Oct 28 '22 15:10

OregonGhost


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:

    • class design patterns (involves classes)
    • business design patterns (involves business workflows)
    • application design patterns (involves applications)
  • framework has a large scope:
    For instance, .NET is a framework composed of:

    • a language (C#)
    • a runtime environment (CLR)
    • a collection of libraries
      Just develop what you need and let the .Net framework call your classes.
like image 37
VonC Avatar answered Oct 28 '22 15:10

VonC