Unit 1 The Philosophy of .NET.pdf
Document Details
Tags
Full Transcript
Understand.NET-related topics such as assemblies, the Common Intermediate Language (CIL), and just-in-time (JIT) compilation. Understand the relationship between various aspects of the.NET Framework, such as the Common Language Runtime (CLR), the Common Type System (CTS), and the...
Understand.NET-related topics such as assemblies, the Common Intermediate Language (CIL), and just-in-time (JIT) compilation. Understand the relationship between various aspects of the.NET Framework, such as the Common Language Runtime (CLR), the Common Type System (CTS), and the Common Language Specification (CLS). The role of.NET base class libraries. The platform-independent nature of.NET platform. The.NET Framework is a software platform for building systems on the Windows family of operating systems, as well as on numerous non-Microsoft operating systems such as Mac OS X and various Unix/Linux distributions. Interoperability with existing code Support for numerous programming languages A common runtime engine shared by all.NET-aware languages Language integration Comprehensive base class library A simplified deployment model Common Language Runtime or CLR › The runtime layer of.NET is known as the CLR. › A collection of services that are required to execute a given compiled unit of code. › The primary role of the CLR is to locate, load, and manage.NET objects on your behalf. › The CLR also takes care of a number of low- level details such as memory management, application hosting, coordinating threads, and performing basic security checks. Common Type System or CTS › Another building block of the.NET platform is CTS. › The CTS specification fully describes all possible data types and all programming constructs supported by the runtime, specifies how these entities can interact with each other, and details how they are represented in the.NET format. Common Language Specification or CLS › A given.NET-aware language might not support every feature defined by the CTS. › So, CLS is a related specification that defines a subset of common types and programming constructs that all.NET programming languages can agree on. Base Class Library The.NET platform provides a base class library that is available to all.NET programming languages. The base class libraries define types that can be used to build any type of software application. It contains predefined methods and properties to implement common and complex functions like reading and writing to file, graphic rendering, database interaction etc. C# is a modern, general-purpose, object-oriented programming language developed by Microsoft and approved by European Computer Manufacturers Association (ECMA) and International Standards Organization (ISO). Developed by Anders Hejlsberg and his team during the development of.Net Framework. Based on Java and C++ No pointers required! C# programs typically have no need for direct pointer manipulation. Automatic memory management through garbage collection. Support for strongly typed queries (e.g., LINQ) used to interact with various forms of data. It can be compiled on a variety of computer platforms. The code which runs under the CLR is called as Managed Code. Managed environment makes it possible to build, deploy, and run.NET programs on a wide variety of target machines. Code that cannot be directly hosted by the.NET runtime is termed Unmanaged code. Visual Basic C++/CLI JavaScript F# Assemblies are a fundamental part of programming with the.NET Framework. It contains code that the common language runtime executes. It can be a dll or an exe. Assemblies include both executable application files that you can run directly from Windows without the need for any other programs (.exe file), and libraries (.dll extension) for use by other applications. A.NET programming language (C#, VB.NET, J# etc.) does not compile into executable code; instead it compiles into an intermediate code called Microsoft Intermediate Language (MSIL). Each.NET-aware compiler produces nearly identical CIL instructions. Therefore, all languages are able to interact within a well-defined binary base. During the run time, the CLR’s just-in-time compiler converts MSIL into machine language, which is, then run on the host machine. A namespace is a grouping of semantically related types contained in an assembly or possibly spread across multiple related assemblies. They are C# program elements designed to help you organize your programs. Example: System is a namespace and Console is a class in that namespace. When you want use a namespace in your program, the keyword using is used. .NET applications can be developed and executed on non-Microsoft operating systems, including Mac OS X, various Linux distributions, Solaris, and iOS and Android mobile devices. When Microsoft released the C# programming language and the.NET platform, it also crafted two sets of specifications: › The C# Language Specification and › The Common Language Infrastructure (CLI) These specifications enables third parties to build distributions of the.NET platform for any number of operating systems and/or processors. The Mono project › The Mono project is an open source distribution of the CLI that targets various Linux distributions, Mac OS X, iOS devices, Android devices, and Windows. .NET Core 5 › Microsoft also supports a cross platform version of.NET, which focuses on the construction of code libraries and enterprise web applications. The Mono project is an excellent choice if you want to build.NET software that can run on a variety of operating systems. This chapter includes:- › Overview of.NET framework and its features. › Building blocks of the.NET platform such as CLR, CTS, CLS. › Role of the base class library. › History of C# and its features. › Overview of.NET assemblies. › Language Interoperability through MSIL › Namespaces. › Platform-independent nature of.NET. › Open source.NET distributions.