1 / 27

Web Based Applications

Learn about Active Server Pages (ASP) technology, its object model, and creating ASP applications for dynamic, web-based data processing. Dive into ASP files, scripts, sessions, requests, responses, and error handling. Utilize ASP objects for server resources and user input. Explore the ASP Global.asa file and building ASP applications via Microsoft IIS console. Access useful online resources for further learning.

btrimble
Download Presentation

Web Based Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web Based Applications Active Server Pages

  2. Introduction • Moving away from stand-alone model • Focus on web-based data processing • Need for anytime, anywhere access

  3. Overview • About ASP Technology • ASP Object Model • Creating ASP applications

  4. About ASP Technology

  5. What Is ASP? • ASP is a Microsoft Technology • ASP stands for Active Server Pages • ASP is a program that runs inside IIS

  6. What Is An ASP File? • ASP file is similar to an HTML file • ASP file extension has to be “.asp” • It can contain HTML, XML, and scripts

  7. What Is An ASP Script? • ASP scripts use VBScript or JScript syntax • ASP code is included within <% %> tags • Scripts execute on the server before sending output to the client browser

  8. What Can ASP Do? • Provide dynamic content to any web page • Respond to user queries from HTML forms • Access any data or database for content • Customize websites for each individual • Minimize network traffic with fewer pages

  9. ASP Object Model

  10. ASP Application Object • Used to store objects and variables for the application that can be accessed by every ASP page • Contents store the information about the application’s state and behavior

  11. Methods Lock UnLock Events Application_OnStart Application_OnEnd ASP Application Object • Usage • Application(“VariableName”) = Variable • Variable = Application(“VariableName”) • Set Object = Application(“ObjectName”)

  12. ASP Session Object • Used to store information for a single user • Session information is stored in a cookie • Common session information can include user’s id, name, and preferences

  13. Methods Abandon Events Session_OnStart Session_OnEnd ASP Session Object • Usage • Session(“VariableName”) = Variable • Variable = Session(“VariableName”) • Set Object = Session(“ObjectName”)

  14. ASP Server Object • Used to access information about the server • Provides methods to access server resources • Enables server management at run-time

  15. Methods CreateObject Execute Transfer MapPath GetLastError HTMLEncode URLEncode ASP Server Object

  16. ASP Request Object • Used to access information from users • Provides methods for processing user input • User input comes from forms, cookies, URLs, web browsers, and client certificates

  17. Collections Form Cookies QueryString ServerVariables Methods BinaryRead Properties TotalBytes ASP Request Object

  18. ASP Response Object • Used to send server output to the users • Provides methods to send HTTP headers, HTML content or even files to the users • Output can be directed to the web browser or to a cookie on user’s machine

  19. Collections Cookies Methods BinaryWrite Write Redirect Properties Buffer Expires ContentType IsClientConnected Status ASP Response Object

  20. ASP Error Object • Used to display detailed information of any error in scripts in an ASP page • Provides easy alternative to line-by-line debugging

  21. Properties ASPCode ASPDescription Category Description File Line Column Source ASP Error Object

  22. Other ASP Objects • ASP File System Object Provides access to server’s file system • ASP ADODB Object Provides access to database sources • ASP Dictionary Object Collection structure similar to C++ Map

  23. ASP Global.asa File • Used to declare objects, variables, and methods that can be accessed by every single page in an ASP program • Includes event handlers for Application and Session start and end

  24. Creating ASP Applications

  25. Learning Plan • Using Microsoft IIS Console • Creating websites in IIS • Basic ASP application demo • Login script dissection

  26. Summary • ASP enables web-based processing • ASP Object Model is flexible • ASP is a proven technology

  27. Useful Online Resources • Microsoft MSDN Library http://msdn.microsoft.com • W3Schools Online Web Tutorials http://www.w3schools.com

More Related