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

DotNetNuke Overview

DotNetNuke is the leading Web Content Management Platform for Microsoft .NET. DotNetNuke can be used as a web content management system (CMS) for simple websites or as a powerful application development framework which enables businesses to quickly build and deploy feature-rich, interactive websites and applications in Microsoft .NET. An intuitive, menu-driven interface allows non-technical users to easily create new sites or extend the functionality and features of their existing web site when used as a web CMS. An open API and the availability of over 6,000 third-party add-on modules available through Snowcovered.com allow web development professionals to create complex web sites for demanding applications. Installing new modules or skins is quick and easy, allowing users to deploy new functionality on their web sites in just minutes. DotNetNuke is the world’s most widely adopted framework for building web solutions on Microsoft Windows Server. DotNetNuke powers o...