Chapter 1: Introduction to Internet and the World Wide Web
1.1 The Internet and Its History
- What is the Internet? It is a global system of interconnected computer networks. It is essentially a "network of networks" consisting of millions of private, public, academic, business, and government networks.
- Connectivity: These networks are linked together by electronic, wireless, and optical networking technologies using the Internet Protocol suite (TCP/IP) to link billions of devices worldwide.
- Brief History:
- 1960s-1970s: Began as a US Department of Defense network called ARPANET. The main goals were to support packet switching (allowing multiple users to use the same communication path) and to use TCP (Transmission Control Protocol) to ensure messages properly pass from sender to receiver.
- Initial Services: Electronic mail and file transfer.
- Late 1980s: Opened to commercial interests and most universities.
- 1990s Boom: Tim Berners-Lee created the WWW (1989-1991). Early web browsers like Mosaic (1992), Netscape (1994), and Internet Explorer (1995) were released. Giants like Amazon and Google launched in 1995 and 1996, respectively.
1.2 The World Wide Web (WWW)
- Creation: In 1989, Tim Berners-Lee at CERN developed a technology for sharing information via hyperlinked text documents. He also wrote the communication backbone for it: HTTP (Hypertext Transfer Protocol).
- Definition: The Web consists of information organized into Web pages containing text, graphic images, and hypertext links (highlighted keywords/images that lead to related information).
- Web Site: A collection of linked Web pages that share a common theme or focus.
- W3C (World Wide Web Consortium): An international consortium that develops and publishes open standards to ensure the long-term growth of the web.
1.3 Web Clients, Servers, and Multi-Tier Architecture
The WWW fundamentally comprises Web Browsers (Clients) and Web Servers.
- Web Client (User Agent): Software controlled by a user that gets and renders documents from servers (e.g., Google Chrome, Mozilla Firefox).
- Web Server: A computer system/software that listens for web page requests and delivers content to end users over the internet using protocols like HTTP/HTTPS. Examples: Apache, Microsoft IIS, Tomcat, Express.
- Multi-Tier (n-tier) Applications: Web applications divide functionality into separate logical tiers:
- Top Tier (Client Tier): The user interface (Browser). Gathers user input and displays output.
- Middle Tier (Business Logic Tier): Enforces business rules and controls interactions between the client and data. Contains controller logic (processes requests) and presentation logic (prepares data as HTML).
- Bottom Tier (Data/Information Tier): Maintains the application’s data, typically stored in a Relational Database Management System (RDBMS) like MySQL.
1.4 HTTP and The Request/Response Procedure
- HTTP (Hypertext Transfer Protocol): An application-level, request/response protocol used for distributed, collaborative, hypermedia information systems.
- HTTP Commands:
GET: Requests data from a specified resource.POST: Submits data to be processed to a specified resource.PUT: Uploads a representation of the specified URL.DELETE: Deletes the specified resource.
- The Request/Response Sequence (Dynamic Website Example):
- User enters a URL (
http://server.com). - Browser looks up the IP address and issues a request.
- Request crosses the internet and arrives at the web server.
- The server fetches the requested file from its hard disk.
- If it is a dynamic file (e.g., PHP), the server passes it to the PHP interpreter.
- The PHP interpreter executes the code. If the code requires database access, it sends SQL statements to the database (e.g., MySQL).
- The database returns data to the PHP interpreter, which returns the final HTML to the Web Server.
- The Web Server sends the final page back to the browser to be displayed. (Note: This cycle repeats for every object on the page, like images, CSS, and JS files).
- User enters a URL (
1.5 Core Web Technologies
The W3C recommends a standard stack of technologies to build the web:
- HTML (HyperText Markup Language): The standard markup language that defines the structure of raw text. Uses tags to tell the browser how to display content.
- CSS (Cascading Style Sheets): Defines the appearance (color, whitespace, font, layouts). It separates content from presentation, making responsive design and accessibility much easier.
- JavaScript (JS): A client-side, imperative, dynamically-typed scripting language that defines the behavior of the site. It can dynamically change HTML content, attributes, and CSS styles.
- DOM (Document Object Model): A platform- and language-neutral interface that treats HTML/XML documents as a tree structure, allowing scripts (like JS) to dynamically access and update content, structure, and style.
- PHP: A server-side scripting language (Hypertext Preprocessor) used to dynamically generate content before it is sent to the client's browser.
- MIME Types (Internet Media Types): Specifies the data type of resources sent over the web so the browser knows how to handle them. Examples:
text/html(.html),text/plain(.txt),image/jpeg(.jpg).
1.6 Web Development Principles
When creating a website, it must be attractive, functional, and user-friendly.
- Initial Planning: Always start by defining exactly what the website is and who the audience is. Design your navigation based on this audience.
- KISS Principle (Keep It Simple Stupid):
- Avoid excessive video and audio.
- Choose familiar and appropriate fonts and colors.
- Use high contrast and plenty of whitespace.
- Ensure fast load times.
- Use a fluid layout that adapts to different screen sizes (Responsive Design).
- Use open standards and test your site across multiple different web browsers.
Note: The chapter concludes with a self-study reading assignment on IP addressing, DNS (Domain Name System), and HTTP Status Codes.