Slashdot Mirror


PHP MySQL Website Programming

Alan Knowles writes "Ever started looking for a PHP script to solve that problem in your company - Managing the passwords, keeping track of equipment, or making information available on the web. Normally after a few hours of hunting, you track down something that looks close to what you want, you download it, get it going, then start digging around the code. At this point, you cringe in fear of two problems, the spaghetti mess that you are about to deploy, the ongoing maintenance nightmare and the horrors of modifying it to fit your needs. Well this book isn't going to solve these issues, but at least if a few more of those budding open source developers read it, the world would be a better place." Read on for the rest of this review; Yes, the book is still available. PHP MySQL Website Programming Problem - Design - Solution author Chris Lea, Mike Buzzard, Jessey White-Cinis, Dilip Thomas pages 504 publisher Apress rating 9 reviewer Alan Knowles ISBN 1861008279 summary Effective learning through the Problem, Design, Solution approach

In brief: This book takes you through designing a PHP website, featuring the usual bundle of generic features, simple content management, adverts, forums and an on-line shop. It's not intended as a definitive codebase of the absolute best design, but fills a big gap between trying to develop PHP with functions and lots of include files, and the full Computer Science bible of Design patterns.

For those people (and there's a lot of them) who have grown from Word macros and Visual Basic, then had a lot of fun learning PHP, this book provides an excellent gentle path towards using classes in PHP and applying them to real world problems. Like a lot of Wrox books, it's jam-packed with code, with a good flow of new information in each chapter.

What I liked

As a programmer who many years ago swore blind that there was no reason for using classes and objects on websites (the equivalent to a misspent youth), this book gives good clear examples on how they can provide advantages over just 'include' and a few functions.

The book is enjoyable to read; it focuses on the step-by-step delivery of a very dynamic website,starting with the basics of designing the file layout and how the files will work together. It then goes into more detail on delivering each feature, provides enough general ideas to help most PHP enthusiasts and budding developers understand the basics and advantages of OOP programming (although there are a few functions thrown in to ease in those not conversant with OOP).

The website that you learn to create (using the Problem - Design - Solution approach) is available for you to see online here.

Although a lot of the code is focused around implementing a reasonably simple set of Patterns, Data Objects and Page execution scripts, there are a few gems in there.

  • Utilizing quite a few PEAR classes including the Database abstraction layer, Mail Sending.
  • A nice section on the basics of RSS and XML, not to detailed level, but a good warmup for anyone coming from a System Admin or Simple Visual Basic level.

Ok, It's not for everyone. If you've done any Java or C++, this book is going to be a bit below you. Design Patterns are not mentioned directly in the book, although a number are implemented. The book misses out on quite a few important ideas, like templating php sessions in the body, although it does touch on the subject near the end. Given the target audience, of PHP of beginner to intermediate level, it does have a few unusual code styles in places, which hopefully the readers will not over-apply.

What you will learn from this book
  • Elements required to build a useful 3-tier web application
  • Design and construct an interactive User Interface (UI)
  • Provide a CMS environment to manage content securely and extensively
  • Create visitor accounts, to register and manage unique site visitors
  • Build a simple news management and delivery system
  • Create a syndication application
  • Generate a sustainable revenue stream from advertising
  • Implement an online visitor poll
  • Create a fully featured discussion forum
  • Build an online shopping cart system with checkout features
Summary While personally this isn't the book for me, as I've learned far too much PHP for my own good, it's the book you wish half the sourceforge PHP project coders would read before starting their project, saving you a wasted download. In the end it's ideally suited to a PHP website development training course, and could almost be the course book. (However, it's better written than most of the school books I remember).

You can purchase PHP MySQL Website Programming from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

11 of 160 comments (clear)

  1. Who needs this? by Anonymous Coward · · Score: 4, Funny

    Seriously, a college education in MIS provided everything you need to create a fully scalable, multifacted, fully functional e-commerce portal to create new paradigms of customer interaction.

    1. Re:Who needs this? by mgrennan · · Score: 2, Funny
      I've working in MIS for 25 years. I have a high school education and a brain.


      In this time I have worked for two PHD's in computer science and both thought I also had a PHD because they had to come to me to find out how things realy work.

      --
      There are 10 type of people in the world, those who understand binary and those who don't.
  2. Sounds familiar? :-) by tcr · · Score: 4, Funny

    Build a simple news management and delivery system

    Generate a sustainable revenue stream from advertising

    Implement an online visitor poll

    Create a fully featured discussion forum

    ?????

    Profit!!

    --


    Information wants to be beer.
  3. Hold it right there! by Anonymous Coward · · Score: 5, Funny

    "For those people (and there's a lot of them) who have grown from Word macros and Visual Basic, then had a lot of fun learning PHP"

    What do you mean, "fun learning PHP?" I'm a Microsoft guy and there's only one way for me... the Microsoft way. Buddy, I think you should be talking about ASP and VBScript, the nectar of the gods.

    I started my career hacking up Word macros, then slowly picked up Visual Basic. I can't wait to see what Microsoft has in store for me next. Maybe Visual C#? Hmmm... I won't touch anything non-Microsoft with a ten foot pole, because Microsoft always comes out with the best cool shit and I'm a big fan.

    I don't know why you people can't just accept Microsoft and all its products and move on with life.

    1. Re:Hold it right there! by alman · · Score: 2, Funny

      I agree.
      Microsoft pays my bills.
      And since I've pulled out all my hair, I don't have to worry about hair cuts, I get to spend that 1/2 hour/month reading MSDN magazine!
      Also, they helped provide me with this nice padded room, the walls are soft and squishy. Really nice.

  4. Two Problems? by Anonymous Coward · · Score: 5, Funny

    At this point, you cringe in fear of two problems, the spaghetti mess that you are about to deploy, the ongoing maintenance nightmare and the horrors of modifying it to fit your needs.

    There are three types of people in the world: those who can count, and those who can't.

    1. Re:Two Problems? by HerbieStone · · Score: 2, Funny
      There are three types of people in the world: those who can count, and those who can't.

      Ahhh, reminds me of the Monty Python sketch.

      Ximinez: Nobody expects the Spanish Inquisition. Our chief weapon is surprise ... surprise and fear ... fear and surprise ... our two weapons are fear and surprise ... and ruthless efficiency. Our three weapons are fear and surprise and ruthless efficiency and an almost fanatical devotion to the Pope ... Our four ... no ... amongst our weapons ... amongst our weaponry are such elements as fear, surprise .. I'll come in again. (exit and exeunt)
      Reg: I didn't expect a kind of Spanish Inquisition.
      Jarring chord. They burst in
      Ximinez: Nobody expects the Spanish Inquisition. Amongst our weaponry are such diverse elements as fear, surprise, ruthless efficiency, and an almost fanatical devotion to the Pope, and nice red uniforms --

  5. build great code like this by DrSkwid · · Score: 3, Funny

    /></td>

    in 24 hours

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  6. Re:Sounds familiar? :-) by red_dragon · · Score: 3, Funny

    To those familiar with it, #5 obviously is:

    --
    In Soviet Russia, Jesus asks: "What Would You Do?"
  7. In other words by L7_ · · Score: 1, Funny

    How to develop phpNuke!

  8. Repeat troll by skillet-thief · · Score: 3, Funny
    I think this guy has a Perl script that automatically posts the same troll each time a php related story comes up. This is at least the third time I've seen this exact same text. At least it is posted as AC this time, usually it is posted by egg_troll or something like that.

    The astonishing thing is that it continues to work!

    --

    Congratulations! Now we are the Evil Empire