Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Introduction to ASP.NET Ed Dunhill blogs.msdn.com/edunhill SLIDE7.

Similar presentations


Presentation on theme: "An Introduction to ASP.NET Ed Dunhill blogs.msdn.com/edunhill SLIDE7."— Presentation transcript:

1 An Introduction to ASP.NET Ed Dunhill blogs.msdn.com/edunhill SLIDE7

2 Agenda What is ASP? Architecture Visual Studio (demo) Controls (demo) Validation (demo) Viewstate (demo)

3 ‘Classic’ ASP Launched in 1996 VBScript.aspProcedural Inline scripting Executed ‘on the fly’ Manual state maintenance

4 ASP.NET Launched in 2002 C#, VB.NET or any.NET language.aspx Object Orientated – Events Driven Code-behind Compiled and cached Automatic state maintenance – ViewState Controls including forms validation

5 Architecture -.NET Common Language Runtime Visual Studio.NET.NET Framework Class Library ASP.NETASP.NETWindows Forms FormsWindows ASP.NET Web Services ASP.NET Enterprise Services ADO.NETADO.NETMore...More... Common Language Specification C#C#VB.NETVB.NETJ#J#CobolCobolMore...More... FrameworkIDE

6 Architecture -.NET Source Code Compilation Language Compiler Assembly Execution JIT Compiler NativeCode Code (IL) Metadata

7 Architecture - ASP.NET Compilation Manual compilation Locally compiled to MSIL (dll) Automatic compilation Compiled to MSIL on first access Compiled to native code on first access Cached by server for performance Recompiled if source is modified

8 Benefits – ASP.NET Compilation Performance Compiled code is closer representation to machine codeSecurity Compiled code is more difficult to reverse engineerStability Code is checked at compile time for syntax errors, type safety, and other problemsInteroperability MSIL supports all.NET languages Assemblies written in different languages work together

9 ASP.NET Compilation - Details Each ASP.NET page compiled into a class that extends System.Web.UI.Page Implements IHttpHandler Exposes HttpContext Properties as own Response, Request and Server objects are available as properties of the class Methods for rendering are provided (eg. Response.Write) Events associated with generating the page are defined (eg. Page_Load)

10 Server-side code placement in page compilation

11 ASP.NET Model ASP.NET – Just-In-Time Compilation Response Response PageClass Instantiate, process and render Gen’d Page Class FileGenerate Instantiate Parse ASPXEngine ASPX File Request Request Code- behind class file ASPX File Web Browser

12 Visual Studio IDE for.NET development Desktop/Web/Mobile/XBOXIntellisenseDebugging ASP.NET enabled test server Drag and drop GUI Integration with Expression Suite MSDNAA Express Editions

13 Visual Studio Express Tools for Windows, Web, Database and Games Development Include optional components Express MSDN Library SQL Server 2005 Express Edition Client Web/Web Services { Database {{

14 Controls Large control library available Similar to Windows Forms Inherit from base class Web.UI.WebControls Custom controls can be built Can be easily added and manipulated through Visual Studio 2005 GUI HTML and ASP.NET controls runat=“server” Fewer events supported than Windows Forms

15 Validation Full validation architecture Custom error messages Preset + custom validation controls Validation summary Validation groups Client side validation through JavaScript Saves unnecessary round trip for invalid input Server side validation Added security + backup for downlevel browsers

16 Maintaining State HTTP is a stateless protocol Sessions tracked with cookies or URL Viewstate stores unposted control states Posted control states restored automatically Session used to store custom variables Profile for persistent state based on user


Download ppt "An Introduction to ASP.NET Ed Dunhill blogs.msdn.com/edunhill SLIDE7."

Similar presentations


Ads by Google