Home / Making PHP a snap

Making PHP a snap

Please Share...Print this pageTweet about this on TwitterShare on Facebook0Share on Google+0Pin on Pinterest0Share on Tumblr0Share on StumbleUpon0Share on Reddit0Email this to someone

Ever since the early days of the internet, literally anybody who has wanted a website of his or her own has been free to create and post one. The dotcom boom has proven this to be the case, without question, and being a web designer or programmer is certainly lucrative, if you can find work.

So, with so many people out there attempting to create websites for themselves and their businesses, all you have to do is just a little browsing and clicking to find a website or two–or a hundred–that, frankly, could use more than a little work. And with good reason, too–web standards seem to be changing all the time, plus learning a new programming language seems daunting, especially when you have little or no experience writing programs, let alone designing websites.

Enter O’Reilly, then, which is probably the best-known of all technology and web-focused publishers. (How can you not notice the random animals on the covers of their books?) One of their newest releases, Learning PHP 5 by David Sklar, is an approachable and surprisingly svelte volume, and is a great place for web programming novices to begin.

But first, a word about the subject at the heart of the book. PHP is a powerful open-source web programming language, renowned for its versatility and its (relative) simplicity, and is a great place for those of us (yes, me included) who just don’t really “get” programming. Let’s face it, here–I failed pre-calculus in high school, and have to use my fingers to add and subtract. Programming is not, and never has been, my forté–making me the ideal candidate to try this book out.

An important side note–PHP 5 is the newest release of the PHP software, but this book is equally applicable to earlier versions of PHP. Commands that are PHP 5-only are denoted early on in the text, so there’s no confusion as to what will and won’t work with your server’s setup.

Enter Sklar’s book, which is about as non-confrontational as they come. The chapters are short and to-the-point, working in sequence beginning with PHP basics and syntax, and then advancing to such relatively nebulous topics as working with and connecting to databases (focusing primarily on MySQL). An inexperienced programmer can easily follow along, though Sklar does move quickly, and I did find myself re-reading passages here and there when I didn’t easily grasp a concept at first.

There are a number of exercises included, which are invaluable–however, a couple of the examples are a little confusing (the running example of developing a PHP program for an Asian restaurant, for instance, isn’t always the most clear-cut or well-suited for the concepts being discussed), but there’s never any question as to why something works the way it does. With careful reading, an aspiring PHP programmer will have no trouble understanding the examples.

While this book does provide a good strong foundation for understanding PHP, and Sklar does an excellent job of identifying potential security holes or pitfalls that can commonly be written into PHP programs inadvertently, don’t expect to be able to create elaborate, flawless programs–there’s just not enough room inside of the book’s 350 pages to cover every single command and library that PHP includes or understands. But, never fear–Sklar has conveniently suggested any of a number of additional volumes and websites where you’ll find just about all the help you’ll need. Plus there are any of a number of additional bonuses, including appendices that contain step-by-step directions on how to install PHP on your own web server.

So if you’re not technically inclined but you’d like to give PHP a shot, either just out of curiosity or because you’d like to build an application or two for your website, Sklar’s book provides the foundation you’ll need and is a good way to get your feet wet. Plus, when you’re ready to go a little bit deeper, he’ll point you in the right direction. You can’t go wrong using this volume as a starting point.

Powered by

About Ryan Eanes

  • Temple, I hate to burst your bubble, but I doubt one can really understand PHP from reading even a good book. I’ve taken a couple classes, including an O’Reilly seminar. You might want to look into that. If you live in or near a city, there should be some available at colleges or related to computer stores or user groups.

  • Cool, they may have a new customer. I need simple 🙂

    Thanks for reply.

  • While I have not designed a full website with PHP yet, I have used it for a few domain-related tasks (e.g., using it to redirect one domain name to a lower-level directory, etc.)–that was PHP 3, however, and from what I understand v5 seems to be a little more robust and fleshed out than earlier versions.

    I think really it’s just a matter of what you’re comfortable with. The book does, indeed, provide a strong enough foundation to begin dabbling with PHP, and will point you in the right direction when you’re ready to learn more.

    As to why PHP, I can tell you that, according to Zend (http://www.zend.com/why-php.php), PHP is present on over 42% of Apache web servers–the most common server running on the Web, and the use of PHP is still on the rise. Really it boils down to what you want to learn; while PHP and ASP and, say, JSP all have their strengths and weaknesses, so do C++ and C# and the like.

    And yes, PHP is OS-independent–I have a Mac as well. PHP is a server-side language, so the commands all run on the server and not on the client’s machine.

  • So good, even I could master this? I ‘ve got all the other HTML tools and programs (Dreamweaver, Flash, Fireworks MX package, Photoshop – only misisng a complete lack of uderstanding of anything CSS ort PHP or ASP.

    Have you designed a site or a page with this? What, also, if I may, is the benefit of php over others? I see this site – blogcritics – is php-enabled (if that’s the right phrase). Why?

    Oh and I’m pretty sure I know the answer is, yes, but this book is good for Macs, too, right?