Not as catchy as the Beatles' Revolution, even if the meter works.... oh well....
Continuing from the first post in this tutorial. What do I think is important when starting to demonstrate some code? As with most writing, it depends on the audience. For the purpose of this series of posts, I'm assuming that you fit comfortably in or near the following:
- You're comfortable with HTML and XML doesn't make you run screaming from the room;
- You have a basic understanding of databases; you've run across SQL before and understand the basic concepts;
- You understand PHP; you've written some code before;
- You understand the concepts of "object-oriented development", "patterns", "best practices" and ideally "test-driven development" (usually abbreviated as "TDD"), even though you may not have loads of experience (yet) with them; and crucially
- You want to improve your ability to write code that you can refine and possibly reuse over time.
The assumption that you know or at least are interested in PHP is a given, since that's the language we'll be using here.
What will you need to have installed and available to follow along?
- Access to a system with PHP 5.2 or higher, available both from the command line and the Web server (via a module or CGI);
MDB2_Driver_mysqlmodules installed and available;
- A text editor of your choice;
- The ability to create PHP scripts and HTML files and have those accessible from the Web server as well as the command line.
These should all be pretty obvious to more experienced PHP developers, but making sure that we're both operating from the same set of assumptions — and no others — greatly reduces the likelihood of confusion and breakage along the way. Many of you haven't yet dealt much with unit tests using PHPUnit or similar systems; that's going to be a starting point for us.