UML Weekend Crash Course⢠- To Parent Directory
UML Weekend Crash Course⢠- To Parent Directory UML Weekend Crash Course⢠- To Parent Directory
Session 27—Introduction to Web Development with Java 279 fixed text, images, and hyperlinks to other pages. In this case, you would write an HTML page with this content and place it on your Web server. A shell of the HTML page is shown in Listing 27-1. (HTML is a markup language that is composed of plain text accompanied by markup tags to specify how to format the text. HTML can be stored in a plain text file and does not need to be compiled or processed in any way before it is placed on the Web server.) Listing 27-1 HTML sample Next Step Education Next Step Education (...more content...) HTML is the most common form of Web content and is the form I focus on in this session. However, this session’s discussion of generating and sending Note HTML can also be applied to other forms of Web content, such as XML for data interchange. Usually, HTML files are stored on a Web server and loaded over a network such as the Internet. This architecture is shown in the UML Deployment diagram in Figure 27-1. When the user types a URL into a Web browser, the browser needs to communicate with a Web server to get that document, in this case “index.html.” The HyperText Transfer Protocol (HTTP) defines the communication protocol for that communication between the Web browser and the Web server. Client Web Browser Web Server Web Server index.html Figure 27-1 UML Deployment diagram, HTML on a Web server The full sequence of events for retrieving a Web document is shown in the UML Sequence diagram in Figure 27-2. When the user enters a URL, the Web browser creates an HTTP request, which is a packet of information including the name of the Web server, the name of the document, and other information about the request being made. The Web browser then sends that HTTP request over the network to the Web server that was specified in the URL. The Web Server then looks up the Web page “index.html” and returns it as part of the response.
280 Sunday Afternoon :User :Web Browser :Web Server type URL create HTTP request send HTTP request create HTTP response copy contents of requested HTML file into HTTP response send HTTP response interpret and display HTML Figure 27-2 UML Sequence diagram, HTTP protocol For example, if the URL entered is www.nextstepeducation.com/index.html, the Web request will be sent to the Web server on the machine with a domain name of www. nextstepeducation.com. When the Web server receives the request, it will create an HTTP response, which is a packet of information that includes the requested document or error message and other metadata about the response. The Web server will look for the file that was specified in the URL. In the example in Figure 27-2, the Web server will load the index.html file and place the contents of that file into the HTTP response. The Web server will then send the HTTP response back across the network to the Web browser that made the request. The Web browser will take the HTML out of the HTTP response, interpret it, and display the content with the specified formatting. Tip Some people may question the choice of “objects” in the Sequence diagram in Figure 27-2. In truth, a Web browser is simply a larger, more complex object than a customer or an order. This approach is common practice when modeling interaction between systems (that is, when modeling the systems as objects). Dynamic Web Content The previous section showed how HTTP is used to send static HTML content to Web browsers. Most Web applications require dynamically generated content. For example, when you go to a weather forecast Web site, you don’t want it to give you the contents of an HTML file that was saved a month ago; you want it to generate an up-to-date weather forecast for you on the spot and return it to you. Furthermore, you want to be able to access weather information for a certain city. Thus, there must be some programming logic that can take your user input and adapt the result to your request. So a weather Web site would
- Page 251 and 252: 228 Sunday Morning receivePmt(amt)[
- Page 253 and 254: 230 Sunday Morning Figure 22-4 repr
- Page 255 and 256: 232 Sunday Morning A substate is a
- Page 257 and 258: 234 Sunday Morning Monitor when tem
- Page 260 and 261: SESSION 23 Applying the Extended St
- Page 262 and 263: Session 23—Applying the Extended
- Page 264 and 265: Session 23—Applying the Extended
- Page 266 and 267: Session 23—Applying the Extended
- Page 268 and 269: SESSION 24 Modeling the Development
- Page 270 and 271: Session 24—Modeling the Developme
- Page 272 and 273: Session 24—Modeling the Developme
- Page 274 and 275: Session 24—Modeling the Developme
- Page 276 and 277: Session 24—Modeling the Developme
- Page 278 and 279: SESSION 25 Modeling the Static View
- Page 280 and 281: Session 25—Modeling the Static Vi
- Page 282 and 283: Session 25—Modeling the Static Vi
- Page 284 and 285: Session 25—Modeling the Static Vi
- Page 286 and 287: SESSION 26 Modeling the Static View
- Page 288 and 289: Session 26—Modeling the Static Vi
- Page 290 and 291: Session 26—Modeling the Static Vi
- Page 292 and 293: Session 26—Modeling the Static Vi
- Page 294 and 295: Session 26—Modeling the Static Vi
- Page 296 and 297: PART # V Sunday Morning Part Review
- Page 299 and 300: PART VI Sunday Afternoon Session 27
- Page 301: 278 Sunday Afternoon design, and mo
- Page 305 and 306: 282 Sunday Afternoon studied Java p
- Page 307 and 308: 284 Sunday Afternoon and time. A JS
- Page 310 and 311: SESSION 28 Analysis and Architectur
- Page 312 and 313: Session 28—Analysis and Architect
- Page 314 and 315: Session 28—Analysis and Architect
- Page 316 and 317: Session 28—Analysis and Architect
- Page 318 and 319: Session 28—Analysis and Architect
- Page 320 and 321: SESSION 29 Design of a Web Applicat
- Page 322 and 323: Session 29—Design of a Web Applic
- Page 324 and 325: Session 29—Design of a Web Applic
- Page 326 and 327: Session 29—Design of a Web Applic
- Page 328 and 329: Session 29—Design of a Web Applic
- Page 330 and 331: SESSION 30 UML Modeling Tools Sessi
- Page 332 and 333: Session 30—UML Modeling Tools 309
- Page 334 and 335: Session 30—UML Modeling Tools 311
- Page 336 and 337: Session 30—UML Modeling Tools 313
- Page 338 and 339: PART VI # Sunday Afternoon Part Rev
- Page 340 and 341: APPENDIX A Answers to Part Reviews
- Page 342 and 343: Answers to Part Reviews 319 20. I a
- Page 344 and 345: Answers to Part Reviews 321 26. It
- Page 346 and 347: Answers to Part Reviews 323 22. Dra
- Page 348 and 349: Answers to Part Reviews 325 Sunday
- Page 350 and 351: Answers to Part Reviews 327 It maps
280<br />
Sunday Afternoon<br />
<br />
:User<br />
:Web Browser<br />
:Web Server<br />
type URL<br />
create HTTP request<br />
send HTTP request<br />
create HTTP response<br />
copy contents of requested<br />
HTML file into HTTP response<br />
send HTTP response<br />
interpret and display HTML<br />
Figure 27-2 <strong>UML</strong> Sequence diagram, HTTP protocol<br />
For example, if the URL entered is www.nextstepeducation.com/index.html, the<br />
Web request will be sent to the Web server on the machine with a domain name of www.<br />
nextstepeducation.com. When the Web server receives the request, it will create an HTTP<br />
response, which is a packet of information that includes the requested document or error<br />
message and other metadata about the response. The Web server will look for the file that<br />
was specified in the URL. In the example in Figure 27-2, the Web server will load the<br />
index.html file and place the contents of that file into the HTTP response. The Web server<br />
will then send the HTTP response back across the network to the Web browser that made<br />
the request. The Web browser will take the HTML out of the HTTP response, interpret it, and<br />
display the content with the specified formatting.<br />
Tip<br />
Some people may question the choice of “objects” in the Sequence diagram<br />
in Figure 27-2. In truth, a Web browser is simply a larger, more complex<br />
object than a customer or an order. This approach is common practice when<br />
modeling interaction between systems (that is, when modeling the systems<br />
as objects).<br />
Dynamic Web Content<br />
The previous section showed how HTTP is used to send static HTML content to Web<br />
browsers. Most Web applications require dynamically generated content. For example, when<br />
you go to a weather forecast Web site, you don’t want it to give you the contents of an<br />
HTML file that was saved a month ago; you want it to generate an up-to-date weather forecast<br />
for you on the spot and return it to you. Furthermore, you want to be able to access<br />
weather information for a certain city. Thus, there must be some programming logic that<br />
can take your user input and adapt the result to your request. So a weather Web site would