Skip to main content

.Net Framework

.Net Framework: Is an environment that facilitates Object Oriented Programming Model for multiple languages. It wraps OS and insulates Software Development from many OS specific tasks such as file handling, memory allocation & management.

It has two main components CLR and .Net Class Libraries.

CLR: Common Language Runtime. It is heart of .Net Framework. Core of CLR is it’s execution engine which loads, executes and manages the managed code that has been compiled to Intermediate Language (MSIL).

CTS: Common Type System. It defines the common set of types that can be used in different languages regardless of OS and hardware. Each language is free to provide/define it’s own syntaxes.

CTS defines that how types are declared, used and managed in runtime. Most important addition is runtime support for cross language integration. It does:

  • Establishes a Framework
  • Provides Object Oriented Programming Model
  • Defines set of rules that language must follow to be CLR compliant.

CLS: Common Language Specification. It is Subset of CTS which is all .Net languages are expected to implement. Idea behind the CLS is Cross Language Integration.

Managed Code: The .Net framework provides several core run-time services to the programs that run within it. For example exception handling and security. For these services to work the code must provide a minimum level of information to runtime. Such code is called Managed Code.

Managed Data: This is data for which memory management is done by .Net runtime’s garbage collector this includes tasks for allocation de-allocation. We can call garbage collector to collect un-referenced data by executing System.GC.Collect()

What is an Assembly?: are fundamental building blocks of .Net Framework. They contains the type and resources that are useful to make an application. Assemblies enables code reuse, version control, security and deployment. An assembly consist of: Manifest, Type Metadata, MSIL and resource file.

Assemblies are Private and Shared. Private are used for a single application and installed in application’s install directory or its sub-directory. Shared assembly is one that can be referenced by multiple application and resides in GAC(local cache for assemblies managed by .Net Framework).

gacutil /i myDll.dll can see and %windir%\assembly

Metadata and Menifest: Menifest describes the assembly itself. Assembly name, version, culture, strong name, list of files, type reference and reference assembly. While Metadata describes contents within the assembly like classes, namespaces, interfaces, scope, properties, methods and their parameters etc.

Application Domain: is a virtual process that serves to isolate an application. All object created within the same application scope are created within same application domain.

Garbage Collection: is Automatic Memory Manager for .Net Framework. It manages the memory allocated to .Net Framework.

When a variable is defined it gets a space in memory (stack) and when an object is created memory for the object is allocated in heap. When an object is assigned to a variable it increments the reference counts for the object and when program control comes out of the function the scope of variable gets ended Or NULL is assigned to variable it decrements the reference count of object by 1. When reference count of one object becomes zero GC acts call destructor of object and then releases the memory acquired by the object.

Can .Net Components can be used from a COM? Yes, can be used. But There are few restrictions such as COM needs an object to be created. So static methods, parameterized constructor can not be used from COM. These are used by COM using a COM Callable Wrapper (CCW).

TlbImp.exe and TlbExp.exe

How does .NET Remoting work? It involves sending messages along channels. Two of the standard channels are HTTP and TCP. TCP is for LANs only and HTTP can be used on LANs or WANs (internet). TCP uses binary serialization and HTTP uses SOAP (.Net Runtime Serialization SOAP Formatter).

There are 3 styles of remote access:

SingleCall: Each incoming request is handled by new instance.

Singleton: All requests are served by single server object.

Client-Activated Object: This is old state-full DCOM model. Where client receives reference to the remote object and keep until it finished with it.

Versioning: MajorVersion.MinorVersion.BuildNumber.Revision

DLL-HELL: situations where we have to put same name Dlls in single directory where are Dlls are of different versions.

Boxing and Un-Boxing: Implicit(automatic) conversion of value type to reference type is known as Boxing And Explicit (manual) conversion of Reference type to value type is said to be Un-boxing. (conversion of Integer variable to object type)

Comments

Popular posts from this blog

Top Open Source Web-Based Project Management Software

This is an user contributed article. Project management software is not just for managing software based project. It can be used for variety of other tasks too. The web-based software must provide tools for planning, organizing and managing resources to achieve project goals and objectives. A web-based project management software can be accessed through an intranet or WAN / LAN using a web browser. You don't have to install any other software on the system. The software can be easy of use with access control features (multi-user). I use project management software for all of our projects (for e.g. building a new cluster farm) for issue / bug-tracking, calender, gantt charts, email notification and much more. Obviously I'm not the only user, the following open source software is used by some of the biggest research organizations and companies world wild. For example, NASA's Jet Propulsion Laboratory uses track software or open source project such as lighttpd / phpbb use re

Google products for your Nokia phone

Stay connected with Gmail, Search, Maps and other Google products. Check products are available for your Nokia phone Featured Free Products Search - Find the information you need quickly and easily Maps - Locate nearby businesses and get driving directions Gmail - Stay connected with Gmail on the go YouTube - Watch videos from anywhere Sync - Synchronize your contacts with Google

My organization went through the approval process of supporting the .NET Framework 2.0 in production. Do we need to go through the same process all...

My organization went through the approval process of supporting the .NET Framework 2.0 in production. Do we need to go through the same process all over again for the .NET Framework 3.0? Do I need to do any application compatibility testing for my .NET Framework 2.0 applications? Because the .NET Framework 3.0 only adds new components to the .NET Framework 2.0 without changing any of the components released in the .NET Framework 2.0, the applications you've built on the .NET Framework 2.0 will not be affected. You don’t need to do any additional testing for your .NET Framework 2.0 applications when you install the .NET Framework 3.0.