Monday, December 29, 2008

Assemby Thirty Points

Dev Palmistry

1. The complied file with IL code is an Assemby.

2. Assemblies are self-descrbing installation units , consisting of one or more files.

What is the meaning of self-desctibing means ?
Ans: Self-describing means have metadeta.

(MetaData : Data about data)

A. Assembly include metadeta that descibes the Assemblies.

3. Assembies are found in bin directry and GAC (Global Cache Assembly)

a. Application Directroy- bin- It Containts the pre-complied pages and wev services class . You can directly use these assemblies in ur applications.

4. Each Assembly has a version number.

5. Assembly is basic building block of .Net application.

6. Assembly may contain the following Contains :

. Assembly Menifest.
.Source Code - Complied code Il
Type Meta Data
Resources - icons, images, text strings and other resources.

7. Example of Assembly - Dll file contains the application code , the .aspx file, .ascx user controls
.gif , .bmp, .ico files and other files like resource file.

8. An Assembly contains the MISL code , which the Common Language Runtime (CLR) executes , and the type metadata.

9 When the Comman Language Runtime (CLR) loades and assembly , it first reads the manifist
to get the information regarding Assembly.

10 .Component are pre-complied set of classes that have been developed in the form of DLL fliles and can then be included within our projects. This is also known as an Assembly.

11. Asp.Net lookes for class files in the bin directry.

12. Assembly means complied code file.

13 Assemblies are related to CLR

14. Assemblies are belongs to the .Net Framework.

15. Assembly is a portable executabls file that contains a complied portion of code.

16 .Assembly is especially designed for deployment purpose such as the *.JAR files that are used in Java context.

17 . When an application is Developed against an assembly , it depends on it, therefore it needs to cocate it and explote it s services when runing. First of all the Comman Language Runtime (CLR) ,which is responsible for execting the application program , varifies if the assiembly is already referenced and used , if this is not the case , it search it in the application bin directory,
after that it is checked in the Global Cache Assembly (GAC) , in a final step , the CLR checks information about the targeted assembly in the configuration file . In this step the code location in the configuration information about the target assembly , when the assembly is not found , an error massage occure , Add a message like this can be found in the error list :

Error : The type or namespace name Assembly could not be found (are you missing a using directive or assemby reference).

18. Each Assembly has a Version no. All the types and resources in an Assembly share the same Version no. to take easy for application to refer to the correct version of the file and avoid problem of "DLL Hell".

19. CLR is the place where the .Net application code gets complied and complied code is as Assemblies.

20 . Assemblies are made of two parts :

Manifeast
Module

Manifest : Mnaifest , contains information about what is containd within the assembly and
Module : modules, internals files of IL code which are ready to run (execurte)

21 . Assembly is complied collection code. Complied versioned collection of code.

22. Assembly is a self -describing collection of code , resources and metadata.

23. Assembly take form of a dyanamic link library (.DLL) file or executetable program file (.EXE) .

24 . An Assembly Includes :

# Information for each public class or type used in the assembly - information includes class or type names, the classes from which an individual class is derived, etc.

# Information on all public methods in the each class , like , the name method and return values (if any).

# Information on every public parameter for each method like parameter's name and type.

# Information on Public enumerations including name and values .

# Information on the assembly version (each assembly has specific version number)

# Intermediate Language (IL) code to execute (to run).

# A list of types exposed by the assembly and list of other assemblies required by other assembly.

25. Whem programming , we dont need to directly deal with assemblies as the CLR and the .Net framework take care of that behind the scencs.

26. Assembly files is visible in the Solution Explorer Window of the project.

27. There are two types of Assemblies :

Private
Shared

28. Feature of Assemblies :

# Assemblies are self- describing.

# Assemblies can be loaded side -by -side.

# Installation can be as easy as copying the files that belongs to an assembly . An Xcopy is enough.

# Application isolation is ensured using application domain.

# Version Dependencies are recorded inside an assembly menifest.

# An assembly is the .Net term for deploying and configuration unit.

What is the Side-by Side feature ?

Ans: Window 2000 introduce the side -by - feature , which allows the installtionof the Dll in the application. With side-by side , you can instal a different version of an already instaled shared Dll to the directry of the application.


29. Assmby is loaded into an AppDomain.

AppDomain : Application Domain (AppDomain) allows you to have One Win 32 process that can be diveded into seperate areas of execution that are protected from other.
Suppoese that yor have a task that needs to be done , but you want to make sure that if that task fails and throw unhandled exception , the entire pricess does not shut down.
That is exactly what application domain do for you . This allows you to create sepereate execution contaxt inside the same Win32 process.

The .Net Runtime (LCR) enforces AppDomain isolation by keepingcontrol over the use of memory.All memory in AppDomain is managed by the .Net Runtime (LCR) , so the runtime ensure that AppDomains do not access each others memory.

.Net applications work within an application domain.

An AppDomain can be seen as a subprocess within a process.

With .Net , the AppDomain is the new safty boundry inside a process , because the MSIL code is type-safe and varifable.

30. You can unload assemblies only terminating application domain.



Note: For the biginers it is confusing that Assembly is compled code or executed code. So let me clear this confusition That Assembly is complied code. CLR load assembly and jit execute this assembly.

3 comments:

daanish said...

"the write"...might not be...
my cup-of-tea....
but my regards to a self confident and vivacious person like you.

HAPPY NEW YEAR 2009.

---MUFLIS---

Unknown said...

good one..keep writing.....currently on which technology you are working?

happy new year

Arvind Gaurav said...

GOOD GOOD CREATION DEAR...
HAPPY NEW YEAR