CHAPTER 13Web Database ApplicationsMySQL’s most common use is in wePHPMyb database applications. It’s often teamed with PHP—a web-enabled scripting language—and the Apache web server to develop powerful applications including online shopping, news, sports, and blogs. Indeed, the
Apache
web server, MySQL, and PHP together form three of the four components of the most popular of all web development platforms, LAMP. The L stands for Linux,
but the material we cover here works with all three operating systems
we look at in this book Linux, Windows, and Mac OS X.
The LAMP acronym is increasingly interpreted rather loosely as representing any open source development platform for web database applications. The Pis alternatively taken to stand for Perl, which we introduce in Chapter 16; Python or another of the popular web programming languages. Similarly, MySQL can be replaced by another
open source database system, PostgreSQL (
http://www.postgresql.org). PostgreSQL is less popular than MySQL, but it has strong standards compliance,
is rich in features,
and has looser licensing conditions, making it more appropriate for some applications.
We introduce the following concepts in this chapter Components of a web database application An overview of the Apache web server An overview of the PHP language,
including short examplesThe final section of this chapter lists resources where you can find out more about
Apache and PHP. We’ll look at several PHP examples but will leave detailed explanation of using PHP and MySQL to Chapter 14, and will build a complete application with these in Chapter 15.
Building a Web Database ApplicationThis section gives an overview
of web database applications, drawing analogies and contrasts to the conventional software that you use on your computer. As an overview,
it doesn’t discuss technical details in depth we get to the details later. How Web
395 Software Works briefly explains how web software works and shows you the steps that occur when a user clicks on a link in his web browser. In “Three-Tier Architectures we discuss web database applications more formally, describing the three-tier architecture
model and how MySQL, PHP, and Apache fit that model.
We’ll assume in this and the next two chapters that you’re familiar with basic programming concepts, including loops, conditionals, and expressions. We’ll also assume you’re
familiar with the Web and, in particular, that you understand the basic principles of HTML markup. It doesn’t matter if you don’t know the details of the HTML standard, but we expect you’ll understand HTML when it’s shown to you. If you’ve never programmed or don’t
know HTML, then we advise you to use one of the resources listed in Resources at the end of this chapter before reading this and the next two chapters.
Share with your friends: