The World Wide Web consists of a large group of computers, known as servers, that exist solely to provide information when that information is requested. The information is requested by a piece of computer software called a web browser. If you’re here, you’ve almost certainly used the web countless times already, maybe even to order this book.
It is said that the web operates on a client-server model, where the client is the web browser and the server is the computer providing, or serving, the information. That information is typically stored in a web page, which is nothing more than a specially formatted document that usually contains images and frequently references to other resources that help the page look and behave in a certain way.
The web browser
When a client requests a web page, a web browser such as Microsoft Internet Explorer or Mozilla Firefox (or Safari or Google Chrome or Opera or Lynx) is used. The web page itself can be a document stored on your computer, just like a word processing document. A program like Microsoft Word knows how to open documents formatted for Microsoft Word. In the same way, a web browser knows how to open documents formatted for the web. More on this later.
Web browsers are programmed to read and parse the specially formatted documents known as web pages.
The web browser knows not only how to open and parse documents formatted for the web, but also how to contact other computers to request documents from them. For example, when you type http://www.braingia.org into the address bar of your browser, the browser knows how to translate that request into the resulting page that you end up seeing in front of you.
The web server
When a web browser requests a page, it typically contacts a web server. Just as the web browser is software that’s programmed to know how to read and parse web pages, the web server is software that’s programmed to send web pages when they’re requested.
Several popular web server software packages are available, but two stand out above the rest: Apache httpd and Microsoft Internet Information Services (IIS). Between the two of them, these server software packages are responsible for hosting the vast majority of all web domains.
Web servers and web browsers talk to each other using a protocol called HyperText Transfer Protocol, or HTTP. In essence, HTTP is just a way for these two parties to speak to each other.
Think of it as being like the protocol involved in making a telephone call. When you make a telephone call, you dial some digits. (This is like the web browser using the IP address to contact the web server.) The individual who answers the call is expected to say “Hello” or something similar. As a response, you’re expected to say “Hello” or “What’s Shakin’” or some other appropriate greeting so that you both know the conversation is underway.
This is all that HTTP or any other Internet protocol does: It defines how and when each party involved in the conversation should act. One major difference between HTTP and a telephone conversation is that HTTP is said to be stateless. This is a fancy way to say that HTTP doesn’t remember what it’s doing from one request to the next. When you request a web page, the web server has no way of knowing that you just requested that same page 3 seconds ago and it won’t know if you request the same page 3 seconds from now. This is important when you start programming web applications that need to remember things from one screen to the next — and you’ll see how easy it is to solve the problem.
Lest you think you mistakenly bought Internet For Dummies, let’s focus this discussion back toward web programming. Before doing so, here’s a summary of where you are so far:
✦ A web browser is special software that knows how to open and interpret web pages. Web browsers also know how to contact web servers to get information.
✦ The web operates on a client-server model.
✦ A web server is special software that knows how to respond to requests for web pages.
✦ Web servers and web browsers speak HTTP to each other and do so using host names, domain names, and IP addresses.
Technical Stuff :
It is said that the web operates on a client-server model, where the client is the web browser and the server is the computer providing, or serving, the information. That information is typically stored in a web page, which is nothing more than a specially formatted document that usually contains images and frequently references to other resources that help the page look and behave in a certain way.
The web browser
When a client requests a web page, a web browser such as Microsoft Internet Explorer or Mozilla Firefox (or Safari or Google Chrome or Opera or Lynx) is used. The web page itself can be a document stored on your computer, just like a word processing document. A program like Microsoft Word knows how to open documents formatted for Microsoft Word. In the same way, a web browser knows how to open documents formatted for the web. More on this later.
Web browsers are programmed to read and parse the specially formatted documents known as web pages.
The web browser knows not only how to open and parse documents formatted for the web, but also how to contact other computers to request documents from them. For example, when you type http://www.braingia.org into the address bar of your browser, the browser knows how to translate that request into the resulting page that you end up seeing in front of you.
The web server
When a web browser requests a page, it typically contacts a web server. Just as the web browser is software that’s programmed to know how to read and parse web pages, the web server is software that’s programmed to send web pages when they’re requested.
Several popular web server software packages are available, but two stand out above the rest: Apache httpd and Microsoft Internet Information Services (IIS). Between the two of them, these server software packages are responsible for hosting the vast majority of all web domains.
Web servers and web browsers talk to each other using a protocol called HyperText Transfer Protocol, or HTTP. In essence, HTTP is just a way for these two parties to speak to each other.
Think of it as being like the protocol involved in making a telephone call. When you make a telephone call, you dial some digits. (This is like the web browser using the IP address to contact the web server.) The individual who answers the call is expected to say “Hello” or something similar. As a response, you’re expected to say “Hello” or “What’s Shakin’” or some other appropriate greeting so that you both know the conversation is underway.
This is all that HTTP or any other Internet protocol does: It defines how and when each party involved in the conversation should act. One major difference between HTTP and a telephone conversation is that HTTP is said to be stateless. This is a fancy way to say that HTTP doesn’t remember what it’s doing from one request to the next. When you request a web page, the web server has no way of knowing that you just requested that same page 3 seconds ago and it won’t know if you request the same page 3 seconds from now. This is important when you start programming web applications that need to remember things from one screen to the next — and you’ll see how easy it is to solve the problem.
Lest you think you mistakenly bought Internet For Dummies, let’s focus this discussion back toward web programming. Before doing so, here’s a summary of where you are so far:
✦ A web browser is special software that knows how to open and interpret web pages. Web browsers also know how to contact web servers to get information.
✦ The web operates on a client-server model.
✦ A web server is special software that knows how to respond to requests for web pages.
✦ Web servers and web browsers speak HTTP to each other and do so using host names, domain names, and IP addresses.
Technical Stuff :
Domain names and IP addresses
Every website needs a unique address on the web. The unique address used by computers to locate a website is the Internet Protocol (IP) address. The
most commonly used version of the IP is version 4 (IPv4), but version 6 (IPv6) is becoming more popular. In version 4, an IP address is a series of four numbers between 0 and 255, separated by dots (for example, 172.17.204.2 or 192.168.2.33). Because IP addresses are made up of numbers and dots, they aren’t easy to remember. Fortunately, there’s a translation service called the Domain Name System (DNS) that provides translation services between IP addresses and friendly host names that are easier to remember. On the web, you typically see “www” followed by a dot followed by a domain name, as in www. braingia.org. In that address, the www is called |
a subdomain and the braingia.org part is called the domain name. Technically, the .org part is called a Top-Level Domain or TLD.
When you browse to a site such as www. braingia.org, a DNS server which is known to your computer asks “What’s the IP address of www.braingia.org?” The DNS server then looks up the address for www. braingia.org and sends it back to your computer so that you can contact the server responsible for www.braingia.org.
Each domain name must be unique. Consequently, a system of registering domain names ensures that no two locations use the same domain name. For the most part (and barring legalities), anyone can register any domain name as long as the name isn’t already taken
|
No comments:
Post a Comment