HTML, XHTML and CSS All-In-One for Dummies - Andy Harris [323]
♦ Clients can be turned off without penalty. It doesn’t really cause anybody else a problem if you turn off your computer. Generally, client machines can be turned off or moved without any problems.
Servers are the machines that typically host Web pages. They have a much different set of characteristics:
♦ Servers are controlled by server administrators. A server administrator is responsible for ensuring that all data on the server is secure.
♦ Servers have permanent connections. The purpose of a server is to accept requests from clients. For this reason, a server needs to have an IP number permanently assigned to it.
♦ Servers usually have names, too. To make things easier for users, server administrators usually register domain names to make their servers easier to find.
♦ Servers can access other programs. Web servers often talk to other programs or computers (especially data servers).
♦ Servers must be reliable. If a Web server stops working, anybody trying to reach the pages on that server is out of luck. This is why Web servers frequently run Unix or Linux because these operating systems tend to be especially stable.
♦ Servers must have specialized software. The element that truly makes a computer a server is the presence of Web server software. Although several options are available, only two dominate the market: Apache and Microsoft IIS.
Parts of a client-side development system
A development system is made up of several components. If you’re programming on the client (using XHTML, CSS, and JavaScript), you need the following tools:
♦ Web browsers: You need at least a couple of browsers so that you can see how your programs behave in different ones. Firefox is especially useful for Web developers because of its numerous available extensions.
♦ Browser extensions: Consider adding extensions to Firefox to improve your editing experience. Web Developer, Firebug, and HTML Validator are extremely helpful.
♦ Text editor: Almost all Web development happens with plain-text files. A standard text editor should be part of your standard toolkit. I prefer Notepad++ for Windows and prefer VI or Emacs for other operating systems.
♦ Integrated Development Environment: Komodo Edit and Aptana Studio are specialized text editors with added features for Web programming. They understand all the main Web languages and have syntax help, code coloring, and preview features. Using one of these tools can be extremely helpful (both are free.)
For client-side development, you don’t necessarily need access to a server. You can test all your programs directly on your own machine with no other preparation. Of course, you’ll eventually want a server so that you can show your pages to everyone.
The client-side development tools listed here are described in more detail in Book I, Chapter 3.
Parts of a server-side system
When you start working on the server side (with PHP, MySQL, and AJAX), you need a somewhat more complex setup. In addition to everything you need for client-side development, you also need these items:
♦ A Web server: This piece of software allows users to request Web pages from your machine. You must either sign on to a hosting service and use its server or install your own. (I show you both techniques in this chapter.) By far the most common server in use is Apache. Web server software usually runs all the time in the background because you never know when a request will come in.
♦ A server-side language: Various languages can be connected to Web servers to allow server-side functionality. PHP is the language I chose in this book because it has an excellent combination of power, speed, price (free), and functionality. PHP needs to be installed on the server machine, and the Web server has to be configured to recognize it. See Book VI, Chapter