Follow Slashdot stories on Twitter


Forgot your password?
Programming Books Media Book Reviews IT Technology

Core Web Application Development with PHP & MySQL 149

jsuda writes "Core Web Application Development with PHP and MySQL is an intermediate to advanced-level guide for programmers and developers. It bills itself as >everything one needs to know about building robust database applications. That is a bit of puffery but this is a comprehensive practical guide for designing and building production-quality, database-enabled applications." Read the rest of John's review.
Core Web Application Development with PHP & MySQL
author Marc Wandschneider
pages 912
publisher Pearson Education
rating 8
reviewer John Suda
ISBN 0131867164
summary Fine strategic overview

The author is an open-source platform expert and software developer. He comes from a background of working with standard desktop Windows-based applications and made the transition to building dynamic web applications. His experience in making the transition informs this book as a comprehensive explanation of how to use the various technologies that go into writing web applications. For those making similar transitions, this is a very fine presentation done by a thoughtful, systematic designer. For those already busy in the PHP/MySQL area, the advanced level of instruction is likely to be valuable.

The emphasis is on open-source applications, particularly PHP5 and MySQL in an XHTML/Javascript environment. But, beyond technologies, the author's focus is on the strategies and systematic approach one needs to design and implement successful web applications. He writes for an advanced audience which is already basically familiar with programming and XHTML. Those writing or planning dynamic web applications will benefit most from the book.

There are 33 chapters in five parts - basics of PHP, database basics, planning web applications, implementation, and sample projects. There are three appendices covering installation and configuration of PHP, MySQL, and other related open-source applications like Apache, a set of charts of database function equivalents among the leading database types - MySQL, Oracle, PostgreSQL, Microsoft SQL Server, and a short list of recommended reading.

This is a large format book of 912 pages, including index. My reviewer's copy is a prepublication version containing grayscale graphics and much white space, especially around the code snippets, making reading easy and comfortable. Although the material is high-level and technical, the writing seems light and casual. Wandschneider's writing style flows easily, never bogs down even with technical details, and the book reads much faster than one might expect.

Although the best part of the book contains the three start-to-finish sample projects at the end - a calendar system, weblog engine, and e-commerce store, the lead-in chapters are nicely done, too. Chapters 1 and 2 are about getting started in PHP. There is a brief comparison to perl and C++, but the bulk is about PHP terminology and programming concepts. Much is made of PHP5's new object-oriented features, but the discussions of that here (and in Chapter 4) was about the only parts which I feel needed more clarity - the rest of the chapters are very clearly stated and contain plenty of good examples.

Chapters 3 - 7 continue with scripting concepts like functions, classes, arrays, strings and characters. The discussion is not designed to instruct comprehensively about PHP itself but works on a higher level of showing how PHP interacts with MySQL and other technologies on an overall basis. You can get detailed PHP coding instructions elsewhere. Chapter 6 contains an unusually good discussion of character sets, usable for global applications, and provides instructions on configuring Unicode and multi-byte support for high-level applications.

Part 2, Chapters 8 - 12, take the same approach to MySQL and databases in general. They include discussion of basic terminology and concepts, designing and creating databases, storing and retrieving data, PHP-to-database connectivity, and advanced topics, like use of "transactions" and advanced querying.

Part 3, Chapters 13 - 17, deal with the server-side matters. Again, the level of presentation is not on comprehensive details of PHP, MySQL, and web services, but present a comprehensive overview to guide planning, design, and implementation. Here the author states overall design considerations of a website noting how to incorporate CSS, HTML, code libraries, user interfaces, and web services into a working dynamic website.

User management and security concerns are noted throughout the book and Chapters 14 - 17 deal specifically with validation, and software and hardware security, including tips on how to secure your server. These passages on security are some of the better and clearest written I've experienced in this area.

Part IV continues the systematic approach to website construction discussing error handling, debugging, cookies, and sessions (again some of the clearest explanations I've read), authorization, and data validation with regular expressions. Chapter 21 is entirely about globalization and localization that is, dealing with the fact that the Internet is global and that there is a need to deal with foreign language sets. There are tips on how to determine users' locations and how to script to account for different language sets, including Unicode.

Chapters 23 and 27 are about XML and are especially useful now that XML and XHTML are becoming the reigning protocols of dynamic web activity. There is an extensive sample of using XML to work with the Google API. Using XML with PHP is an advanced topic and it is only generally covered here, together with XML web services and SOAP. Other chapters cover the use of extensions to PHP, like PEAR, developing a coding "style", creating test suites, configuring PHP.ini, and more. The three working examples are extensively commented and contain complete code examples.

The book comes with a comparison CD-ROM containing all of the sample code, and versions of PHP5, MySQL, and Apache HTTP server."

You can purchase Core Web Application Development with Php & MySQL from Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.

Core Web Application Development with PHP & MySQL

Comments Filter:
  • by Anonymous Coward
    Must take up a lot of shelf space.
  • What, no AJAX? (Score:5, Insightful)

    by WVDominick ( 860381 ) on Monday December 19, 2005 @02:52PM (#14292821) Homepage
    An honest question for anybody to answer. Do most people still learn by picking up a 900+ page book rather than learning from example? I find most technical books extremely difficult to finish so I very rarely attempt to read them.
    • Re:What, no AJAX? (Score:5, Insightful)

      by op12 ( 830015 ) on Monday December 19, 2005 @02:56PM (#14292868) Homepage
      Learning from examples and code snippets is one thing, but learning to code robustly is another. I think that is the emphasis here. Plus, as mentioned, "Although the best part of the book contains the three start-to-finish sample projects at the end - a calendar system, weblog engine, and e-commerce store, the lead-in chapters are nicely done, too...The three working examples are extensively commented and contain complete code examples."
      • Re:What, no AJAX? (Score:3, Informative)

        by WVDominick ( 860381 )
        While I agree with you that it will take a while to become an expert coder by just learning from examples, but the same can be said for reading multiple 900 page books on the subject. Maybe it's just me, but I don't enjoy trudging through tons of text when I can just open up some code and go to work.
        • Re:What, no AJAX? (Score:2, Insightful)

          by Anonymous Coward
          Here's a tip: skip stuff you already know

          Most books like this are at least 1/3rd boilerplate. Learn to skim.
          • That I do, but is a book about programming really necessary with the abundant information out there on the internet? I would also like to clarify that I'm sure this is a good book and some people may find it very useful.
            • Yes. As soon as you start digging into more advanced topics, books can really help. When you're doing things like PHP, which is practiced by lots (millions?) of people out there, I personally feel that a book can be handy for people that want one central place of a lot of information, but not necessary to learn to master the language properly...

        • Re:What, no AJAX? (Score:3, Insightful)

          by Anonymous Coward
          I don't enjoy trudging through tons of text when I can just open up some code and go to work.

          But, as soon as the code stops working, you're stuck because you don't really understand what the code does. IMHO, this is just an instance of the "cargo-cult programming" problem. Yes, you can copy/paste a great application within the hour, but you lose maintainability and scalability, mainly because you have no idea what's happening behind the scenes.

          Nothing really substitutes a good understanding of what you
          • Why do you need a book for that? I tend to use other resources precisely because I can dive in as far as I want, past what any single book would contain, in order to understand anything I come across that doesn't quite make sense yet. It's much cheaper to get this information from places other than one-book-per-technology.
    • I use a book for some things (Such as date widgets), and to pick up best practices, but learn how to build applications from ripping existing applications apart.

      I think it's down to the individual. Some need to see the whole thing laid out to see how it works, others can just frig existing things until they fit. But never underestimate the value of a reference book.
    • I think your comment is especially true when it comes to PHP and MySQL. The websites for PHP and MySQL have a massive amount of information and documentation which could replace several books written for them already. The comments in their documentation on the two websites posted by users is even more useful:

      MySQL documentation []
      PHP documentation []
    • To quote someone from a recent training course I went on 'Learning by example is good, but sometimes it's better to learn by reading. For instance, if the sign says Alligator Infested Waters you're better off learning from other people's experience'. Personally, yes, I still buy lots of technical books, and find a lot that is useful in them, saving me time from hitting the same problem. I don't think there's been one I've finished, but I've certainly finished chapters on topics I was interested in and weak.
  • Debugger (Score:3, Interesting)

    by truz24 ( 800762 ) on Monday December 19, 2005 @02:57PM (#14292874)
    Does anyone know of a good debugger for PHP applications? I'd like to be able to step through the execution of a php script...
  • Multi-tier (Score:5, Insightful)

    by Spy der Mann ( 805235 ) <spydermann.slashdot@ g m> on Monday December 19, 2005 @03:04PM (#14292949) Homepage Journal
    I can't understand how a book which (according to the review) doesn't have a chapter dedicated to the concept of "multi-tier programming", can have the presumption to say it's '>everything you need'. Heck, it doesn't even MENTION templates.

    As some of you know, multi-tier applications have (at least) 3 tiers: Database, business-logic, and interface. Java guys know this better: Model-View-Controller.

    I have implemented for my webapps an MVC framework, and maintaining them or modifying them is a piece of cake. It's so easy i get bored with it sometimes.
    In comparison, recently I've had to adapt the OSCommerce 2.2MS2 (built in PHP) for one of our clients' store. Every single php file in it has database, business-logic and interface ALL MIXED. The only separation they have is wrappers around SQL functions (that's not true separation, but a mockery). Maintaining it is a LIVING NIGHTMARE.

    So please do yourselves a favor: Study the MVC approach and implement an MVC framework in PHP. You can use any templating library you can find. (for database, i use an adapted version of phplib's sql library). This alone has saved me not hours, but weeks of work, and is worth ">everything" you could learn from that book.
    • Agreed. That's the way most database applications should be build if maintenance is high on the priority list.

      Also: PLEASE MAKE USE OF GOOD DATABASE CONCEPTS. Foreign keys are there for a reason you know and they become really important if the application reaches a particular size. Study triggers and stored procedures. Look at the SQL execution path for hints to optimize the SQL query.

      And please, MAKE USE OF GOOD DATABASE DESIGN CONCEPTS. It's amazing howmuch redundancy is build in present database applicat
      • Re:Multi-tier (Score:2, Flamebait)

        by temojen ( 678985 )
        So what you're saying is... Don't use MySQL.
        • I was referring to some good DB practices, nothing more.

          People should make their own opinions, not repeat others.

          PS: I'm a DB2 fan

          • Re:Multi-tier (Score:3, Interesting)

            by temojen ( 678985 )
            Fun things like (enforced) foreign keys, triggers, stored procedures, query analysis, etc aren't easy on any but the latest MySQL incarnations. But it helps to have taken a course or two in databases (mine used DB2, but I prefer PostgreSQL now as I'm now more familiar with it) so that you know that these (plus normalization) are good ideas.
        • Re:Multi-tier (Score:3, Informative)

          by julesh ( 229690 )
          So what you're saying is... Don't use MySQL.

          I'm not sure what you're talking about [].
      • Study triggers and stored procedures.

        Eww...No. Don't do this. Stored Proc's and especially triggers can become a maintainability nightmare. Putting logic into the database that goes beyond maintaining the referential integrity of data should only be done when you know that you need to do it for performance reasons. Otherwise, do it in the core language you're using to develop your site. This can save a lot of hassle and keep your app much more portable. My usual approach is to develop all logic outsid
    • I fucking hate them. Not as much as I hate people that preach about database abstraction but I do fucking hate them.

      Why? Because of maintenance. But templates are supposed to make it easier to maintain aren't they.

      No. Templates are there to add another layer of complexity to an app. Seperating the html from the php so that the designers are not confused? Hire better designers. Easily allow you to modify the site?

      Well yeah if you think changing the color is a modification that should be in the html (shoul

      • Re:Yuck templates (Score:3, Informative)

        by bobdinkel ( 530885 )

        Database Abstraction:
        For the most part, I think you're right on about database abstraction. The vast majority or apps will never change databases. However, I think a great deal of the appeal of most DB abstraction packages is the functions. Most packages allow you to get just a single value without having to do a lot of the crap that you would normally have to do. For example, something like this:

        $myVar = $db->get_var('SELECT foo FROM bar WHERE baz='123');

        Or you can get results returned as an associ

        • I've never found any DB abstraction that was better than my homebrew. // Put in global include or instantiate as needed
          $MySQL = new mysql_connect(); // optional: user,pass,server,db params

          $query = "select foo from bar";
          $MySQL->query($query); // I intuitively "see" the difference between a method and var when reading code
          $row = $MySQL->get_row();
          Everything MySQL can tell me, the object knows or can figure out from the query itself...yes I substr out the type
      • Re:Yuck templates (Score:2, Informative)

        by Anonymous Coward
        I find this attitude prevalent in people that do mostly procedural programming for smaller web sites. I can only say that this sort of hostility towards the more academic and sophisticated aspects of software engineering will only hurt you in the end. Punk rock programming is cool if that's your thing. If you want to build sophisticated web application correctly, you will need to learn and use OOP, MVC frameworks and relational database design. That's cold hard truth brother. Good luck!
      • As for the whole saving you hours of work deal. At how many hours cost? I once read a quote that went something like this, "Do not code for code re-use unless you know in advance you are going to re-use it at least 3 times. Else the time coding for re-use will simply not recovered".

        I use my framework in 5 different intranet developments (two for the same company), so yes, it has saved me a lot of time.
        In fact, to start a new development, I just copy the code from the OTHER development and just erase the par
      • Perhaps I just build my sites wrong, I tend to make the html and php far to intertwined with a lot of the html being build by the code not just the php filling in certain blanks.

        You're right. You build your sites wrong. :)

        I also think you're confused about what templates are used for. They're not just there to separate HTML and PHP code, but to separate data code from presentation code. These are not the same things.

        You can have php code which manipulates data (eg. database interaction) and php code whi

  • by ackthpt ( 218170 ) * on Monday December 19, 2005 @03:13PM (#14293054) Homepage Journal
    Should include a chapter related to when to roll out changes and when not to.

    Ebay changes their site, a week before Christmas. These people are stupid. These people are astoundingly stupid. If you looked up STUPID in the dictionary it wouldn't have the eBay logo, but direct you to an encyclopedia which has more space to go on about their profound acts of stupidity, when they've been stupid, how they've been stupid and how they've often failed to repeal their stupidity or even learn from it.

    They aren't the only guilty ones. Less is More and too often I've had to deal with sites poorly constructed, as replacedments for sites which worked quite well.

    Probably more along the lines of programing and some Gee-Whizzy things, but every web programming book should dedicate a chapter on when and how to make changes and common pitfalls to avoid.

    • by arudloff ( 564805 ) * on Monday December 19, 2005 @03:23PM (#14293148) Homepage
      Christmas is by far e-bay's lowest traffic of the year.. There's a bunch of charts showing the huge drop off, year after year, on the number of auctions starting about a week before christmas..

      If someone has the link, post it? I'll see if I can dig it up.
      • Christmas is by far e-bay's lowest traffic of the year.. There's a bunch of charts showing the huge drop off, year after year, on the number of auctions starting about a week before christmas..

        If someone has the link, post it? I'll see if I can dig it up.

        I'd like to see that. With all the time off work I imagine people spend more time online, shopping. I've moved a few things and find I tend to buy quite a bit over the period (often more than I should :-)

        I think their biggest slack time is during th

      • Actually, it looks like traffic is still climbing []. Last year there appears to have been a drop-off in September or so, but that also was climbing during the holidays.
    • Ebay changes their site, a week before Christmas. These people are stupid.

      At a company the size of Ebay, typically web developers don't call the shots on when the changes will occur. This books is for web developers, not managers.
      • At a company the size of Ebay, typically web developers don't call the shots on when the changes will occur. This books is for web developers, not managers.

        Sure, but if managers are so stupid as to propose changes at critical junctures, where are they going to learn if not from the programmers who say, "You really can't mean this. You can't really mean to roll out big changes during the biggest commercial period of the year and when a lot of staff will be on vacation. You really can't be serious." Or h

        • Sure, but if managers are so stupid as to propose changes at critical junctures, where are they going to learn if not from the programmers...

          Didn't you get the memo? Management knows best, there is nothing they can learn from FTEs, never-mind programmers of all people. Now about that TPS report...
    • > If you looked up STUPID in the dictionary it wouldn't have the eBay logo

      and that logo would be just bellow's, right?
      • | > If you looked up STUPID in the dictionary it wouldn't have the eBay logo
        | and that logo would be just bellow's, right?

        Seems to me that "nazsco" would qualify in the "illiterate" category, using
        his "bellow" (as in accordian or glass blower) example as supporting evidence.
  • by __aaclcg7560 ( 824291 ) on Monday December 19, 2005 @03:41PM (#14293298)
    I guess someone is rehashing this review. If you stroll down the Amazon page [] for this book, you get the same review text found in this Slashdot article but dated 10/30/2005. So much for submitting an original review. Then again this is Slashdot.
  • "Core strategic web application paradigm development with AJAX, Synergistic go-to-market edition"
  • Having written a blog engine [] myself using PHP and MySQL and given it away as open source, I'm wondering what he calls "robust code" too... I'm a professional developer in the daytime, and no book code I have ever seen has been good enough for other people to pick up easily (not enough conventions etc).

    If you're interested in my project by the way, head on over to the PluggedOut Blog [] project.

  • by Anonymous Coward
    Save yourself $7 by buying the book here: Core Web Application Development with PHP & MySQL []. And if you use the "secret" discount [], you can save an extra 1.57%!
  • PHP programming is becomming about the libraries. Smarty [] - a template library makes putting coherent websites together easier. Although it doesn't do anything for the database part of the site, its one less thing to worry about.

    PEAR confused me and I was programming before it so I have my own libraries. The php web documentation is excellent.

    although the java studio creator is now free, and seems like an amazing tool, its not enough to get me away from php
    http://developers.sun []
  • Finally! (Score:4, Insightful)

    by Qbertino ( 265505 ) <> on Monday December 19, 2005 @05:27PM (#14294215)
    A book on PHP and MySQL. I've been waiting for this for ages!
    Really, this is just what we needed.
    • Um, I think the parent is being sarcastic. But then maybe the 4 - insightful rating is sarcastic too.

      We're all too postmodern to be sure these days.
  • review & book (Score:2, Informative)

    by SebNukem ( 188921 )
    MINUS: if i wanted to read the Table of Contents, I would go to google print or B&N - what a worthless review.
    PLUS: I own this book. It's actually very good.
  • I hates the MySQL and PHP is insecure. I know we've done this a billion and two times but I like to pretend people still care!!! $OtherDb is so much better and if you are not useing $LatestLang|$OldTymeLang you are wrong.


Our business in life is not to succeed but to continue to fail in high spirits. -- Robert Louis Stevenson