NET Framework

11
.NET Framework

description

C

Transcript of NET Framework

  • .NET Framework

  • The Microsoft .NET Framework is a software component that can be added to or is included with Microsoft Windows operating system.The framework is intended to make it easier to develop computer applications and to reduce the vulnerability of applications and computers to security threats It provides a large body of pre-coded solutions to common program requirements, and manages the execution of programs written specifically for the framework. The .NET Framework is a key Microsoft offering, and is intended to be used by most new applications created for the Windows platform The pre-coded solutions that form the framework's Base Class Library (BCL) cover a large range of programming needs in areas including: user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, and network communications. The functions of the class library are used by programmers who combine them with their own code to produce applications.

  • Programs written for the .NET Framework execute in a software environment that manages the program's runtime requirements. This runtime environment, which is also a part of the .NET Framework, is known as the Common Language Runtime (CLR). The CLR provides the appearance of an application virtual machine, so that programmers need not consider the capabilities of the specific CPU that will execute the program. The CLR also provides other important services such as security mechanisms, memory management, and exception handling. The class library and the CLR together compose the .NET Framework Interoperability - Because interaction between new and older applications is commonly required, the .NET Framework provides means to access functionality that is implemented in programs that execute outside the .NET environment. Access to COM components is provided in the System.Runtime.InteropServices and System.EnterpriseServices namespaces of the framework, and access to other functionality is provided using the P/Invoke feature.

  • Design goals and principal features Language Independence The .NET Framework introduces a Common Type System, or CTS. The CTS specification defines all possible datatypes and programming constructs supported by the CLR and how they may or may not interact with each other. Because of this feature, the .NET Framework supports development in multiple programming languages. This is discussed in more detail in Microsoft .NET Languages. Common Runtime Engine Programming languages on the .NET Framework compile into an intermediate language known as the Common Intermediate Language, or CIL (formerly known as Microsoft Intermediate Language, or MSIL). In Microsoft's implementation, this intermediate language is not interpreted, but rather compiled in a manner known as just-in-time compilation (JIT) into native code. The combination of these concepts is called the Common Language Infrastructure (CLI), a specification; Microsoft's implementation of the CLI is known as the Common Language Runtime (CLR).

  • Base Class Library The Base Class Library (BCL), part of the Framework Class Library (FCL), is a library of types available to all languages using the .NET Framework. The BCL provides classes which encapsulate a number of common functions, including file reading and writing, graphic rendering, database interaction and XML document manipulation. Simplified Deployment Installation of computer software must be carefully managed to ensure that it does not interfere with previously installed software, and that it conforms to increasingly stringent security requirements.The .NET framework includes design features and tools that help address these requirements. Security.NET allows for code to be run with different trust levels without the use of a separate sandbox.

  • .NET Framework architecture

  • Common Language Infrastructure (CLI)The important component of the .NET framework lies within the Common Language Infrastructure, or CLI. The purpose of the CLI is to provide a language-agnostic platform for application development and execution, including, but not limited to, components for exception handling, garbage collection, security, and interoperability. Microsoft's implementation of the CLI is called the Common Language Runtime, or CLR. The CLR is composed of four primary parts:Common Type System (CTS) Common Language Specification (CLS) Just-In-Time Compiler (JIT) Virtual Execution System (VES) Common Type System Common Type System (CTS) is the term Microsoft uses to describe the treatment of data types in the Microsoft .NET framework. The framework supports type definitions that are independent of any specific programming language, and CTS covers the range of topics related to type handling. These topics include type safety, cross-language sharing of typed data, type behavior and features, and performance.

  • Functions of the Common Type SystemTo establish a framework that helps enable cross-language integration, type safety, and high performance code execution. To provide an object-oriented model that supports the complete implementation of many programming languages. To define rules that languages must follow, which helps ensure that objects written in different languages can interact with each other. In computing, just-in-time compilation (JIT), also known as dynamic translation, is a technique for improving the runtime performance of a computer program. JIT builds upon two earlier ideas in run-time environments: bytecode compilation and dynamic compilation. It converts code at runtime prior to executing it natively, for example bytecode into native machine code. The performance improvement over interpreters originates from caching the results of translating blocks of code, and not simply reevaluating each line or operand each time it is met (see Interpreted language). It also has advantages over statically compiling the code at development time, as it can recompile the code if this is found to be advantageous, and it may be able to enforce security guarantees

  • Common Language Specification (CLS) A set of base rules to which any language targeting the CLI should conform in order to interoperate with other CLS-compliant languages. The Virtual Execution System(VES) provides an environment for executing managed code. It provides direct support for a set of built-in data types, defines a hypothetical machine with an associated machine model and state, a set of control flow constructs, and an exception handling model.To a large extent, the purpose of the VES is to provide the support required to execute the Common Intermediate Language instruction set.

  • MetaDataAll CIL is Self-Describing through .NET metadataThe CLR checks on metadata to ensure that the correct method is calledMetadata is usually generated by language compilers butdevelopers can create their own metadata through customattributes Metadata also contains information about the assembly Assemblies The intermediate CIL code is housed in .NET assemblies, which for the Windows implementation means a Portable Executable (PE) file (EXE or DLL)Assemblies are the .NET unit of deployment, versioning and securityThe assembly consists of one or more files, but one of these must contain the manifest, which has the metadata for the assembly

  • THANK YOU