01.01.2015 Views

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Session 27—Introduction to Web Development with Java 279<br />

fixed text, images, and hyperlinks to other pages. In this case, you would write an HTML<br />

page with this content and place it on your Web server. A shell of the HTML page is shown<br />

in Listing 27-1. (HTML is a markup language that is composed of plain text accompanied by<br />

markup tags to specify how to format the text. HTML can be stored in a plain text file and<br />

does not need to be compiled or processed in any way before it is placed on the Web server.)<br />

Listing 27-1<br />

HTML sample<br />

<br />

<br />

Next Step Education<br />

<br />

<br />

Next Step Education<br />

(...more content...)<br />

<br />

<br />

HTML is the most common form of Web content and is the form I focus on in<br />

this session. However, this session’s discussion of generating and sending<br />

Note HTML can also be applied to other forms of Web content, such as XML for<br />

data interchange.<br />

Usually, HTML files are stored on a Web server and loaded over a network such as the<br />

Internet. This architecture is shown in the <strong>UML</strong> Deployment diagram in Figure 27-1. When<br />

the user types a URL into a Web browser, the browser needs to communicate with a Web<br />

server to get that document, in this case “index.html.” The HyperText Transfer Protocol<br />

(HTTP) defines the communication protocol for that communication between the Web<br />

browser and the Web server.<br />

Client<br />

Web<br />

Browser<br />

<br />

Web Server<br />

Web<br />

Server<br />

index.html<br />

Figure 27-1 <strong>UML</strong> Deployment diagram, HTML on a Web server<br />

The full sequence of events for retrieving a Web document is shown in the <strong>UML</strong> Sequence<br />

diagram in Figure 27-2. When the user enters a URL, the Web browser creates an HTTP request,<br />

which is a packet of information including the name of the Web server, the name of the document,<br />

and other information about the request being made. The Web browser then sends that<br />

HTTP request over the network to the Web server that was specified in the URL. The Web<br />

Server then looks up the Web page “index.html” and returns it as part of the response.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!