Some basic concepts in. NET and. NET
Application domain
The application domain is a logical unit in CLR that provides code running range, error isolation, and security settings isolation. It functions similar to operating system processes. One or more application domains run in an operating system process. The overhead for creating and destroying application domains is smaller than that of operating system processes. However, like operating system processes, data sharing between application domains is quite difficult.
JIT (timely compilation, Just-In-Time)
Before compiling the intermediate code, the JIT engine looks for a method to cache the code on the local machine and determines whether it is available. If it is available for direct loading, if it is unavailable, it looks for method stubs in the type, find and compile the intermediate code.
Strong signature assembly and weak signature assembly
A strong signature assembly is an assembly with a public key and a digital signature. Each strong signature can be uniquely identified by four elements: file name, version number, language culture, and public key. This information is included in the assembly list.
The weak signature assembly has the same metadata, CLR header file, and assembly list as the strong signature assembly. The only difference is that the weak signature assembly does not have a public key and cannot be digitally signed. Weak signature assembly cannot be placed in GAC, and can only be deployed in private mode.
GAC (Global Assembly Cache, Global Assembly Cache)
GAC is a folder with a specific directory structure. All strongly-Signed assemblies can be placed in GAC. You can drag an assembly to GAC or use other tools by using the asssepolicy viewer provided by the. Net Framework. Both are more GAC specifications and the Assembly's own characteristics. Create a subdirectory under the GAC directory.
Advantages of GAC:
- When the Assembly is referenced more, the memory cost can be effectively reduced.
- The publisher policy can effectively publish the latest version of the Assembly.
- Multiple versions of the same assembly can coexist and can be switched through configuration.
Delayed Signature
Delayed signature refers to the delay of private key encryption and digital signature for strong signature assembly to actual release. Delayed signatures improve the efficiency of the development and testing phase, and facilitate organizations and project teams to manage their own private keys.