1 / 14

Web Forms: Web Pages with Server Controls

Web Forms: Web Pages with Server Controls. Objectives. Understand the background of the Internet, and the notions of packet switching and a stateless medium

lolita
Download Presentation

Web Forms: Web Pages with Server Controls

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 Forms: Web Pages with Server Controls

  2. Objectives • Understand the background of the Internet, and the notions of packet switching and a stateless medium • Understand the operating principles of the World Wide Web, especially HTML, Web browser software, HTTP, and the Web’s cataloging scheme and search engines • Understand the features of XML that make it the language of choice for Web-based computer applications • Define and describe ASP.NET Web Forms applications • Understand the basic approach to the construction and deployment of Web Forms applications, distinguishing among HTML elements and client controls, HTML server controls, and Web server controls • Describe the importance of workarounds

  3. The Internet • Started as ARPANET, a creation of the U.S. Department of Defense’s Advanced Research Projects Agency (ARPA) • Original idea • Develop a computer network linking the Defense Department’s research laboratories and the universities performing defense-related research • ARPANET • Nondefense use overshadowed defense-related use • Renamed Internet • MILNET • Introduced in 1983 to assume the defense-related work of ARPANET

  4. The Internet (Continued) • Packet-switched network • Network in which messages are transmitted from node to node in fixed-length message blocks called packets • Individual message divided into sequentially numbered packets • Each packet consists of • Header identifying the origination and destination computers • Date-time stamp • Packet number, followed by packet body • Transmission Control Protocol/Internet Protocol • Principal software supporting end-user machines • Stateless • Internet does not maintain knowledge concerning • The originator, recipient, or contents of messages, nor does it maintain a connection between the originator and the recipient

  5. The World Wide Web • Tim Berners Lee • Introduced the Web in 1989 as a means for sharing information among the world’s nuclear research centers • Hypertext Markup Language (HTML) • Purpose is to describe the presentation of the data, that is, to provide formatting instructions • Markup languages • Inserted into a text document in order to describe the data or provide formatting or processing instructions • Tags are enclosed in angled brackets (< >) • Web Browser Software • Main purpose is to properly interpret the markup language tags in a Web page and render the page on the client computer’s screen • Web browser • Allows any Web page to be displayed, masking and accommodating differences among operating systems, monitors, and graphics software

  6. The World Wide Web (Continued) • Hypertext Transfer Protocol (HTTP) • Hypertext Refers to text that includes a hidden reference (called a hyperlink) to another Web page or Web site • Cataloging Scheme and Search Engines • URL address • Consists of the Internet service, the domain name, the path to the Web page (if necessary), and the title of the Web page (if necessary) • Domain name • Correlates to the Internet Protocol (IP) address of the server • Domain name server (DNS) for a Web server • Usually consists of www, followed by a meaningful domain name, and the top-level domain (TLD) • Search engine • A software program combined with a database

  7. eXtensible Markup Language (XML) • May be the most significant improvement to the World Wide Web in the last decade • Services include the definition of datasets and specification of processing instructions • Foundation technology for implementing XML is Active Server Pages in the .NET Framework (ASP.NET) • Client-based Web applications • Computer programs delivered to a local browser, and executed on the client machine • Include static Web pages, Windows Forms applications distributed to the client machine, and applets executing on the client • Server-based applications • Execute on the server • Include XML documents containing or referencing servlets, applications that run on the server, applications that update a database accessed through the server

  8. ASP.NET Web Forms Applications • Visual Basic 6.0 • Limited support for Web-oriented applications was provided • Visual Basic .NET • Extends both the simplicity and robustness of Visual Basic to the World Wide Web • Visual Basic .NET Web Forms • Allows you to design XML applications that consist of ASP.NET documents materialized in a browser, XML Web services that provide data, and ASP.NET code that executes on the Web server • GUI • Saved as an ASP.NET Web page (.aspx file), translating the graphical design elements into XML • Code Editor • Can be used to write code for a Web page

  9. Web Forms Application Support Files • Global.asax.vb (along with the related Global.asax and Global.asax.resx) • Provides a common structure for all of the code necessary to maintain session state • Styles.css • Provides the cascading style sheet for a Visual Basic .NET Web Forms application • The standard format of any XML cascading style sheet • Web.config • Sets the system configuration for the application • WebApplication1.vsdisco • Serves as a container for links (URLs) to discovery files that describe the XML Web service • Discovery file • Contains the URL of a Web site within which the source code for an XML Web service may be dynamically discovered

  10. WebForm1 - the Web Form Itself • Console applications • Consist only of code, contained in modules • Core of a Windows Forms application • Contained in Windows Forms • Form 1 • Default name for first form • Stored in two files: Form1.vb and Form1.resx • WebForm1 • Default name of first Web form • Stored in three files: WebForm1.aspx, WebForm1.aspx.vb, and WebForm1

  11. Summary of Project Files - Default Names

  12. WebForm1 - the Web Form Itself (Continued) • HTML Elements • Include static text and browser (client) controls that may run client-side script • HTML Server Controls • Some HTML elements can be converted into HTML server controls • Ideally, a Web form should only contain Web server controls and HTML server controls that require server-side code

  13. WebForm1 - the Web Form Itself (Continued) • Web Server Controls • 30 offered by Visual Basic .NET • Some provide functionality tailored to Web-based applications • Web page is rendered in a browser on a client machine, whereas the code is executed on the server • Web form may contain HTML elements, HTML server controls, and Web server control • The Web Forms you create should exhibit well-formed HTML • Deployment of Web Forms Applications • Can be deployed on the same server on which it is developed or on a different machine • Setup project • Prepares the files necessary to install the application

  14. Workarounds • Occur because: • Existing language may not perform some necessary function at all, or completely or efficiently • Programmers often face a programming requirement whose solution is not provided directly by the chosen programming language, or that does not work as advertised

More Related