Still in a Cave? The following is the result of touching up to a mail I once wrote to a friend about .Net. I later started thinking that I might as well put this up as my pet description about .Net.
"i am rather hooked onto .net and you would be too if you saw more of it, yes admittedly most of the descriptions out there are rather large - partly because .net is rather large initiative, not just one aspect. and unfortunately most descriptions are like the blind men going to see the elephant. let me try, i might be (surely) a little inclined to the directions of my interest, but still :
.Net is a single name that describes a collections of components, that fit together to give what is going to be the future of the native runtime and programming environment under windows - with things like c/win-api, cpp/mfc,vb etc, to be depreciated.
'.Net' usually refers to a framework that has a runtime named the Common Language Runtime(CLR), a collection of compilers under the runtime, a heirarchial object oriented language agnostic API, a set of network abstraction stubs as the major components.
The CLR runs code called IL (Intermediate Language) which is a processor independant asm. The main components of the runtime are a demand-JIT, that compiles sections of an app's code to the native opcode(not interpreted) when those particular sectoins are needed to be run, and a blazing fast generation-based GC. The .Net GC has an allocation efficiency of O(1), faster than the C runtime, and an expected performance hit comparable to that of a page fault when it incurs a generation 0 sweep. Native assembly coding is possible at the cost of portability under the framework.
The compilers compile to IL binary. Backends/Back engines are possible (and available) to standard compilers that can make them generate IL (instead of say asm). About 18+ languages are already available under the framework. All languages under the framework use the same runtime and API and mixed language coding is possible. A component of the CLR called the Common Type System takes care any type convertion between languages. Programs can run in managed mode (under the GC) or as unsafe/unmanaged (free from the GC, this code can have traditional pointers and direct memory accesses) or mixed mode (where managed code undeer the CLR co-exists with the unsafe code).Sections of an Application can be given different security policy settings. Security is role based - user/adminstartors can defines roles and what privileges they have. Programmatically security can applied to a single line of code even - the CLR ensures that the code does not violate the security policy at runtime.
In .Net a running process is a collection of (1 or more) AppDomains. An AppDomain is like a process in itself, under the C runtime - with its own thread(s) and local memory. (Oh man, this is getting really big ... I wanted to keep this short). A process can load or unload AppDomains during runtime. It can runtime compile text/and intermediate IL and use the generated code (physical or in memory) as part of any of its AppDomains. Compilers are part of the API to enable code to runtime recompile itself or for a a running system to enhance itself without being take down.
Communication between AppDomains is the basis of IPC in .Net. All AppDomains of a process need not reside on the same machine - the communication between between them can be through any of available protocol stubs or cutom written ones - and AppDomains can pass objects between each other by value or by referrence using any available serializer - thus allowing for transparent distributed or p2p architectures.Multiple versions of the CLR can coexist on a machine. Application can host the CLR and can thus be a native code application that uses the CLR for some purposes. ASP.Net is a CLR host that uses plumbing to inject values into JIT compiled code that runs on the server. The coming versionof SQL server (Yukon)will have the CLR hosted to exceute stored procedures in compiled code - say as c++ or c#.
More :
- the standards for all interfaces are published under ecma
- gc algos are published.
- source for the clr, c#, jscript compilers are available as a common portable source code for bsd, mac and windows, code-named rotor.
- the first win .net server is out - 64 bit os for multiprocessor and uni processor machines.
- almost coming win applications from ms use the .net runtime, that is why the tagging .net with everything.
- its fast, ms unofficially is expecting the runtime to be faster that the c runtime for smartly written code, it leaves any other runtime way behind.
- description of the functioning of the clr, gc, il, dissasemblers etc are published.
- the framework development (minus visual studio) command line tools are available as a free download.
- the runtime is free.
- the fsf is trying to copy it - www.dotgnu.org
- the open source implementation is far ahead - www.go-mono.com
- mac version is done by ms
- bsd (therfore unixes) has the ms source release version - Shared Source Common Language Infrastructure SSCLI - pet named Rotor at the time of this writing.
(I am going to stop now, thats a lot, sorry if it ot boring.) Strangley it is still super terse, as I could go on and on about each point.
In some senses it is a superset of programming environments available today, with the exception of (yours truly) P9, they dont have an OS like that to be hosting .net. Theres lots more to say. if i did get your interest, you can check out some of the links for more stuff.
I would like to add to this description by annotating this writeup and expanding on many of the terse and cryptic points it makes and compare them with existsing technology to highlight differences.A non-MS desc of .Net
http://www.arstechnica.com/paedia/n/net/net-1.html
Some of the interesting stuff I read recently. Dont kill
christmas with this, maybe sometime you can come back
and take a look at this mail. meanwhile i am considering
doing my own tunneling ... :) or atleast an external
downloader from where i can take it through http.
Remoting
cscorn/internet/remoting_chat_server.asp (sample of an RMI port, cleaned up)
msdn/library/techart/hawkremoting.htm (ms artcile on remoting)
cproj/dotnet/remotespy.asp (watching the remoting mechanism)
msdn/msdnmag/issues/02/10/netremoting/ (distributed app devel - remoting)
Reflection
cproj/csharp/livecodedotnet.asp (amusing one, do look)
msdn/msdnmag/issues/02/10/clrtypes/ (i havent read this one yet)
Garbage Collection : 2 articles that describe the .Net GC algorithm -readable
msdn/msdnmag/issues/1100/GCI/default.aspx
msdn/msdnmag/issues/1200/GCI2/default.aspx
PE file format : 2 artciles - overview of PE file format and lots of things on the way
msdn/msdnmag/issues/02/02/PE/default.aspx
msdn/msdnmag/issues/02/03/PE2/pe2.asp
Rotor Src Desc : an article that desc the code in the rotor release, some interesting things here
msdn/msdnmag/issues/02/07/SharedSourceCLI/default.aspx
abbreviations:
msdn - msdn.microsoft.com
cscorn - www.c-sharpcorner.com
cproj - www.codeproject.com "