save up to 40%

Types of Assemblies

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

Types of Assemblies

Rating:

An assembly can exist in various forms depending on how they are used in a .NET Framework. An assembly can be classified into the following manner:

  • Single-file and Multi-file Assemblies: A single-file assembly can consist of a single .DLL or .EXE file containing application code, embedded resources, and the assembly's assembly manifest. On the other hand, a multi-file assembly can have multiple files in an assembly. Out of these multiple files, one file should be an .EXE or a .DLL file. The assembly manifest can be attached to any of the assembly files, or a separate file can be created to store the assembly manifest. However, multi-file assemblies are not used in ASP .NET.


  • Static and Dynamic Assemblies: Static assemblies are those that generate files responsible for creating an assembly when a program is compiled. These files are stored on a disk for later use. Dynamic assemblies are those that create assemblies during a program execution. ASP .NET extensively supports dynamic assemblies. During the execution of an .aspx page, the ASP .NET process generates the related assemblies at runtime and saves them on a disk. Dynamic assemblies can be created through the classes available in the System.Reflection.Emit namespace.


  • Private and Shared Assemblies: Private assemblies are those that are deployed using only a single application. These assemblies are deployed in the directory or sub-directory on the same computer where the related application is installed. There is no strict security policy and version requirement while installing a private assembly in the application's directory. On the other hand, shared assemblies are those that are deployed using multiple applications in shared mode. All the shared assemblies are deployed on the same computer and are installed in a specific area known as the Global Assembly Cache (GAC).

    The Global Assembly Cache is a machine-wide cache that stores assemblies to be shared amongst several applications residing on the same computer. In the Global Assembly Cache, each assembly is identified by a strong name that consists of an assembly's name, a version number, a culture, a public key, and a digital signature. The common language runtime enforces security policies and version requirements while installing shared assemblies in the Global Assembly Cache. The GAC has the capability to maintain multiple copies of an assembly with a same name but different versions.


  • Satellite or Resource-only Assemblies: The assemblies that contain culture-neutral resources are referred to as satellite assemblies. These assemblies are used to deploy language-specific resources for an application. The application that uses language-specific resources has a separate identification for each language. The satellite assemblies are installed in a language-specific sub-directory for each language. Therefore, satellite assemblies work in a side-by-side execution.

    Satellite assemblies do not contain any executable code, but contain only such resources that are culture-neutral. The Assembly Linker (Al.exe) tool is used to compile .resources files into satellite assemblies. So, the Al.exe command creates a satellite assembly for an application from the .resources file. The .NET Framework provides a class known as System.Resources.ResourceManager. The ResourceManager class first of all reads the culture-specific information from a .resource file, the name of the satellite assembly, and the name of the sub-directory, and then loads the satellite assembly to obtain the localized resource.


Rating:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.