34

I would like to know the difference between framework and architecture.
for example: dotnetnuke is the framework and mvc is the architecture.

so if we take both of this as a example, can anyone tell me difference between them?
Want to know which one is using when and where?
Which is good in terms of user requirement satisfaction?

sikender
  • 5,883
  • 7
  • 42
  • 80
  • In many cases i would say they are used interchangably, although they probably shouldn't be, i've hear MVC called a framework more than an architecture. – Paul Creasey Feb 03 '10 at 08:40
  • its just a example. want to clear the defination. – sikender Feb 03 '10 at 08:42
  • 2
    MVC is a "design pattern" in CS terms, I would consider this separately from architecture. An architecture might include many patterns. – Art Feb 03 '10 at 09:33

12 Answers12

82

Let me illustrate the difference.

Framework:

Framework

Architecture:

Architecture

Vasyl Boroviak
  • 5,959
  • 5
  • 51
  • 70
31

It's common to make this distinction:

  • A Library is a reusable set of types/functions you can use from a wide variety of applications. The application code initiates communication with the library and invokes it.
  • A Framework consists of one or more libraries, but the difference is that Inversion of Control applies. The application registers with the framework (often by implementing one or more interfaces), and the framework calls into the application, which may call back into the framework. A framework often exists to address a particular general-purpose Domain (such as web applications, or workflows, etc.).
  • Architecture consists of the guiding principles behind a given application. It is not strongly tied to a particular framework or library.
Mark Seemann
  • 225,310
  • 48
  • 427
  • 736
12

Simply put -- architecture is theory, framework is implementation.

Art
  • 1,027
  • 1
  • 12
  • 21
7

Frameworks is a collection of classes and tools that help you developing great softwares ... like .net framework or Qt.
Architecture is entirely different : it refers to design pattern or how an application or a framework is organized. What are the modules that compose it and how they communicate together !

Matthieu
  • 2,743
  • 19
  • 21
  • Frameworks: or they might help you develop lousy software. Or be imposed on you by Project Requirements, making it hard for you to develop great software. – Charles Stewart Feb 03 '10 at 09:16
6

Also to note the difference between design and architecture:

Design: When you talk about what to do when a user logs in ?
Ex. Usability, portability, accessibility etc.

Architecture: When you talk about what to do when 5000 users logs in simultaneously ?
Ex. Scalability, reliability, availability, performance etc.

Ravi Gupta
  • 4,468
  • 12
  • 54
  • 85
6

Architecture is about style, abstract idea, flow, methodology, concept. Framework is something which implements the style, idea, concept etc..or makes it easier to implement it. example,

Architecture: Every component should have standard pluggable interfaces and it should be possible to connect any component to any other.

Framework: Then lego building blocks can be the framework.

Library: some readymade combinations of blocks that would work as the pillars.

Application: A building structure using the pillars and other building blocks(application).

Tiju John
  • 933
  • 11
  • 28
3

Frameworks are generally a part of your architecture. They are normally part of the infrastructure of your code. MVC is a framework, as is ASP.NET, WinForms and many many libraries (NHibernate, PostSharp and more).

Architecture refers to how your software it put together - how it is organized, how the different classes and modules in it interact.

Oded
  • 489,969
  • 99
  • 883
  • 1,009
2

Framework is a part of architecture implementation. Say, our app will be organized according to MVC architecture and will use SpringMVC framework for that. Different frameworks are organized according to different architectural patterns. Someone can say, that term "framework" is itself describes architectural pattern. Its "opposite" is "library", because libraries are directly controlled by your application while frameworks use inversion of control and they control execution of your code. Though, there are controversies in using term "framework".

Rorick
  • 8,857
  • 3
  • 32
  • 37
2

I think framework is something that is created by someone and available to you to accomplish a objective. Like MFC is a framework to write GUI application. Frameworks takes full control from you but gives you the advantage of not trying to do everything from ground up. In most cases it is better to use a well designed and tested framework, rather than write your own.
In this context architecture is how the framework has been designed and possibly the way to use the framework from you application maintaining the vision of the framework designers.

But broadly architecture is the design principle and can encompass not only software but complete systems as well. Think security, integration, reporting, infrastructure aspects etc.

softveda
  • 10,858
  • 6
  • 42
  • 50
2

MVC is pattern as supposed to an architecture, it may be used as a technique in your architecture though. Framework as others have said is a collection of tools you use to implement your architecture. In other words framework is the tool-belt.

Mitch Labrador
  • 294
  • 3
  • 3
2

Architecture is a logical view, it means doesn't have any implmentation(java classes), just has an idea where to put each components(jsp, servlet and model component for MVC architecure). We can also called as Design pattern.

Framework is an implementation of an Architecture. Like Spring(Application Architecture), Struts(MVS web App Architecture) are some framework.

1

Let me give a try:

Framework:
Framework is nothing but a blue print of the solution that going to be provided for a task or work. The blue print should have info like:
1. what are the components(tools) going to involved or developed. And how they are connected
2. how the components are going to be maintained
3. what is the input for all the components and what they return back
4. how the components are getting initiated and what is the final output by integrating all the component

Architecture: Architecture is a design which tells us how the framework (or) given_solution is going to be implemented on expected environment.

sorak
  • 2,607
  • 2
  • 16
  • 24
Venkat K
  • 1
  • 1