Asp Architecture


Published on

Published in: Technology
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Asp Architecture

    1. 1. ASP.NET Architecture Om Vikram Thapa
    2. 2. Contents <ul><li>Active Server Pages </li></ul><ul><ul><li>ASP and HTML </li></ul></ul><ul><ul><li>ASP and ASP.NET </li></ul></ul><ul><li>ASP and .NET </li></ul><ul><ul><li>What is .NET? </li></ul></ul><ul><ul><li>Managed and Unmanaged Execution </li></ul></ul><ul><li>.NET Framework </li></ul><ul><ul><li>Common Type System </li></ul></ul><ul><ul><li>Common Language Specification. </li></ul></ul><ul><ul><li>Common Language Runtime. </li></ul></ul><ul><ul><li>Compilation and Execution. </li></ul></ul><ul><li>ASP.NET Architecture </li></ul><ul><ul><li>ASP.NET Application Types. </li></ul></ul><ul><ul><li>ASP and ASP.NET </li></ul></ul>
    3. 3. Active Server Pages <ul><li>Web pages containing server-side scripts in addition to Text and HTML Tags. </li></ul><ul><li>It runs inside the IIS. </li></ul><ul><li>Server-side scripts are special commands in Web pages that are processed before the pages are sent from Web Server to the Web Browser of client. </li></ul><ul><li>When Browser requests ASP File, IIS passes request to ASP Engine . </li></ul><ul><li>ASP Engine reads ASP File line by line, executes scripts and ASP File is returned to Browser as a plain HTML File. </li></ul>
    4. 4. HTML and ASP <ul><li>Server-side Scripts cannot be written in HTML. </li></ul><ul><li>Scripts denoted by delimiters : < > </li></ul><ul><li>Cannot access any Database. </li></ul><ul><li>Scripts can be viewed from the Browser. </li></ul><ul><li>Pages are Static. </li></ul><ul><li>Pages denoted by .html or .htm </li></ul><ul><li>Server-side Scripts can be written using ASP. </li></ul><ul><li>Scripts denoted by delimiters: <% %> </li></ul><ul><li>Can access any Data or Database. </li></ul><ul><li>Scripts cannot be viewed from the Browser. </li></ul><ul><li>Pages are Dynamic. </li></ul><ul><li>Pages denoted by .asp or .aspx for ASP.NET </li></ul>HTML ASP
    5. 5. .NET and ASP <ul><li>What is .NET? </li></ul><ul><ul><li>Platform Neutral Framework from Microsoft </li></ul></ul><ul><ul><li>Is a layer between the operating system and the programming language. </li></ul></ul><ul><ul><li>It supports 24 programming languages: </li></ul></ul><ul><ul><ul><li>Visual Basic, C# , J# , C++, Perl etc. </li></ul></ul></ul><ul><ul><li>.NET provides a common set of class libraries, which can be accessed from any .NET based programming language. </li></ul></ul><ul><li>Managed and Unmanaged Execution Environment </li></ul><ul><ul><li>Unmanaged Code : Converted directly into Native Code. </li></ul></ul><ul><ul><li>Managed Code : Converted to an Intermediate Language which can be executed from any environment having the .NET Framework. </li></ul></ul>
    6. 6. .NET Framework Operating System Common Language Runtime Base Class Library ADO.NET and XML ASP.NET Windows Forms Common Language Specification VB C++ C# JScript … Visual Studio.NET
    7. 7. Inside the .NET Framework <ul><li>Common Type System [CTS]: </li></ul><ul><li>Provides every language running on .NET platform with a base set of Data Types. </li></ul><ul><ul><li>Everything in the CTS is an object </li></ul></ul><ul><ul><li>Most languages implement aliases to those types </li></ul></ul><ul><ul><li>e.g. a four-byte integer value is represented by the CTS type System.Int32 but C# defines an alias for this type called int . </li></ul></ul><ul><li>Common Language Specification [CLS] </li></ul><ul><li>The CLS is a set of rules that a language compiler must follow in order to create .NET applications </li></ul><ul><ul><li>The CLS defines the following things </li></ul></ul><ul><ul><ul><li>Common variable types (called CTS ) </li></ul></ul></ul><ul><ul><ul><li>Common visibility like when and where can one see these variables, </li></ul></ul></ul><ul><ul><ul><li>Common method specifications , and so on. </li></ul></ul></ul>
    8. 8. Inside the .NET Framework Contd… <ul><li>Common Language Runtime [CLR] </li></ul><ul><li>Manages the execution of code compiled for the .NET platform. </li></ul><ul><li>Following Steps occur in CLR: </li></ul><ul><ul><li>Managed Code created by VB or C# compilers and converted into MSIL . </li></ul></ul><ul><ul><li>MSIL contains the IL Code and the METADATA . </li></ul></ul><ul><ul><li>MSIL is kept in a file called ASSEMBLY along with Metadata . </li></ul></ul><ul><ul><li>CLR loads and verifies the assembly to make sure that IL is ok. </li></ul></ul><ul><ul><li>Just In Time Compiler [JIT] in CLR converts this IL to machine code. </li></ul></ul><ul><ul><li>Garbage Collector - Automatic allocation and release of Memory. </li></ul></ul><ul><ul><li>Base Class Library allow us to interact with the runtime, and provide additional useful functionality. Provides services and Objects needed to write applications. </li></ul></ul>
    9. 9. Compilation & Execution Source Code Compilation Code (IL) Metadata MSIL Language Compiler Native Code Execution JIT Compiler
    10. 10. ASP.NET Architecture <ul><li>Web clients communicate with ASP.NET applications through IIS . </li></ul><ul><li>IIS authenticates the request. </li></ul><ul><li>If “ Allow Anonymous” is turned on, no authentication occurs. </li></ul><ul><li>IIS also finds the requested resource. </li></ul><ul><li>If the Client is authorized, IIS returns the appropriate resource. </li></ul>Web Clients ASP.NET Applications IIS .NET Framework Windows NT/2000/XP Operating System
    11. 11. ASP.NET Application Types <ul><li>Two types of Applications: </li></ul><ul><ul><li>Web Forms: </li></ul></ul><ul><ul><li>XML web services. </li></ul></ul><ul><li>Web forms allow us to build form-based web pages .We can use ASP.NET server controls to create common UI elements, and program them for common tasks . </li></ul><ul><li>XML Web services are software applications that use XML to exchange data (information) with other applications on other computers by using Internet protocols. </li></ul>
    12. 12. ASP.NET and ASP <ul><li>Multiple language Support </li></ul><ul><li>ASP.NET pages are compiled. </li></ul><ul><li>Functional Codes separated from presentation code. </li></ul><ul><li>Browser-independent applications. </li></ul><ul><li>Memory leak, deadlock, and crash protection. </li></ul><ul><li>Better performance due to caching of code during compilation. </li></ul><ul><li>Provides more security and stability because of the .NET Framework. </li></ul><ul><li>Only scripting languages supported </li></ul><ul><li>ASP pages are interpreted. </li></ul><ul><li>Both HTML and script are present in a single page. </li></ul><ul><li>Browser-dependent applications. </li></ul><ul><li>No such protections available in classical ASP. </li></ul><ul><li>ASP pages are not compiled hence performance is not good as compared to ASP.NET. </li></ul><ul><li>Security and Stability is not optimum as compared to ASP.NET </li></ul>ASP ASP.NET
    13. 13. Thank You