Building ASP.NET Applications Rishi Kothari
Introduction ASP .NET Platform Page development “Baked-in” application services Run time
Introduction Active Server Pages .NET Designer for Web Applications and XML Web services Drag and drop for controls and HTML features Rich language integration ASP .NET and Visual Studio ® .NET are designed for Web Applications
Introduction ASP .NET Builds on the programming classes of the .NET Framework Controls and infrastructure simplify the building of Web Applications
Page Development Topics Separation of Code from Content Dynamic Compilation Server Controls Validation Custom Controls Page Event Life Cycle
Page Development Separation of Code from Content Separation of Code from Content Developers and designers can work independently Form1.asp Form1.aspx Form1.vb <tags> <tags> code code Separate files Single file ASP ASP .NET
Page Development Server Controls Server-programmable objects Properties, method and events Encapsulate behavior Browser-neutral - Can render differently to support multiple browsers or other Web clients You can create custom server controls
Page Development Page Event Life Cycle Page_Load Page_Unload Textbox1_Changed Button1_Click Control events 1. Change Events 2. Action Events Page is loaded, control hierarchy initialized Page is disposed Control hierarchy is rendered
Page Development Demo Web Forms 101 Show simple Web Form with server controls Demonstrate page life cycle
Page Development Input Validation Rich and declarative Validation Validation controls declared separately for input controls Extensible Validation Framework Supports Validation on client and server Avoids round trips for up-level clients
Page Development Input Validation Demo Validation Controls Demo of Validation Control
Page Development Server Controls Demo Other Server Controls Show online demos Walk through a few medium level examples
Page Development Custom User Controls Simple way for page developers to author controls Enables full encapsulation Supports nested controls Separate code namespace Separate code language Partition work across multiple developers Reuse work across multiple pages and applications
Page Development User Controls Demo User Controls Show creation and use of simple User Control
“Baked-in” Application Services Session State Session state can be external from ASP .NET process ASPState: NT Service SQL Server ™ 7.0/2000 temporary database Big reliability wins Session state survives crashes/restarts Enables Web farm deployment Session state can be shared across a Web farm of ASP .NET servers Applications are no longer tied to one machine
“Baked-in” Application Services Session State Demo Session state Show using session state in the application InProc Service SQL
ASP .NET Runtime Improved Deployment Components can be dynamically updated No more locked DLLs Just copy a new DLL on top of an old one No tools, no configuration changes, no application shutdown and no re-boots Works great with Content Replication Systems
ASP .NET Runtime Improved Deployment
Sample Application Demo Deployment via XCOPY Deployment via MSI
Summary ASP .NET simplifies Web Application development Scalable, better performing applications Makes developers more productive Makes systems more reliable Makes systems easier to deploy
Resources The ASP .NET home page - A good starting place for ASP .NET basics http://msdn.microsoft.com/net/aspnet/default.asp A solid introduction to ASP .NET - This article covers the basics of Web Forms, Web Services, State Management, Security and other areas http://msdn.microsoft.com/library/dotnet/cpguide/cpconintroductiontoasp.htm The ASP .NET architecture - A quick overview of the set up of ASP .NET http://msdn.microsoft.com/library/dotnet/cpguide/ cpconaspnetarchitecture.htm
Resources Five steps to getting started with ASP .NET - An article to get you started http://msdn.microsoft.com/library/welcome/dsmsdn/asp11122000.htm Web Forms processing - An explanation of how Web Forms work http://msdn.microsoft.com/library/dotnet/cpguide/cpconwebformspageprocessing.htm Creating Web Forms event-handling methods using ASP .NET - A basic how-to for creating event-driven methods in ASP .NET http://msdn.microsoft.com/library/dotnet/cpguide/cpconcreatingwebformsevent-handlingmethodsusingaspsyntax.htm

ASP.NET OVERVIEW

  • 1.
  • 2.
    Introduction ASP .NETPlatform Page development “Baked-in” application services Run time
  • 3.
    Introduction Active ServerPages .NET Designer for Web Applications and XML Web services Drag and drop for controls and HTML features Rich language integration ASP .NET and Visual Studio ® .NET are designed for Web Applications
  • 4.
    Introduction ASP .NETBuilds on the programming classes of the .NET Framework Controls and infrastructure simplify the building of Web Applications
  • 5.
    Page Development TopicsSeparation of Code from Content Dynamic Compilation Server Controls Validation Custom Controls Page Event Life Cycle
  • 6.
    Page Development Separationof Code from Content Separation of Code from Content Developers and designers can work independently Form1.asp Form1.aspx Form1.vb <tags> <tags> code code Separate files Single file ASP ASP .NET
  • 7.
    Page Development ServerControls Server-programmable objects Properties, method and events Encapsulate behavior Browser-neutral - Can render differently to support multiple browsers or other Web clients You can create custom server controls
  • 8.
    Page Development Page Event Life Cycle Page_Load Page_Unload Textbox1_Changed Button1_Click Control events 1. Change Events 2. Action Events Page is loaded, control hierarchy initialized Page is disposed Control hierarchy is rendered
  • 9.
    Page Development DemoWeb Forms 101 Show simple Web Form with server controls Demonstrate page life cycle
  • 10.
    Page Development InputValidation Rich and declarative Validation Validation controls declared separately for input controls Extensible Validation Framework Supports Validation on client and server Avoids round trips for up-level clients
  • 11.
    Page Development InputValidation Demo Validation Controls Demo of Validation Control
  • 12.
    Page Development ServerControls Demo Other Server Controls Show online demos Walk through a few medium level examples
  • 13.
    Page Development CustomUser Controls Simple way for page developers to author controls Enables full encapsulation Supports nested controls Separate code namespace Separate code language Partition work across multiple developers Reuse work across multiple pages and applications
  • 14.
    Page Development UserControls Demo User Controls Show creation and use of simple User Control
  • 15.
    “Baked-in” Application ServicesSession State Session state can be external from ASP .NET process ASPState: NT Service SQL Server ™ 7.0/2000 temporary database Big reliability wins Session state survives crashes/restarts Enables Web farm deployment Session state can be shared across a Web farm of ASP .NET servers Applications are no longer tied to one machine
  • 16.
    “Baked-in” Application Services Session State Demo Session state Show using session state in the application InProc Service SQL
  • 17.
    ASP .NET RuntimeImproved Deployment Components can be dynamically updated No more locked DLLs Just copy a new DLL on top of an old one No tools, no configuration changes, no application shutdown and no re-boots Works great with Content Replication Systems
  • 18.
    ASP .NET RuntimeImproved Deployment
  • 19.
    Sample Application DemoDeployment via XCOPY Deployment via MSI
  • 20.
    Summary ASP .NETsimplifies Web Application development Scalable, better performing applications Makes developers more productive Makes systems more reliable Makes systems easier to deploy
  • 21.
    Resources The ASP.NET home page - A good starting place for ASP .NET basics http://msdn.microsoft.com/net/aspnet/default.asp A solid introduction to ASP .NET - This article covers the basics of Web Forms, Web Services, State Management, Security and other areas http://msdn.microsoft.com/library/dotnet/cpguide/cpconintroductiontoasp.htm The ASP .NET architecture - A quick overview of the set up of ASP .NET http://msdn.microsoft.com/library/dotnet/cpguide/ cpconaspnetarchitecture.htm
  • 22.
    Resources Five stepsto getting started with ASP .NET - An article to get you started http://msdn.microsoft.com/library/welcome/dsmsdn/asp11122000.htm Web Forms processing - An explanation of how Web Forms work http://msdn.microsoft.com/library/dotnet/cpguide/cpconwebformspageprocessing.htm Creating Web Forms event-handling methods using ASP .NET - A basic how-to for creating event-driven methods in ASP .NET http://msdn.microsoft.com/library/dotnet/cpguide/cpconcreatingwebformsevent-handlingmethodsusingaspsyntax.htm

Editor's Notes

  • #2 Building ASP ® .NET Applications Agenda: Day 1 Module 01: What is Microsoft ® .NET? Module 02: The .NET Framework Module 03: Visual Studio ® .NET Module 04: The .NET Languages  Module 05 : Building ASP ® .NET Applications Module 06: Using Data Access in .NET Applications Module 07: Building Reusable Middle-Tier Components