Chapter 7. Weaving the Web

In This Chapter

  • Understanding the Hypertext Transfer Protocol

  • Coding basic Web pages

  • Coding Web forms

What do the initials WWW mean to you? Wee Willie Winkie? Which way, Wanda? Where's Walter's wife? World Wide Web? If your answer is “World Wide Web,” you've opened to the right chapter. This chapter describes the secrets behind Web pages. The chapter emphasizes secrets that pertain to Ruby on Rails developers.

The Working of the Web

What happens when you browse the Web? You sit in front of a computer, which is called the client computer. The client computer runs a piece of software (a Web browser). Because your browser runs on the client computer, your browser is called the client program (or simply, the client).

With your keyboard and mouse, you issue commands to the browser. You're called the visitor because you visit a Web site. Another name for you is the user, because you use the Web's services.

Whatever you call yourself, the Web browser turns each of your commands into a request and sends this request over the Internet to another computer somewhere else in the world. The computer that receives the request is called the server computer. The server computer runs a program called a Web server. The server program analyzes the request and sends back a response. (See Figure 7-1 .) This response is typically a document known as a Web page.

Figure 7-1: Communication between a client and a server.

Figure 7.1.  Figure 7-1: ...

Get Ruby on Rails For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.