Connecting Tech Pros Worldwide Help | Site Map

What is .NET? Why do I need the Framework?

  #1  
Old August 1st, 2007, 05:07 PM
TRScheel's Avatar
Expert
 
Join Date: Apr 2007
Location: Iowa
Posts: 624
I have seen this question appear many times in the forums, so I am writing this to hopefully help those who have this question. First, a history lesson!

Your earlier languages compiled to assembly language. Typically for MS C++, this was the Pentium 4. Many processors could read this language, if not for a decrease in performance.

With .NET this changed. Now all .NET languages compile* into what was known as MSIL (Microsoft Intermediate Language) but is now known as CIL (Common Intermediate Language). Expect to hear either acronym, as they both mean the same thing. Whether its C#, VB .Net, C++ CLI, or even Delphi, they all compile to this language. What is this language? Its a pseudo assembly language.

This pseudo assembly language is unreadable by CPU's... so the .NET framework comes with another tool. The JIT (Just in Time) compiler. This is automatically ran when a program written in .NET is ran. It compiles ONLY the portion of the program you are using, hence, you could technically never compile portions of a program. Advantages? Disadvantages? Well, without going into too much detail, it boils down to this: It compiles to assembly language for the user's specific CPU, creating an increase in run time speed, although there is extra overhead to compile at runtime.

The other staple of .NET is the GC (Garbage Collection). Professed to be the end of memory leaks, the GC runs in the background constantly monitoring your program and cleaning up unused memory. How does this work? Well, it watches when and if you ever reference a variable, and when it is no longer referenced it releases it. While it does clean up a lot of the variables, there are still some specific instances that the programmer will have to clean up after themselves, but these are far fewer than ealier languages. This also adds to the overhead.

The final note I will touch upon with .NET is the libraries it incorporates. Many functions are already included with .NET and many programmers will find all they need within there. Very few functions have to be hard coded with WIM or other externals.

Many state that .NET programs run slower than their C++ counterparts and many state the opposite. Their arguement stems from the GC and JIT portions of .NET. Where as the JIT does compile a faster running assembly code, the program has more running in the background to keep it going. Do the benefits outweigh the results? Thats a question for another day, but know that the answer probably lies in 'depends.' It probably depends on the program and what it is doing.



*NGEN --
The Native Image Generator (NGEN) can create versions of .NET precompiled to Assembly Language, and if the processor can use it, it will over the JIT version of it. This still incorporates the GC though, but it is faster than the JIT for the specific processors it is compiled to.



  #2  
Old August 5th, 2007, 06:51 PM
Newbie
 
Join Date: Aug 2007
Posts: 2

re: What is .NET? Why do I need the Framework?


good one for kids ..
  #3  
Old August 6th, 2007, 01:39 PM
TRScheel's Avatar
Expert
 
Join Date: Apr 2007
Location: Iowa
Posts: 624

re: What is .NET? Why do I need the Framework?


Quote:
Originally Posted by shival329
good one for kids ..
Would you to care to elaborate?
  #4  
Old August 7th, 2007, 11:20 PM
Newbie
 
Join Date: Aug 2007
Posts: 4

re: What is .NET? Why do I need the Framework?


Thanks. Your explanation was very helpful for someone at my level, a newbie.

I believe that your intent was to be a generalized overview of .NET and in my opinion, relative to my level of experience, you hit the mark.

S
  #5  
Old September 21st, 2007, 03:22 PM
Newbie
 
Join Date: Sep 2006
Posts: 18

re: What is .NET? Why do I need the Framework?


hi TRIScheel...

It was very good article. It really matters to newbie like us..... ofcourse i dont see the reason why intelligent ppl (shival329 ) are wandering around in this forum since they know everything...

Once again...nice topic...
Thanks

mady
  #6  
Old September 27th, 2007, 02:12 PM
Newbie
 
Join Date: Sep 2007
Posts: 2

re: What is .NET? Why do I need the Framework?


Hi,
This is very good information. keep write like this presentation..

some one will get an idea on Frame work
  #7  
Old October 9th, 2007, 07:12 PM
Newbie
 
Join Date: Oct 2007
Posts: 4

re: What is .NET? Why do I need the Framework?


awesome thing man very short and sweet too.
  #8  
Old October 16th, 2007, 09:01 PM
Newbie
 
Join Date: Oct 2007
Posts: 27

re: What is .NET? Why do I need the Framework?


Thanks,

Now I can see the big picture.
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is .Net? SailFL answers 13 November 22nd, 2005 10:55 PM
Is .NET going to be dropped by Microsoft? Rob R. Ainscough answers 41 November 21st, 2005 06:37 AM
What is .Net? SailFL answers 13 September 1st, 2005 09:55 AM
Do I need Dreamweaver or is NET Framework sufficient for good desi Parrot answers 4 July 22nd, 2005 01:47 AM
Is .NET good for high volume numerical computing? YeeCN answers 4 July 21st, 2005 02:04 PM