C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Assemblies


Posted Date: 08 Jun 2006    Resource Type: Articles    Category: .NET Framework
Author: HimaBindu VeeramachaneniMember Level: Diamond    
Rating: Points: 10



Introduction


Assembly is a small unit of Code for Deployment
The basic building block for Dotnet Frame Work is an Assembly
Assembly can be an exe or dll file
But the difference between dll and exe is exe is an executable file
Dll is a reusable component.
Exe is a Stand alone application that can run on its own
Dll is used in other applications
Assembly is Collection of Data Types, Namespaces and Resources Information
Namespace is a logical design-time naming convenience, whereas an assembly establishes the name scope for types at run time.

The Four Main Parts


The main Parts of the Assembly are
Manifest
Type Meta Data
MSIL Code
Resources

Manifest


It will describe the assembly it will contain all the files information required for the assembly. These files includes all the other assemblies required for the application
It will be prepared by the complier by providing set of built in libraries and custom libraries provided with reference. This is required for the runtime to load the files at the time of execution Public key with Version number are stored here

Meta Data


It will provide information about all the user defined types available with assembly
Includes
Namespace name
Class names
Interface names
Method names
This Meta data is required for the user of the assembly to access methods and classes

IL Code


The source code in Dotnet is Compiled into IL code with the help of JIT complier in CLR .This code is responsible for Language independency, Architecture independency, Plat form independency and Security
VS Command Prompt c :\> ildasm app.exe
File-->new-->open any dll from your existing web application
Double Click on manifest to examine manifest
You will find public key token with version number that is generated for Assembly
The expanded tree view of name spaces and classes methods is called Meta data
Try to examine Meta data MSIL/IL code that is generated for each method
MSIL IL code is in Assembly language it ‘s understands by only JIT Complier with the help of jitters inside it.
Double Click on Any Method Source code Converted to IL Code
// Code size 12 (0xc)
.maxstack 2
IL_0000: ldarg.0
IL_0001: callvirt instance string Infragistics.WebUI.CalcEngine.RefBase::get_NormalizedAbsoluteName()
IL_0006: callvirt instance int32 [mscorlib]System.String::GetHashCode()
IL_000b: ret
} // end of method RefBase::GetHashCode
This is the MSIL code starts with IL
If we can write code in IL code and understand it we can develop our own complier in the corresponding language
There are around 30 third party language compliers available like COBOL.net,C#.net etc

Resources



If assembly using any gif/image files that information is stored in resource section of the assembly

Note: To Examine the Components of the Assembly use Intermediate Language Disassembler (ILDASM) Go to
VS Command Prompt and type ILDASM
File -->Open the Dll
We can see the Manifest Meta Data ,IL Code Public key version number
This information can be helpful in determining whether a file is an assembly or part of an assembly, and whether the file has references to other modules or assemblies.

Advantages


1.No dll Hell
2.Plat Form independency
3.Inheritance is supported

Click here to Contiue<\/a>




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: .NET Security -2
Previous Resource: Types of Assemblies , Creating a Private Assembly ,Probing
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use