tags:

views:

92

answers:

2

what is .net? the framework and clr

+3  A: 

.NET is Microsoft's marketing name for a number of new technologies. Because it's such a wide ranging collection, it's hard to define exactly what it is.

CLR is the Common Language Runtime, which is a bytecode language and interoperability rules that make it easier to build languages the interact well with one another. For example, before .NET making Visual Basic call C functions was awkward and error prone. In .NET, Visual Basic can call C# seamlessly.

Greg Hewgill
"it's hard to define exactly what it is" Indeed, and that makes this a pretty good question actually.
Henk Holterman
It's not that hard at all really. See AZ's answer for the usual definition.
Ash
@Greg, calling *C* (not C#) functions in any .NET language is still awkward and error prone (eg. pinvoke). Your example is not correct as you compare calling C functions from VB to calling C# functions in VB.NET. Completely different thing.
Ash
@Ash: Yes, well my example wasn't perfect. The C interface problem you mention is more an issue that C simply isn't a CLR language than any failing of the .NET platform. However, before .NET, C was the "de facto" systems language for Windows. After .NET, the systems language is arguably C#.
Greg Hewgill
@Greg, No problems, just wanted to add the comment as it can be confusing.
Ash
+3  A: 

.NET is an application platform composed of 3 parts:

  • the CLR - a runtime able to execute CIL(common intermediate language) code. It is composed of a JIT (just in time compiler) that complies intermediate code into native code on the fly as the application executes, a garbage collector responsible for memory management, and a loader responsible for loading assemblies, classes etc. (putting all code together to be executed by the JIT)
  • the .NET library - an extensive library that provides basic system functionality as well as advanced implementations to some common used functionality (XML processing, database access, GUI programming, Web infrastructure etc.)
  • a set of compilers that translate code written in the programing language of your choice (VB, C#, C++, F#, Python, Ruby etc.) to CIL code and package that into an assembly or exe
AZ
Good answer. One point, the .NET library is more commonly called the "Base Class Library" or "Framework Class Library".
Ash
And CIL is more commonly known as MSIL.
Henk Holterman
it was named MSIL (Microsoft Intermediate Language) in the early days on .NET. After they standardized the runtime spec they had to change the name (now it's an international standard, not a Microsoft proprietary thing).
AZ