PHP and Other Server-Side Technologies

Server-side web technologies enable the web server to do much more than simply returning the requested HTML files, such as performing complex calculations, doing object-oriented programming, working with databases, and much more.
Just imagine how much data processing Amazon must do to calculate personalized product recommendations for each visitor, or Google when it searches its enormous database to serve your request. Yes, server-side processing is the engine that caused the web revolution, and the reason for which Internet is so useful nowadays.

The important thing to remember is that no matter what happens on the server side, the response received by the client must be a language that the client understands (obviously)—such as HTML, which has many limits, as mentioned earlier.
PHP is one of the technologies used to implement server-side logic. Chapter 3 will serve an introduction to PHP, and we’ll use PHP in this book when building the AJAX case studies. It’s good to know, though, that PHP has many competitors, such as ASP.NET (Active Server Pages, the web development technology from Microsoft), Java Server Pages (JSP), Perl, ColdFusion, Ruby on Rails, and others. Each of these has its own way of allowing programmers to build server-side functionality.
PHP is not only a server-side technology but a scripting language as well, which programmers can use to create PHP scripts. Figure 1.2 shows a request for a PHP page called index.php.This time, instead of sending back the contents of index.php, the server executes index.php and sends back the results. These results must be in HTML, or in other language that the client understands.
On the server side you’ll usually need a database server as well to manage your data. In the case studies of this book we’ll work with MySQL, but the concepts are the same as any other server. You’ll learn the basics of working with databases and PHP in Chapter 3.
However, even with PHP that can build custom-made database-driven responses, the browser still displays a static, boring, and not very smart web document.
The need for smarter and more powerful functionality on the web client generated a separated set of technologies, called client-side technologies. Today’s browsers know how to parse more than simple HTML. Let’s see how.

Tags: ,

Leave a Reply