Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
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 bn.com. 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:
  • Re:What, no AJAX? (Score:3, Informative)

    by WVDominick ( 860381 ) on Monday December 19, 2005 @03:00PM (#14292915) Homepage
    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.
  • Help is at hand (Score:2, Informative)

    by adnonsense ( 826530 ) on Monday December 19, 2005 @03:06PM (#14292974) Homepage Journal
  • Re:Debugger (Score:5, Informative)

    by warewolfe ( 877477 ) on Monday December 19, 2005 @03:15PM (#14293067) Homepage
    Try phpeclipse which works within the Eclipse IDE. for info check here http://www.phpeclipse.de/tiki-view_articles.php/ [phpeclipse.de]
  • 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.
  • Re:Debugger (Score:2, Informative)

    by yahyamf ( 751776 ) on Monday December 19, 2005 @03:38PM (#14293275)
    NuSphere's Phped is pretty good. It's not free though. It also has an excellent built in profiler that shows how much time each line of code takes to execute.
  • 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 [amazon.com] 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.
  • by Anonymous Coward on Monday December 19, 2005 @04:21PM (#14293642)
    Save yourself $7 by buying the book here: Core Web Application Development with PHP & MySQL [amazon.com]. And if you use the "secret" A9.com discount [amazon.com], you can save an extra 1.57%!
  • Re:Multi-tier (Score:3, Informative)

    by julesh ( 229690 ) on Monday December 19, 2005 @04:36PM (#14293769)
    So what you're saying is... Don't use MySQL.

    I'm not sure what you're talking about [mysql.com].
  • The submitter of the review on amazon is "John A. Suda" and the submitter here is "jsuda" AND his amazon nickname is "jsuda1". I give it a 99.9999% probability that "John A. Suda" (aka "jsuda1") and "jsuda" are the one and the same. jsuda, here, just apparently decided to wait...almost two months before submitting it here.

    Parent got it right on it not being exactly an original review, but at least Joe Bloe didn't (well, 0.0001%) submit John Suda's review.
  • by __aaclcg7560 ( 824291 ) on Monday December 19, 2005 @04:50PM (#14293881)
    The text violated the Slashdot review guidelines: "If you've reviewed the book elsewhere anywhere besides a personal home page (for instance, on Amazon) please be sure that your review for Slashdot is substantially different."
  • Re:Yuck templates (Score:3, Informative)

    by bobdinkel ( 530885 ) on Monday December 19, 2005 @05:04PM (#14294021)

    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 associative array, or whatever. It can save you from a lot of repeated tedium. That might not be reason enough for you to use it, but just so you're aware. Also, I'm not sure what 'mysql_result_id' is. I assume you meant 'mysql_insert_id' and if so, I've used a few different database abstraction packages and every one of them gave me ready access to that value.

    Templates:
    Like anything, templates can be done wrong. Really wrong. And I've seen some really bad templating. But when done right, templating can make your life so much easier. The point of templating is to make maintenance easier. But it can also make development easier. Categorically rejecting templates is like categorically rejecting user defined functions, IMO.

  • Re:Debugger (Score:2, Informative)

    by nervouscat ( 597962 ) on Monday December 19, 2005 @06:17PM (#14294625)
    I second that suggestion! Zend Studio is fastastic! You can step through PHP code and examine the values of variables. Not to mention it has a really nice editor. Definitely check it out. http://www.zend.com/store/products/zend-studio/ [zend.com]
  • Re:Yuck templates (Score:2, Informative)

    by Anonymous Coward on Monday December 19, 2005 @06:22PM (#14294672)
    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!
  • Re:Oxymoron (Score:2, Informative)

    by Gnight ( 163400 ) on Monday December 19, 2005 @06:51PM (#14294907)
    Ya, I've heard that line of bs from mysql for about a half-dozen years:
            - they said it when they didn't have transactions - and it wasn't true
            - they said it when they didn't have unions or subselects - and it wasn't true
            - they said it when they didn't have referential integrity - and it wasn't true
            - they said it when they didn't have triggers, stored procs, and views - and it wasn't true

    When I say that MySQL is fine for most applications, I mean now, not 6 years ago.


    Sure, you can build robust applications with it.

    I'm glad we agree.

    ...extra effort... is required to achive "robustness" when [in MySQL]:
            - silent errors and data corruption problems current and historical
            - frequent deviations from ansi sql (comments, nulls, etc)


    Ok, I guess I'll give you these. I'm just glad that PostgreSQL and all the others don't deviate at all from the ANSI SQL stantards. :-)

    Also, I have never had a problem with MySQL corrupting data. Do you have any references regarding data corruption due to a fault in the MySQL code? (seriously, I would like to read about it)


            - simple optimizer that is notorious for performance problems on 5+ way joins ...
            - lack of parallelism or partitioning features - giving it about 2-5% of the speed of oracle/db2/informix when it comes to large table scans (reporting, analytics, etc)

    I would consider these advanced functions.


            - if you're planning on having your app run at various isps, most don't support current version...


    How is this MySQL's fault?


    So, sure. You can build robust apps with it. But man, it is so much more work than using postgresql.


    I'm not saying that MySQL is better or worse than anything else. What I'm saying is that for the vast majority of applications out there, MySQL will do the job just fine.


    Now, this might change in two years. Assuming that MySQL ... resolves the most significant existing issues. Then yes, it will be a reasonable option, right up there with postgesql[sic], etc.


    No, in two years people will still be dinging MySQL for its shortcomings instead of giving it credit (even just a little) where it's due.
  • review & book (Score:2, Informative)

    by SebNukem ( 188921 ) on Monday December 19, 2005 @06:52PM (#14294909)
    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.

"The one charm of marriage is that it makes a life of deception a neccessity." - Oscar Wilde

Working...