What Is It?
The 'Assembly' is a new concept that the .NET framework introduces to make your journey in programming more easier. The .NET framework introduces assemblies as the main building blocks of your application. An application can contains one or more assemblies. An assembly can be formed in one or more files. This all depends on your programming needs.
An assembly can consist of the following four elements:
Your code, compiled into MS intermediate language (MISL). This code file can be either an EXE file or a DLL file.
The assembly manifest, which is a collection of metadata that describes assembly name, culture settings, list of all files in the assembly, security identity, version requirements, and references to resources. The assembly manifest can be stored with the intermediate code, or in a standalone file that contains only assembly manifest information.
Type metadata
Resources
The main and only required element of the above four elements is the assembly manifest. The remaining elements are optional depending on your requirements.
As we have mentioned above, an assembly can be formed into a single physical file. In this case all the above four elements will be stored inside this file (either an EXE, or a DLL file). Or it can be formed in more than one file, and in this later case we call it a multi-file assembly. In multi-file assembly the above four elements can be stored in separate files like module files for code, resources files for images, or other files required by the application. Note that the files that forms the multi-file assembly are not physically linked, instead they are linked through the assembly manifest.
You may ask yourself, when should I use multi-file assembly technique? The answer is, you should use this form of assembly when you want to combine modules written in different languages, when you want to optimize downloading an application that consists of more than one module, or when you want to use a huge resource file so you put it in a separate resource file and the .NET framework will download it only when it is referenced which will optimize your memory usage and system resources.
No comments:
Post a Comment