1 / 78

Web Application

Web Application. • Web Application are programs that can be executed either on a Web server or in a Web browser. • An Online store accessed through a browser is an example of a web application. Static and Dynamic Page. • The content of a web application that

sblanchette
Download Presentation

Web Application

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 Application • Web Application are programs that can be executed either on a Web server or in a Web browser. • An Online store accessed through a browser is an example of a web application.

  2. Static and Dynamic Page • The content of a web application that consists of only HTML pages is static. It does not respond dynamically to the actions performed buy users. • To respond dynamically to user request we create Dynamic pages.

  3. Types of Scripting • Client Side Scripting • Server Side Scripting

  4. Client Side Scripting • Enables you to develop Web pages that can dynamically respond to user input without having to interact with a Web server.

  5. Advantages of Client Side Scripting • Reduce network traffic • Speed up the response time

  6. CSS Language • VB Script • Java Script

  7. Server Side Scripting • Provides dynamic content to users based on the information stored in a remote location. • It executed on a Web Server.

  8. SSS Language • Active Server Pages (ASP) • Java Server Pages (JSP)

  9. ASP. Net • .Net version of ASP introduced by Microsoft. • To help developers create globally distributed software with Internet functionality. • Enable you to access information from data source. • Enables you to separate HTML design from the data retrieval mechanism.

  10. Elements in ASP. Net • Web Forms • Configuration Files • XML Web Service Files • State Management • Runtime Services

  11. Web Forms • Web forms enable you to include user interface such as TextBox,ListBox and application logic of web applications.

  12. Configuration File • Enable you to store the configuration settings of an ASP. Net application.

  13. Development Environment • .Net Framework • ISS (Internet Information Services)

  14. IIS • IIS server enables you to access the ASP. Net web application. It's work as a Web server on the network. Web server for windows platform)

  15. Working of an ASP. Net application • Web browser send a request by URL • IIS receive and retrieves the appropriate file from the memory. • Forward it to ASP. Net script engine. • Script Engine to ISS • ISS to client

  16. Features of ASP. Net • Compiled Code • Enriched Tool Support(WYSIWYG) • Power and Flexibility • Simplicity • Manageability (xml) • Scalability (further enhancement) • Security

  17. Programming Models in ASP. Net • Web Forms • Web Services

  18. Check your self • What is a Web Application? • What’s the difference between Static and Dynamic pages? • What is Scripting? • How many types of Scripting Languages? • Describe about Client Side Scripting? • Describe about server Side Scripting? • What’s are the advantage of client side scripting?

  19. • Write down some Client Side Scripting Languages? • Write down some Server Side Scripting Languages? • What’s are the advantages of ASP. Net? • What is ISS?

  20. Web Services • Enable you to access certain functionality at the server side. • These services enable the exchange of data in a client to server or a server to server environment over the web.

  21. Controls in ASP. Net • System. Object – System.Web.UI • System.Web.UI.Control – System.Web.UI.WebControls – System.Web.UI.HTMLControls

  22. Types of Controls • ASP. Net HTML controls • ASP. Net Web controls • Validation controls • User controls

  23. HTML controls • Replicas of the standard HTML tag • HTML tag are converted into HTML controls by using attributes such as ID etc. • <Input Type = Text Runat =“server” ID = “textbox1” value = “welcome”>

  24. Web Controls • Basic Web controls – textbox,label,button,hyperlink,radiobutton etc. • List controls – Listbox,dropdownlist,checkboxlist etc. • Rich Web controls – Calendar etc. • Data controls – Datagrid,datalist,repeater

  25. Validation controls • Used to validate the user input. • Attached to input controls to check the values that a user enters for input controls.

  26. Types of Validation Controls • Compare Validator • Custum Validator • Range Validator • Regular Validator • RequiredField Validator • Validation Summary

  27. User Controls • User Controls are ASP. Net pages that are converted into controls. • Extension is .ascx

  28. File used in an ASP.Net Application • AssemblyInfo.cs :- • This file contains a set of attributes that contain general information about the assembly such as the name, description and version of the assembly.

  29. • Global.asax:- • Each web application will have one Global.asax file attached to it. It contains scripts that define the start and end events of the application.

  30. • Web.config:- • This is the configuration file for your application. It is an XML file that contains configuration data.

  31. Code Behind Feature of ASP. Net • The code behind future of ASP. Net enables you to divide an ASP. Net page in to two files. One file contains the presentation content and other file which is called the code behind file, contains all application logic. • Presentation file -.aspx • Code behind file - .cs

  32. Automatically Generated Code • <%@ Page language =“C#” Codebehind=“WebForm1.aspx.cs” AutoEventWireup=“false” Inherits=“WebApplication1.WebForm1” • Language : Any .NET Framework supported language

  33. AutoEventWireup • Whether the page Framework calls page events and methods automatically for an ASP. Net page • Default value is set to false. • False value indicate that you must explicitly write code to bind page events.

  34. Codebehind and Inherits • The code behind file for a page. • The class in the code behind file that a page inherits. This class can be any class derived from the Page class.

  35. Code Inline • The practice of writing application logic in the presentation file is known as code inline.

  36. Page Events • Init • Load • Control • Unload

  37. Init and Load event • You can write the page initialization code in the Init or Load event of the Web Page. • Page_Init is the event handler for the Init event and Page_Load is the event handler for the Load event of the page.

  38. Difference between Init and Load • There is a difference between the Init and Load event. When the Init event is fired all controls are loaded with their default values. On the other hand when the Load event is fired the controls are loaded in the memory with values that are set during the round trip.

  39. Round Trip • A round trip is a sequence of events that a web page follows to complete the journey from a web browser to a web server.

  40. Control Event • After the Init and Load event the page is served to user. When the user interact with the page to generate a control event such as click on a button the page is posted back to the server and the code in the control’s event handler is executed. • After processing the page is re crated and the page follow the same Init and Load events.

  41. IsPostBack • Property of the Web Page • You can avoid the firing of Init and Load event by using the IsPostBack property of a web page. • It’s allow you to check whether the page is being requested for the first time.

  42. Unload event • Finally when a user close the page or exits from the browser the page is unloaded from the memory and the Unload event is fired.

  43. Code Declaration Blocks • We can add application logic or code in two different ways. One is in code behind file and another is in html code. • Mostly we prefer Code behind future. • If we write code in html then it’s known as • Code Declaration Blocks. <script language=“lan.name” runat=“server”> ----------------------- ----------------------- </script>

  44. ASP. Net Built in Objects • ASP. Net has a number of built in objects that run on a Web server. Built in Objects in ASP. Net are – • Application • Request • Response • Server • Session

  45. Application Object • The Application object is used to store and retrieve information that can be shared among all the users of an application. • Provides access to application-wide methods and events for all sessions. • Application state is a data repository available to all classes in an ASP.NET application. • Application state is stored in memory on the server and is faster than storing and retrieving information in a database. • Application state applies to all users and all sessions. Therefore, application state is a useful place to store small amounts of often-used data that does not change from one user to another.

  46. Request objects • Request:- The request object is used to access the information sent in a request from a browser to the server.

  47. Response object • Response :- The response object is used to send information to the browser.

  48. Server object • Server :- The server object is used to access various utility functions on the server.

  49. Session object • The session object is used to store and retrieve information about particular user sessions. • It is use to persist information throughout the user session. • ASP. Net session state enables you to store and retrieve values for a user as the user navigates the different ASP. Net pages that make up a Web application. • ASP. Net session state is enabled by default for all ASP. Net applications. • ASP. Net session-state variables are easily set and retrieved using the Session property, which stores session variable.

  50. RequiredField Validator • You can specify that a user must provide information in a specific control on an ASP.NET Web page by adding a RequiredFieldValidator control to the page and linking it to the required control. • For example, you can specify that users must fill in a Name text box before they can submit a registration form.

More Related