Presentation is loading. Please wait.

Presentation is loading. Please wait.

Module: Software Engineering of Web Applications Chapter 2: Technologies 1.

Similar presentations


Presentation on theme: "Module: Software Engineering of Web Applications Chapter 2: Technologies 1."— Presentation transcript:

1 Module: Software Engineering of Web Applications Chapter 2: Technologies 1

2 Web Applications Evolution steps Extending the presentation capability of HTML through a better separation of content and presentation. The emergence of the eXtensible Markup Language (XML). Server-side scripting extended architectures for Web servers (such as Java2EE or Microsoft.NET) Web services These slides are designed to accompany module: Software Engineering of Web Applications2

3 2.1 The HyperText Transfer Protocol (HTTP) The HyperText Transfer Protocol (HTTP) is the very basic ingredient on which the Web is founded. It is a client-server application protocol that defines a standard format for specifying the request of resources on the Web. Through HTTP a user using a client application (e.g., a browser) can request resources available on a remote server (the Web server). Typical resources exchanged through HTTP are HTML pages These slides are designed to accompany module: Software Engineering of Web Applications3

4 HTTP More generally, a request may be related to a file of any format stored on the Web server or to the invocation of a program to be executed on the server side. Since such resources are distributed over the Internet, they need an identication mechanism to be located and accessed. The identifier for referencing resources is a string, called the Uniform Resource Locator (URL) These slides are designed to accompany module: Software Engineering of Web Applications4

5 URL URL species the protocol used for the resource transfer (e.g., HTTP for Web page exchange, or other protocols, such as FTP, supported by the browser), the name or the IP address of the machine hosting the resource, an optional port number denoting the access to a specific server port, and the document name and location in the Web server's file system. For example, the URL http://home.dei.polimi.it/matera/index.html denotes the file named index.html stored in the directory named matera/ in the file system managed by the Web server installed on the host named home.dei.polimi.it. These slides are designed to accompany module: Software Engineering of Web Applications5

6 Additionally, parameters (the so-called query string") can follow to enable, for example, the transfer of processing instructions or simple data provided by users through forms. These slides are designed to accompany module: Software Engineering of Web Applications6

7 Request-response cycle of HTTP These slides are designed to accompany module: Software Engineering of Web Applications7

8 How does HTTP work? when the user types a URL into the browser address line or when the user clicks on an anchor within a page representing a URL for a given resource, the browser issues an HTTP request, in which a request line species an HTTP method, the URL of the requested resource, and the protocol version. These slides are designed to accompany module: Software Engineering of Web Applications8

9 HTTP methods The most important HTTP methods are GET and POST. The GET method submits a plain request for a resource to the Web server, and allows the user to submit simple inputs via the query string. The POST method submits a request that allows the user to submit complex inputs (for example, a long text or a file) to be processed by the server. With the POST method, the user input is packaged as an attachment to the request, and constitutes the so-called request body. These slides are designed to accompany module: Software Engineering of Web Applications9

10 When receiving the request, a server locates the resource and sends a response to the client. The response message includes a status line, which includes information about the protocol version and a numeric status code with its associated message (for example, HTTP/1.1 404 Not found), and a message body carrying the actual resource to be exchanged. These slides are designed to accompany module: Software Engineering of Web Applications10

11 2.2 The HyperText Markup Language (HTML) Besides managing the request and transfer of resources through the HTTP protocol, a Web browser also handles the visual presentation of the resources. The HyperText Markup Language (HTML) is used to express the content and the visual formatting of Web pages. The document presentation is managed by a processor embedded in the Web browser, which receives as input the marked-up content and transforms it into a rendered document by interpreting the meaning of the tags. These slides are designed to accompany module: Software Engineering of Web Applications11

12 A simple HTML page with an embedded image and a clickable hyperlink Inserting an image and an anchor A simple HTML page With an embedded image: And with a link to an external resource: Click here to open the home page of Politecnico di Milano... These slides are designed to accompany module: Software Engineering of Web Applications12


Download ppt "Module: Software Engineering of Web Applications Chapter 2: Technologies 1."

Similar presentations


Ads by Google