Welcome to MSDN Blogs Sign in | Join | Help

What is the .NET Framework?

This has to be one of the most commonly asked questions of me over the last 5 years. And much like Godfrey Saxe's wonderful poem on experiential perspectives, the answer varies highly by who you ask.

Many of us who have been rolling in the .NET Framework for 7 years tend to forget that the basic question is of interest to those who haven't used it. And trying to find a simple definition can be maddening. Having stumbled up against most of the elephant, I'll give it a shot :-)

Physically speaking, it is a handful of libraries and files that serve as a platform and API. If you've never looked for it before, check out

C:\WINDOWS\Microsoft.NET\Framework

(or whatever mutations your installation/OS may impart on that templated path)

In a marketing sense, we used to slap the *.NET* suffix on products that took advantage of this platform. We've stopped doing that for the most part, but other people still do it, so you may see that on a product name. 

From the developer mindset it's a layer over Win32 and the physical platform that allows you to build solutions more rapidly. In this sense, it serves a similar role to MFC, ATL, or even VB.

We use the term .NET Framework SDK when we include compilers, some tools, and a bunch of docs. The toolset does not include Visual Studio, which is our flagship IDE for the .NET Framework.

Many Java people ask if the .NET Framework is just the MS response to the Java virtual machine. I would disagree with the premise of that. Sun did not invent the concept of a runtime, nor did MS. The first mainstream runtime that I can think of was SmallTalk's runtime. The .NET Framework is no more an MS response to the JVM than the JVM was a response to the VB Runtime. But I digress....

In some ways, the .NET Framework is similar to the Java virtual machine coupled with its class libraries. Both take intermediate instruction sets (in .NET it is IL - Intermediate Language, in Java it is byte code), and translate it down to the platform instruction set. Java interprets the instructions (HotSpot and other technologies notwithstanding), while .NET compiles individual methods on the first invocation. It's hard to say one is better or worse than the other. JIT-ting almost always performs better, but you can do JIT-like things in Java if needed.

There is a philosophical difference in focus between the two technologies, though. It's almost comical: while both technologies have a specific distinguishing philosophy, few of the developer audiences ever apply the *advantage* of either one. Java emphasizes Write Once, Run Anywhere. Fascinating concept, but you rarely find a successful and sizeable occurence of it anywhere. On the other hand, .NET's Common Language Runtime is about one runtime for any language. You could say Any Language, One Runtime, I guess. Great concept, but I find most companies are standardizing on one .NET language. If they are not standardizing on one language, it's a matter of factions, not standards, that is driving this. 

Perhaps you could say Java is one language, many platforms, while .NET is many languages, one platform. And in the end, most dev audiences I have experienced do one language, one platform, regardless of *which* technology choice they make.

At its core, the .NET Framework is 3 things:

1) A Type System (CTS - Common Type System) that spans languages

2) A Library (FCL - Framework Class Library) that spans languages

3) A runtime (CLR - Common Language Runtime) that spans languages

It is a virtual platform that manages the allocation and cleanup of its types, spans languages, and offers a rapid way to build applications. It is versioned (4 releases - 1.0, 1.1, 2.0, 3.0), and it is free, as are the flagship compilers (C#, VB.NET).

I won't argue whether it is better than Java or worse, as the debate spills way beyond facts to political, emotional, and perhaps even religious debates. I do enjoy it when Java developers try out the .NET Framework, though. I'm sure the other way around is interesting as well, but since I work for Microsoft, I don't usually see that side of things.

Anyway, if you believe I'm leaving any gaping holes around the simple definition, by all means, leave a comment, and I'm happy to discuss further.

Published Wednesday, April 18, 2007 8:50 PM by dougturn
Filed under:

Comments

# re: What is the .NET Framework?

"Java emphasizes Write Once, Run Anywhere. Fascinating concept, but you rarely find a successful and sizeable occurence of it anywhere."

Baloney. I do it all the time. Write it on Windows, run it on Windows, run it on AIX, run it on Linux...you should try it sometime.

Wednesday, April 18, 2007 10:02 PM by RyanK

# What is .NET?

My colleague Doug Turnure takes a stab at answering this FAQ. Worthwhile reading.

Wednesday, April 18, 2007 11:26 PM by .net DEvHammer

# re: What is the .NET Framework?

I started working in/learing .Net in early 2002.. And I still enjoy working in it. As far as I remember, in old days .NET was also intended to be platform independant, then at some point of time thats changed to device independant. Yes as you said languague neutral was the major buzz word, but people use only one languague.

Very good ariticle, thanks for reminding those old days :)

Thursday, April 19, 2007 5:49 AM by Rujith Anand

# re: What is the .NET Framework?

I don't usually nitpick, but am just curious: Is it the FCL or the BCL?

Thursday, April 19, 2007 6:03 AM by yuvipanda

# FCL or BCL

FCL is Framework Class Libraries; BCL is Base Class Libraries; I've seen both terms used publically, and I debated which one to use in this (almost inserted BCL as a parenthetical alternative). I think both are fine to use...

Thursday, April 19, 2007 8:18 AM by dougturn

# Write Once, Run Anywhere

RyanK - perhaps your experience is different. I often deal with larger companies, and I cannot think of a single one of them that is even trying to pull this off anymore.

I used the term *sizeable* intentionally. Single developer scenarios can make this work if they play by the rules, as it sounds like you are doing. I'm referring to large systems. You rarely find sizeable solutions written once, and deployable to multiple platforms.

But, if you are doing this successfully, kudos. As I said in the blog, I think the concept is fascinating. It's just that the nuances of large deployment severely inhibit this.

Thursday, April 19, 2007 8:28 AM by dougturn

# .NET? What is that?

This is not a question I hear often from folks who develop on the Microsoft platform. (.NET is often

Thursday, April 19, 2007 2:23 PM by JrzyShr Dev Guy

# re: What is the .NET Framework?

Doug,

Thanks for the article. But why is code being compiled to IL or Javabyte codes and then JITted at runtime(.net) or intepreted at runtime(java)into machine instructions?

Why not just compile directly to machine instructions? One explanation says that this is to better take advantage of the state of the machine during the JIT compilation.

Please explain.

Thanks.

Thursday, April 19, 2007 3:03 PM by Andy

# re: What is the .NET Framework?

I still dont know what Its For

Thursday, April 19, 2007 5:06 PM by sam

# Why JIT

Andy - Jitting serves several purposes. There is the general concept that you abstract the platform itself (IA-32 or whatever). But probably the biggest benefit is what you mentioned in your explanation.

Code that is pre-compiled is not flexible enough (without significant work) to recognize how many chips are in the box, and compile accordingly. You can suggest this kind of compiler optimization when you compile traditionally, but then your code is hardwired with that optimization. Another thing to consider is that JIT-ted code won't suffer from address collisions in DLL basing.

With traditional 1-stage compilation, DLLs have a base address where they are intended to go in memory. If the location is already taken by another piece of code, a Re-base table records the new location and requires additional dereferencing to find the code. With JIT-ted code, the native instructions will always be placed in an available spot.

The bottom line around this advantage is simple. If I know the exact state of my deployment at runtime, I can better tune the native instructions for that condition. It compiles with much more insight of the runtime condition, than merely flipping some compiler switches on the build box. Does that make sense?

Thursday, April 19, 2007 6:32 PM by dougturn

# What it is for

Sam - what it is for: it is for more productive solution building. By dropping a managing layer over the platform, developers don't lose as much time chasing allocation/freeing of memory and such.

Also, the common language aspect of the runtime means that you can more easily communicate between languages, because they are based off the same type system. Even in COM and CORBA, there was a third type system in place (IDL), and we translated from VB to IDL to C++, or in many cases, VB to IDL right back to VB.

In a nutshell, it's just a more efficient way to build software solutions.

Thursday, April 19, 2007 6:36 PM by dougturn

# re: What is the .NET Framework?

dougturn said: "RyanK - perhaps your experience is different. I often deal with larger companies, and I cannot think of a single one of them that is even trying to pull this off anymore.

I used the term *sizeable* intentionally. Single developer scenarios can make this work if they play by the rules, as it sounds like you are doing. I'm referring to large systems. You rarely find sizeable solutions written once, and deployable to multiple platforms."

Doug, I work at the one of the largest banks in the world. One of the applications my team works on sits on top of the Tivoli framework and allows our users to distribute packages to over 250,000 managed endpoints across the globe, all from a single UI. When MS releases a security patch, our senior management set a goal to patch 98% of Windows systems in 4 days (about 200,000 machines) and we've never missed that target. It's about as "sizable" and critical as systems come.

Here's the simple point that is being lost on you:

The vast majority of Java developers write their code on Windows workstations. They unit test their code on Windows workstations. They often have a local instance of the application deployed on their workstations and pointing to a development environment.

And when we deploy the SAME code to the dev, cert and prod servers, many of them are NOT Windows. We have a centralized controller that runs on Linux. We have agent services that run on the Tivoli TMRs, which are AIX. We have apps triggered by the login policies that run on the gateways, which are all Windows.

I'm not sure I understand why you would think this is a big deal. As long as you don't write very specialized Java code that is OS specific, which happens so infrequently it's not even worth mentioning, it's completely seamless.

I guess we Java developers have become so used to writing once, deploying anywhere, we don't even think about it anymore. ;-)

Saturday, April 21, 2007 10:54 AM by RyanK

# re: What is the .NET Framework?

BCL vs FCL: Hey, if you people can't figure this out, think of mere mortals like us! While it's of no practical value to most people, why don't you ask the powers that be wether it's FCL or BCL or wether they're actually two differnt things than just one thing?

Sunday, April 22, 2007 2:15 PM by yuvipanda

# re: What is the .NET Framework?

yuvipanda - I asked the *powers that be*, and we have consensus. We use both terms :-)

Seriously, it seems as though internally we use BCL, while the docs use FCL.

And there are numerous books and smart people out there that use both terms.

Tuesday, April 24, 2007 8:00 AM by dougturn

# re: What is the .NET Framework?

Dog and Canis? :D

But seriously, you mean to say that when you speak you say BCL, but while you write you write FCL?

And, the BCL team blog? C'mon guys, there's got to be an explanation. Maybe a leftover from the Microsoft Common Object Runtime Library days....

[Feels dizzy again]

Tuesday, April 24, 2007 8:09 AM by yuvipanda

# re: What is the .NET Framework?

Hi RyanK,

OK, I see that you have a utility app that you are building on Windows and deploying elsewhere. I can appreciate the fact that it has a lot of endpoints.

I hope you won't take offense to the comparison, but we have an app that is deployed in over 400 million places now, stores logging info for tens of thousands of apps, and is the preferred IDE for many very smart developers. That app is Notepad. It has amazing reach and utility, and the user base is one of the largest in the world, but I don't see it as an enterprise app.

My point was not whether you could build an app that is cross platform. Actually, my point wasn't about Java at all, and I hope you saw my primary point, and not just the one part comparing it with Java.

I just wanted to let people know the basic parts of the .NET Framework. And that the Java world and .NET world are not that far apart.

I don't think it is a big deal. I almost didn't make the comparison because I figured someone who did write-once apps would try to say they could build mammoth systems that were portable.

I appreciate your informed responses, and it does sound like you are building a patching application that uses the write-once capability of the VM.

Tuesday, April 24, 2007 8:23 AM by dougturn

# re: What is the .NET Framework?

BCL vs. FCL - actually, this has spawned some interesting internal conversation...

One of my evangelist buddies Kirk Evans (http://blogs.msdn.com/kaevans/) who I freely admit to being both smarter and having more hair than me....

mentioned that the BCL is the generic name on the libraries as part of the C# submission to ECMA (meaning a generic name for libraries used against .NET runtimes in general) whereas FCL is the proprietary name for our implementation of them on the Windows .NET Framework.

Tuesday, April 24, 2007 8:33 AM by dougturn

# re: What is the .NET Framework?

Got that. Thanks! I guess like HTML's the standard while MSHTML is the implementation.

Thanks for clearing this up! So, Mono also has the BCL, but only Microsoft .NET has the FCL.

Tuesday, April 24, 2007 8:40 AM by yuvipanda

# re: What is the .NET Framework?

To be more precise...

The BCL is the Base Common Library, referred to in the CLI standard (http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-335.pdf).  

<quote>The Base Class Library is part of the Kernel Profile. It is a simple runtime library for modern programming languages. It serves as the Standard for the runtime library for the language C# as well as one of the CLI Standard Libraries. It provides types to represent the built-in data types of the CLI, simple file access, custom attributes, security attributes, string manipulation, formatting, streams, collections, among other things.</quote>

The BCL is the stuff you find in mscorlib.dll, which includes stuff like System.String, all of which was standardized through ECMA.  

The FCL is the Framework Class Library, which sits on top of the BCL and adds additional functionality that is not part of the ECMA standard.  This includes technologies like ADO.NET, ASP.NET, Windows Forms, Windows Communication Foundation, Windows Presentation Foundation, Windows Workflow Foundation, and Windows CardSpace.

Tuesday, April 24, 2007 1:38 PM by Kirk Allen Evans

# re: What is the .NET Framework?

Ah, I grokked that now! Thanks Doug, Thanks Kirk! You people rock....

Tuesday, April 24, 2007 10:49 PM by yuvipanda
New Comments to this post are disabled
 
Page view tracker