We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27
Advanced Web Technologies
Prof. Kinjal Doshi
By: Prof. Kinjal Doshi
Introduction to .NET What is .NET? It is a combination of Framework Common Language Runtime Class Libraries ASP.NET Web Services .NET Enterprise Servers
By: Prof. Kinjal Doshi
Definition of .NET .NET is a software development framework introduced by Microsoft for building, deploying and running applications and services.
The .NET platform is an integral component of the
Microsoft Windows operating system for building and running next generation software applications and Web services.
By: Prof. Kinjal Doshi
Evolution of .NET Microsoft started development of .NET framework in late 1990s, originally under the Next Generation Windows Services and by late 2000, the first beta version of .NET Framework were released. Then after so many changes have come to .NET Framework in different versions [starting from Framework 1.0 to Framework 4.7 approx. 13 different versions are introduced with updated functionalities]
By: Prof. Kinjal Doshi
Advantages of .NET Object-Oriented Programming Good Design Language Independence Better Support for Dynamic Web Pages Efficient Data Access Code Sharing Improved Security Zero Impact Installation Support for Web Services Visual Studio .NET
By: Prof. Kinjal Doshi
.NET Framework Architecture
By: Prof. Kinjal Doshi
Common Language Runtime Central to the .NET framework is its run-time execution environment, known as the Common Language Runtime (CLR) or the .NET runtime.
By: Prof. Kinjal Doshi
Features of CLR
By: Prof. Kinjal Doshi
The CLR Execution Process
By: Prof. Kinjal Doshi
.NET Framework Class Library (FCL)
By: Prof. Kinjal Doshi
ADO.NET and XML ActiveX Data Object (ADO).NET provides next generation data access technologies. It supports Connected Architecture Disconnected Architecture
It supports communication between
Relational Database Hierarchical Database
By: Prof. Kinjal Doshi
ASP.NET Web Forms and Web Services .NET supports rich and powerful applications like ASP.NET Web Application ASP.NET Web Services Windows Form Application Windows Services
By: Prof. Kinjal Doshi
Common Language Specification The Common Language Specification works with the Common Type System to ensure language interoperability. The CLS is a set of minimum standards that all compilers targeting .NET must support. Important: It is perfectly acceptable to write non-CLS- compliant code. However, if you do, the compiled IL code isn't guaranteed to be fully language-interoperable. Ex: VB.NET is not case sensitive while C#.NET is a case sensitive and if user wants to communicate with these two languages than it generates confusion for the compiler to access the variables
By: Prof. Kinjal Doshi
Common Language Specification CLS-compliant features only applies to public and protected members of classes and public classes. Within the private implementations of your classes, you can write whatever non-CLS code you wish, because code in other assemblies cannot access this part of your code anyway.
By: Prof. Kinjal Doshi
Common Type System CTS is converting the data type to a common data type, for example, when we declare an int type data type in C# and VB.Net then they are converted to int32. In other words, now both will have a common data type that provides flexible communication between these two languages.
By: Prof. Kinjal Doshi
Common Type System
By: Prof. Kinjal Doshi
.NET Components Common Language Runtime(CLR) Base Class Library(BCL) Common Language Specification(CLS) Common Type System(CTS) Managed-Unmanaged Code Microsoft Intermediate Language(MSIL) JIT Compiler Assembly
By: Prof. Kinjal Doshi
Managed & Unmanaged Code Managed Code : Managed code is a code that is written to target the services of runtime execution environment (CLR) The code that runs under the control of CLR is known as Managed Code All the features supported by CLR is applied to Managed Code (like type checking, exception handling, automatic memory management etc.) For Ex: MSIL Code Unmanaged Code: The code, which is developed outside .NET, Framework is known as unmanaged code. Unmanaged Code does not get the benefit of CLR By: Prof. Kinjal Doshi Microsoft Intermediate Language(MSIL) It is a set of CPU independent instructions that are generated by the language compiler when the project is compiled MSIL provided language interoperability as the code in any .NET language is compiled into MSIL We can call it as Intermediate Language (IL) or Common Intermediate Language (CIL) It is either .exe or .dll file format MSIL includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling, and other operations By: Prof. Kinjal Doshi JIT Compiler It is responsible for converting MSIL instructions into native machine code It performs this task only when methods are first called on a object. Once invoked, the JIT preserves the converted MSIL in memory. Subsequent calls to the method go directly to the native machine code. Rather than waste CPU time and memory by converting an entire MSIL file to native code, the JIT converts only the code the application needs at any given time
By: Prof. Kinjal Doshi
JIT Compiler Types of JIT Compiler: Pre-JIT(Install-time code generation): This JIT compiles an assembly’s entire code into native code at one stretch. It allows you to compile the entire assembly just once before you run it and store it into the memory. Econo-JIT You would use this JIT on devices with limited resources-for example, handheld devices with small amounts of memory. It compiles the code bit-by-bit, and will not store the code in memory Normal JIT The default JIT compiles code only as it is called and places the resulting native code in the cache.
By: Prof. Kinjal Doshi
Assembly Assemblies are self describing block It is a fundamental unit of deployment It exists .exe and .dll file format Assemblies contain the Definition of types : A basic unit for encapsulating the data Ex: Class Meta-data: Data about type Ex: Name of the Type, Visibility, Type’s inheritance, Type’s methods, properties and events Manifest: The manifest contains the information the CLR needs to load the assembly and to access its types Ex: Name and version of the assembly , A list of all files in the assembly A list of all other assemblies the assembly references By: Prof. Kinjal Doshi Assembly
By: Prof. Kinjal Doshi
Assembly An assembly can be a single file or it may consist of the multiple files. In case of multi-file, there is one master module containing the manifest while other assemblies exist as non-manifest modules. Assembly can be Private Assembly: It is default created by the compiler. It can be given any name because it is local only to a single application. Shared Assembly: It can be shared by other application. It is placed inside the Global Assembly Cache (GAC). By: Prof. Kinjal Doshi Garbage Collector It manages allocation and release of memory for your application Allocating Memory : All theValue types are stored in stack memory and All the Reference types are stored in a heap memory When new process initialized CLR reserves contiguous memory allocation in the managed heap This dynamic memory allocation is much faster than the unmanaged memory allocation.
By: Prof. Kinjal Doshi
Garbage Collector Memory Management
By: Prof. Kinjal Doshi
Features of .NET Multiple language Integration and Support Platform and processor independence Automatic memory management Easy deployment Distributed Architecture Performance and scalability Security Inter-operability with unmanaged code Versioning support Support for Open standards. By: Prof. Kinjal Doshi