Understanding Web Applications Lesson 4. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Web Page Development Understand Web.

Slides:



Advertisements
Similar presentations
Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
Advertisements

Web 2.0 with AJAX Students : LASC Ioana KELEMEN Csilla POP Dan Adrian CIOBANU Dumitru Daniel Project leaders : Jean Luc LARBOT Ahmed RHIAT.
Understand Web Page Development Software Development Fundamentals LESSON 4.1.
Project 1 Introduction to HTML.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…
Web-Based Applications
Introduction to Web Interface Technology (CSE2030)
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
Introduction to ASP.NET
Introduction to Web Interface Technology (CSE2030)
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
1st Project Introduction to HTML.
1 Web Services Visual C# 2008 Step by Step Chapter 30.
HTML 1 Introduction to HTML. 2 Objectives Describe the Internet and its associated key terms Describe the World Wide Web and its associated key terms.
Chapter ONE Introduction to HTML.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
ASP.Net, Web Forms and Web Controls 1 Outline Introduction Simple HTTP Transaction System Architecture Creating and Running a Simple Web Form Example Web.
Chapter 9 Web Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
INTRODUCTION TO WEB DATABASE PROGRAMMING
9-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Overview of Previous Lesson(s) Over View  Server controls are small building blocks of the graphical user interface, which includes  Text boxes  Buttons.
Chapter 1: Introduction to Web
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
ASP.NET The.NET Framework. The.NET Framework is Microsoft’s distributed run-time environment for creating, deploying, and using applications over the.
DATA COMMUNICATION DONE BY: ALVIN SAMPATH CARLVIN SAMPATH.
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott COMP6325 Advanced Web Technologies Dr. Paul Walcott The University.
IT533 Lectures Session Management in ASP.NET. Session Tracking 2 Personalization Personalization makes it possible for e-businesses to communicate effectively.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
1 HRS2422 Web Services JAX-WS and SOAP Introduction  Web service – A software component stored on one computer that can be accessed via method.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
Creating Web Applications Using ASP.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
HTML, XHTML, and CSS Sixth Edition Chapter 1 Introduction to HTML, XHTML, and CSS.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Programming with Visual Web Developer Chapter 9.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
1 Welcome to CSC 301 Web Programming Charles Frank.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Christopher M. Pascucci Basic Structural Concepts of.NET Managing State & Scope.
Overview of Previous Lesson(s) Over View  SDI programs  The Application Wizard can generate single-document interface (SDI) applications that work.
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
ASP.NET Web Services.  A unit of managed code installed under IIS that can be remotely invoked using HTTP.
Chapter 7: Creating and Consuming XML Web Services Understanding XML Web Services Creating XML Web Services Deploying and Discovering XML Web Services.
 Previous lessons have focused on client-side scripts  Programs embedded in the page’s HTML code  Can also execute scripts on the server  Server-side.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
HTML Concepts and Techniques Fifth Edition Chapter 1 Introduction to HTML.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Chapter 1 Introduction to HTML, XHTML, and CSS HTML5 & CSS 7 th Edition.
.NET Mobile Application Development XML Web Services.
Overview of Previous Lesson(s) Over View  ASP is a technology that enables scripts in web pages to be executed by an Internet server.  ASP.NET is a.
Introduction to the World Wide Web & Internet CIS 101.
ASP.NET Part II Dr. Awad Khalil Computer Science Department AUC.
ASP.NET Architecture Mike Taulty Developer & Platform Group Microsoft Ltd
1 Introducing Web Developer Tools Rapid application development tools ASP.NET-compatible web editors –Visual Studio.NET Professional Edition –Visual Studio.
National College of Science & Information Technology.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Computing with C# and the .NET Framework
Web Application Development Using PHP
Presentation transcript:

Understanding Web Applications Lesson 4

Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Web Page Development Understand Web page development (4.1) Understanding ASP.NET Application Development Understand Microsoft ASP.NET Web Application development (4.2) Understanding IIS Web HostingUnderstand Web hosting (4.3) Understanding Web Services Development Understand Web Services (4.4)

HTML Hypertext Markup Language (HTML) is the language used by Web servers and browsers to describe a Web page. An HTML page has two distinct parts: a header and a body. HTML tags define the structure and content of a page. Each starting tag has a matching ending tag. For example, the ending tag for is. The header is enclosed within the and tags. The body is enclosed within the and tags

HTML Example

HTML Output

Cascading Style Sheets Cascading style sheets (CSS) is a language that describes information about displaying a Web page. CSS enable you to store a Web page’s style and formatting information separate from the HTML code. HTML specifies what will be displayed whereas CSS specifies how that material will be displayed. When used effectively, CSS is a great tool for increasing site-wide consistency and maintainability.

CSS Example

Using the CSS File

JavaScript JavaScript is a client-side scripting language. JavaScript runs inside Web browsers. JavaScript is supported by all popular Web Browsers. Ajax is shorthand for “Asynchronous JavaScript and XML.” Ajax uses JavaScript extensively in order to provide responsive Web applications. The ASP.NET AJAX framework lets you implement Ajax functionality on ASP.NET Web pages.

JavaScript Example

Client-Side vs. Server-Side Programming Client-side programming refers to programs that execute completely on a user’s local computer. –Examples: Windows Forms application, JavaScript code that executes within a Web browser. Server-side programming refers to programs that are executed completely on a server and make use of the server’s computational resources. –Examples: Web applications and Web services. Hybrid applications use both client- and server-side programming. Ajax applications use a mix of server-side programming and client-side code to create interactive and highly responsive Web applications.

ASP.NET ASP.NET is the part of the.NET Framework that enables you to develop Web applications and Web services. The ASP.NET infrastructure has two main parts: –A set of classes and interfaces that enables communication between the Web browser and Web server. These classes are organized in the System.Web namespace. –A runtime process, also known as the ASP.NET worker process (aspnet_wp.exe), that handles the Web request for ASP.NET resources.

ASP.NET Page Execution The ASP.NET worker process (aspnet_wp.exe) fulfills the request for ASP.NET page execution. The ASP.NET worker process compiles the.aspx file into an assembly and instructs the Common Language Runtime (CLR) to execute the assembly. When the assembly executes, it takes the services of various classes in the.NET Framework class library to accomplish its work and generate response messages for the requesting client. The ASP.NET worker process collects the responses generated by the execution of the Web page and creates a response packet.

ASP.NET Page Life Cycle EventDescription PreInitSeveral page properties, such as Request, Response, IsPostBack, and UICulture, are set at this stage. InitDuring the initialization stage, all the controls on the page are initialized and made available. LoadIf the request is a postback, the load stage is used to restore control properties with information from view state and control state. PreRenderThis stage signals that the page is just about to render its contents. UnloadDuring the unload stage, the response is sent to the client and page cleanup is performed.

State Management The state of a Web page is made up of the values of the various variables and controls. State management is the process of preserving the state of a Web page across multiple trips between browser and server. State Management Techniques: –Client-side state management –Server-side state management

Client-Side State Management Client-side techniques use HTML code and the capabilities of the Web browser to store state information on the client computer. Common client-side state management techniques: –Query Strings –Cookies –Hidden Fields –View State

Query Strings Query strings stores the data values in the query string portion of a page URL. For example, the following URL embeds a key (“q”) and its value (“television”) in query string: To retrieve the value of the key in an ASP.NET page, use the expression: Request.QueryString["q"]. QueryString is a property of the Request object, and it gets the collection of all the query-string variables and their values.

Cookies Cookies are small packets of information that are stored by a Web browser locally on the user’s computer. Cookies are commonly used for storing user preferences. To add a Cookie: HttpCookie cookie = new HttpCookie("Name", "Bob"); cookie.Expires = DateTime.Now.AddMinutes(10); Response.Cookies.Add(cookie); To read a cookie: if (Request.Cookies["Name"] != null) { name = Request.Cookies["Name"].Value; }

Hidden Fields Hidden fields contain information that is not displayed on a Web page but is still part of the page’s HTML code. Hidden fields can be created by using the following HTML element: The ASP.NET HTML Server control HtmlInputHidden also maps to this HTML element.

View State ASP.NET uses View State to maintain the state of controls across page postbacks. When ASP.NET executes a page, it collects the values of all nonpostback controls that are modified in the code and formats them into a single encoded string. This string is stored in a hidden field in a control named __VIEWSTATE. View State may increase the size of your page. View State is enabled by default by you can disable it either at the control level or at the page level.

Server-Side State Management Server-side state management uses server resources to store state information. Storing and processing session information on a server increases the server’s load and requires additional server resources to serve the Web pages. ASP.NET supports server-side state management at two levels: –Session State –Application State

Session State An ASP.NET application creates a unique session for each user who sends a request to the application. Session state can be used for temporarily store user data such as shopping cart contents. Reading from session: if (Session["Name"] != null) { /* additional code here */ } Writing to session: Session.Add("Name", TextBox1.Text);

Application State Application state is used to store data that is used throughout an application. Application State is not user-specific. Application state can be accessed through the Application property of the Page class. The Application property provides access to the HttpApplicationState object. The HttpApplicationState object stores the application state as a collection of key-value pairs.

Internet Information Services Internet Information Services (IIS) is a Web server for hosting Web applications on the Windows operating system.

Web Site & Virtual Directories An IIS server uses the concepts of sites, applications, and virtual directories. A Web site (for example: is a container of applications and virtual directories. A virtual directory is an alias that maps to a physical directory on the Web server. For example, in the address “orders” is a virtual directory. A virtual directory maps to a physical directory (for example, c:\inetpub\wwwroot\northwind\orders).

Creating a Virtual Directory

Deploying Web Applications Xcopy or FTP For simple websites that require simply copying the files. Windows Installer For complex websites that require custom actions during the deployment process. Windows Installer can create virtual directories, restart services, register components, etc.

Web Services Web services provide a way to interact with programming objects located on remote computers. Web services are based on standard technologies and are interoperable. Key technologies: –Hypertext Transmission Protocol (HTTP) –Extensible Markup Language (XML) –Simple Object Access Protocol (SOAP) –Web Services Description Language (WSDL)

SOAP SOAP is the protocol that defines how remote computers exchange messages as part of a Web service communication. Message format: XML –XML is easier for otherwise non compatible systems to understand. Message transmission: HTTP –HTTP, they can normally reach any machine on the Internet without being blocked by firewalls.

WSDL WSDL stands for Web Services Description Language. A WSDL file acts as the public interface of a Web service and includes the following information: –The data types it can process –The methods it exposes –The URLs through which those methods can be accessed

Creating Web Services Inherit from System.Web.Services.WebService Mark the class with a WebService attribute Mark the methods with WebMethod attribute [WebService(Namespace = " [WebServiceBinding(ConformsTo= WsiProfiles.BasicProfile1_1)] public class TextWebService : System.Web.Services.WebService { [WebMethod] public string ToUpper(string inputString) { return inputString.ToUpper(); }

Consuming Web Services Add a reference to the Web service by using the Add Web Reference dialog Box.

Consuming Web Services The proxy object allows you to invoke Web service methods. protected void Button1_Click(object sender, EventArgs e) { var webService = new textWebService.TextWebService(); toLowerLabel.Text = webService.ToLower(TextBox1.Text); toUpperLabel.Text = webService.ToUpper(TextBox1.Text); }

Recap Web Page Development –HTML, CSS, JavaScript Client-side vs. server-side programming ASP.NET Page Life Cycle –PreInit, Init, Load, PreRender, and Unload State Management –Query strings, cookies, hidden fields, viewstate –Session state, application state IIS Web Hosting –Web Sites, Virtual directories Web Services –SOAP, WSDL –WebService attribute, WebMethod attribute