Architecture of the .net framework pdf




















The resources that are within domain are faster. The code, which is developed in. NET framework, is known as managed code. This code is directly executed by CLR with help of managed code execution. Any language that is written in. NET Framework is managed code. Managed code uses CLR which in turns looks after your applications by managing memory, handling security, allowing cross - language debugging, and so on. The code to be executed must be converted into a language that the target operating system understands, known as native code.

This conversion is called compiling code, an act that is performed by a compiler. It is language independent code. When you compile code that uses the. NET Framework library, you don't immediately create operating system - specific native code.

The MSIL code is not specific to any operating system or to any language. Only at this point can the OS execute the application.

The just - in - time part of the name reflects the fact that MSIL code is only compiled as, and when, it is needed. In the past, it was often necessary to compile your code into several applications, each of which targeted a specific operating system and CPU architecture. Often, this was a form of optimization. Several JIT compilers exist, each targeting a different architecture, and the appropriate one will be used to create the native code required.

The beauty of all this is that it requires a lot less work on your part - in fact, you can forget about system - dependent details and concentrate on the more interesting functionality of your code.

It will convert the called executable code only. But it will convert code every time when a code is called again. It will only convert the called code and will store in cache so that it will not require converting code again. Normal JIT is fast. When you compile an application, the MSIL code created is stored in an assembly. Assemblies include both executable application files that you can run directly from Windows without the need for any other programs these have a. In addition to containing MSIL, assemblies also include meta information that is, information about the information contained in the assembly, also known as metadata and optional resources additional data used by the MSIL, such as sound files and pictures.

The meta information enables assemblies to be fully self - descriptive. You need no other information to use an assembly, meaning you avoid situations such as failing to add required data to the system registry and so on, which was often a problem when developing with other platforms. This means that deploying applications is often as simple as copying the files into a directory on a remote computer.

Because no additional information is required on the target systems, you can just run an executable file from this directory and assuming the. Of course, you won't necessarily want to include everything required to run an application in one place. You might write some code that performs tasks required by multiple applications.

In situations like that, it is often useful to place the reusable code in a place accessible to all applications. In the. Placing code in the GAC is simple - you just place the assembly containing the code in the directory containing this cache. One of the most important features of managed code is the concept of garbage collection. This is the. NET method of making sure that the memory used by an application is freed up completely when the application is no longer in use.

Prior to. NET this was mostly the responsibility of programmers, and a few simple errors in code could result in large blocks of memory mysteriously disappearing as a result of being allocated to the wrong place in memory. That usually meant a progressive slowdown of your computer followed by a system crash. NET garbage collection works by inspecting the memory of your computer every so often and removing anything from it that is no longer needed.

There is no set time frame for this; it might happen thousands of times a second, once every few seconds, or whenever, but you can rest assured that it will happen. Will try to explain the processing in terms of C code which is written using. NET Framework. Step 3 - When this code is executed either in its own right if it is an executable or when it is used from other code , it must first be compiled into native code using a JIT compiler. Step 4 - The native code is executed in the context of the managed CLR, along with any other running applications or processes.

Note: One additional point concerning this process. It's possible to split application code across multiple source code files, which are then compiled together into a single assembly. This extremely useful process is known as linking. This is because it is far easier to work with several smaller files than one enormous one.

You can separate out logically related code into an individual file so that it can be worked on independently and then practically forgotten about when completed. This also makes it easy to locate specific pieces of code when you need them and enables teams of developers to divide up the programming burden into manageable chunks, whereby individuals can check out pieces of code to work on without risking damage to otherwise satisfactory sections or sections other people are working on.

I hope that this article would have helped you in understanding. NET Framework and have built a simple and clear understanding of.

Have taken some definition and lines from some references for technically explanation and understanding. Your feedback and constructive contributions are welcome. Please feel free to contact me for feedback or comments you may have about this article. View All. NET Framework is the original. NET implementation that has existed since Versions 4. NET Standard can run on those versions of. NET Framework. NET Framework is optimized for building Windows desktop applications.

For more information, see the. NET Framework guide. Mono is a. NET implementation that is mainly used when a small runtime is required. Mono also powers games built using the Unity engine. Historically, Mono implemented the larger API of. NET Framework and emulated some of the most popular capabilities on Unix.

It is sometimes used to run. NET applications that rely on those capabilities on Unix. Mono is typically used with a just-in-time compiler, but it also features a full static compiler ahead-of-time compilation that is used on platforms like iOS. For more information, see the Mono documentation.

UWP is an implementation of. It's designed to unify the different types of devices that you may want to target, including PCs, tablets, phones, and even the Xbox. For more information, see Introduction to the Universal Windows Platform. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode.



0コメント

  • 1000 / 1000