Specifications
In the earlier parts of this book, we’ve discussed various components of and uses for PHP and
MySQL. Although we’ve tried to make all our examples interesting and relevant, they have
been pretty simple, consisting of one or two scripts of up to 100 or so lines of code.
When you are building real world Web applications, things are rarely this simple. There was a
time a few years ago when an “interactive” Web site had form mail and that was it. However,
these days, Web sites have become Web applications—that is, a regular piece of software deliv-
ered over the Web. This change in focus means a change in scale. Web sites grow from a hand-
ful of scripts to thousands and thousands of lines of code. Projects of this size require planning
and management like any other software development.
Before we move on to look at the projects in this section of the book, we’ll look at some of the
techniques you can use to manage sizable Web projects. This is an emerging art and it’s obvi-
ously difficult to get it right: You can see this by observation in the marketplace.
In this chapter, we’ll look at
• Applying software engineering to Web development
• Planning and running a Web application project
• Re-using code
• Writing maintainable code
• Implementing version control
• Choosing a development environment
• Documenting your project
• Prototyping
• Separating logic, content, and presentation: PHP, HTML, and CSS
• Optimizing code
Applying Software Engineering to Web
Development
As you probably already know, software engineering is the application of a systematic, quan-
tifiable approach to software development. That is, it is the application of engineering princi-
ples to software development.
It is also an approach that is noticeably lacking in many Web projects. This is for two main
reasons:
The first reason is that Web development is often similar to the development of written reports.
It is an exercise in document structure, graphic design, and production. This is a document-
oriented paradigm. This is all well and good for static sites of small to medium size, but as we
Building Practical PHP and MySQL Projects
P
ART V
460
28 7842 CH22 3/6/01 3:37 PM Page 460










