views:

295

answers:

9

I am getting confused here. I am watch an educational tutorial. The speaker defined .Net as Library not dare to say as framework. As far as I know .Net is a Framework. Is there anyone who can explain, if .Net is framework or a library.

Thanks

After the answer,

But the way the speaker define a Framework as follows 1. At least a portion of the application should run ( which he say semi complete application) 2. It should support inversion of control.

Can anyone explain this ?

Thanks again.

+15  A: 

.NET is a framework consisting of the BCL (base class libraries), the CLR (common language runtime), etc...

Chris
Yep. It *has* a library, but the library is called the BCL. .NET as a whole is bigger than just the library.
Joe White
I look the answer. I posted additional qn.
Wonde
+4  A: 

It is a framework consisting of a number of binaries libraries (the DLLs) and the CLR.

Follow up to the 2nd part of the question: The .NET Frameowkr provides a number of binary libraries (the DLLs) that provide much of the basic functionality shared between all applications written in a .NET language (C#, F#, J#, VB.NET, etc).

You application, upon compilation, is translated into CLR instructions (MSIL) that are executed by the .NET Framework along side the libraries that are provided to you.

Babak Naffas
+2  A: 

It's a framework.

A library is usually a collection of classes intended for a specific purpose, like the System.Net library in .NET that is intended for internet communication.

A framework is a set of classes (or a collection of libraries) that covers pretty much everything you need to make an application, and the application runs in the framwork without any direct contact to the underlying system or hardware.

Guffa
+3  A: 

It's certainly at least a framework (languages, runtime, libraries) rather than just a library but I would suggest that it is actually the successor of a philosophical model of programming which internalizes a rich history of Microsoft's (and other similar-of-breed) approaches to application development. There is a particular depth of insight in this model which is unrivaled in the scale of its popularity and adoption. .NET is the successor in a long line of critically strategic developer initiatives within the Microsoft ecosystem. To ascribe it as merely a framework would be to miss the point entirely. To call it a library is simply clueless.

bjg
+1. I heart dot net. It's everything i never realized was missing from Java at the time.
cHao
+4  A: 

See http://en.wikipedia.org/wiki/Software_framework for a definition of a framework.

  1. inversion of control - the program flow for the WinForms and WPF libraries are dictated by those libraries, not the caller.

  2. default behavior - the default behaviour of e.g. a WinForms Window is to show a basic, interacting window.

  3. extensibility - the user can override and specialize functionality of the various .NET classes.

  4. non-modifiable framework code - Microsoft will not be happy if you modified any of the .NET code.

Therefore, .NET is a framework.

reece
Definition of a framework. Classy.
Sergio Tapia
+1  A: 

My simple definition of the terms is this:

  • A library is a collection of functions.
  • A framework is a way of life.

With a library you can use whatever pieces of it you want; With a framework, you have to commit to architecting our program their way.

So, .NET can be just a library (when used in console app, windows services etc), and can be a framework (when used in ASP.NET or WinForms)

James Curran
+1  A: 

One difference to my mind is that one is meant to create classes which derive from the classes in a framework. That's a bit different even from a class library. The framework is meant to be more in control of the basic operations, while you extend the framework to meet your needs.

John Saunders
A: 

.NET is fundamentally a framework/foundation/building blocks that consists of code library API besides among other important technologies.

SoftwareGeek
A: 

.net is a Framework by microsoft. just like a car given to you with the frame and you need to choose your suiting transmission, engine, muffler, autocop system etc. the car frame here is .net and you have the freedom to place your piece of code to increase perfomance, sql engines connectivities, communication paths, security etc.

the job of framework is to reduce time cost on building an applications. the only way to reduce time cost by providing library files. This is the reason why some people say .net is a library. but more than a library .net provide more functionalities, more to the programmers. .net provides CLR(common language runtime) and CTS(common type system) which brings all language together for development thats you can use a library written using language a by language b in .net.

check these links : link 1 ,link2

Jaison Justus
the good book to study .net using c# isprofessional c# 2008 by Wrox publication
Jaison Justus