Why would you want to learn web development? You probably already have a firm preconception of what the web offers and of the different components that can make up web pages and you know want to learn how to build these things yourself. I most appreciate textbooks that develop these notions into more comprehensive understandings before they teach you how to best realize them with state-of-the-art tools at the reader's disposal. Unfortunately, Learning PHP, MySQL and JavaScript wasn't this.
It makes for a reading experience that comes close to browsing through online documentations. There are no exercises that actually have you write code. Instead, there are only the Questions sections at the end of each chapter, exercises of the first problem set in an exam variety. Solving these improves your theoretical understanding, but you won't gain any experience in building websites (or even coding in general).
It's only on page 243 that you are presented with the first somewhat real-world practical example. Until then the listings literally receive names like `test.html` that will probably cause your brain to perceive them as dull and without the involvement of actual learning. If you ever visited a programming class (or worked through an online tutorial) I'm sure you are familiar with the unit-conversion problem. The given textbook gives us a strikingly uninspired attempt to liven things up: "for a bit of fun, can you find a value for which Fahrenheit and Celsius are the same?" I don't see how this makes you a better web developer.
There are some puzzling aspects about even the better examples. Example 16-3 presents a somewhat lengthy case of form handling. Still, the author didn't put in the code to handle the case when the program is called up for the first time. Of course, you will encounter this scenario for logical reasons. If you don't scroll down and read the warning you might wonder why you get all the errors after you ran the example on your own computer – that's perfectly normal. You might argue it would have distracted from the main points of the example; still, the main point should be to create a realistic form.
What is worse, there are examples that explain bad practice. For instance, in the section on MySQL there is a case that only works because the example was arbitrarily designed so that the years were coincidentally unique. Similarly, sometimes it's difficult to understand the point behind examples. The combination of a `customers` table and a `classics` table is a good case in point. The example intents to show how to combine tables using SELECT, and it does. But the result has a row like "Mary Smith, Jane Austen, Pride and Prejudice", which is barely meaningful. It fails to explain the rationale for using the command in the first place.
There was another example that left me a bit puzzled: "In Chapter 9, I talked about First, Second, and Third Normal Form. You may have noticed that the classics table doesn’t satisfy these, because both author and book details are included within the same table. That’s because we created this table before encountering normalization. However, for the purposes of illustrating access to MySQL from PHP, reusing this table avoids the hassle of typing in a new set of test data, so we’ll stick with it for the time being." I can somehow see the rationale. Still, isn't this basically saying that the example isn't very good, but it would be too much of a hassle to compose something that better exemplifies good practice?
It's not only the examples that leave you wanting. There is a section on how to set up your computer to start getting your hands dirty. Or so it says. For Linux users there is only the remark that there are too many distros and that the author cannot be bothered to explain it for the lot of them. While it's technically true that there are many distros, most users will run a Debian derivate like Ubuntu or Linux Mint. Moreover, I'm sure that there are many similarities between the different environments, so that you can have three code listings for Arch-based, Debian-based and Fedora-based installing the required software and then point to the different locations of the same files. As it stands, the whole chapter could have been removed as it leaves inexperienced users with the impression that setting up the system was more difficult than it actually is.
The subpar examples and the (lack of) exercises are not the only reason why this wasn't a very practical or hands-on introduction. The titles are not problem-oriented, but the text is structured by commands. For instance, it often has things like "UPDATE...SET" rather than saying what exactly you can accomplish with a command like this. I prefer textbooks that tell you how to do things, instead of teaching you linguistic knowledge of a computer language. When facing a problem in your day-to-day programming you would search for documentation online rather than picking up a textbook again.
Some concepts are explained at surprising places. The `in` keyword – as to be used with a `for` loop – is not mentioned in the section about loops, but buried in the next chapter under "Associative Arrays". This is especially surprising given the fact that this kind of arrays are not actually built into JavaScript, at least not in form of straight-forward syntactic sugar. Given how often you would use this `for each` kind of loop (well, so I suppose?), I don't think that this is a very well motivated style of presentation.
At the end of a section on XML there is a single sentence that points out that most developers now use JSON (which is true). The author then goes on – to not explain JSON. Perfect, I thought to myself. Now I'm perfectly capable to apply the method only few people use, and I even know the name of the method that most people use! In a similar vein, I don't like how more advanced topics are treated. CSS3, jQuery, and HTML5 there are entire chapters that read like the release notes. I honestly wouldn't be surprised if the author actually expended on them in writing these sections.
This all being said, it does offer helpful explanations on many topics. Especially the sections on security and form handling can function as good reference points. The concise introduction on regular expressions was very well-written, too. But as always with these almost all-encompassing overview books, don't expect to learn the underlying ideas of object-oriented programming or database design. Above I called this a documentation-style work – which can be done better or worse. This is certainly among the better.
So, you want to build something cool while learning new stimulating ideas and best practices? Then you should buy another book. As a reference manual it does a solid job, though.
Rating: 2/5