Object-Oriented PHP: Concepts, Techniques, and Code by Peter Lavin

“Object Oriented PHP: Concepts, Techniques and Code”, by Peter LavinCan a single book get web designers to start writing better, reusable PHP code? Peter Lavin makes a go of it in Object Oriented PHP, and it comes out pretty darn well.

The gist of the book is this: would you rather write code that does the same sort of stuff over, and over, and over, and over, and… so on and so forth, or would you rather write a piece of code you can plug into any of your pages or sites when you need to do a certain thing? The object-oriented way involves a little more time upfront, but it pays off time and time again. Because let’s face it, none of us enjoys coding the same boring stuff unless we’re gluttons for punishment.

Some may say, “What?! What’s this nonsense about OOP with PHP?”, and I will duly point them to the specs for PHP 5. That’s when OOP techniques were truly made possible. I tell you, even I started reading Peter’s book with skepticism, because heck, PHP is “just” a scripting language, and besides, Dreamweaver can write a lot of the code I need for me. But as I went through the book, I realized an object-oriented approach is a scalable approach. It can be applied to multiple projects. In essence, that’s what Dreamweaver’s doing when I tell it to write a recordset for me, and Macromedia’s not doing too bad as a company… There are obviously benefits to be reaped from OOP in web development.

Peter’s book is great, because it walks you through and explains how OOP in PHP should work. He first explains the basics of OOP, then applies them to PHP, and provides real-world techniques and code to illustrate his points. He touches on AJAX, XML, RSS, thumbnail images, PDO, and other cool things, in an approachable and understandable manner.

It’s funny, but the illustration on the cover of the book says it all. Would you rather code a waffle from scratch, or code the wafflemaker, and make yourself waffles whenever you want them? That’s the difference between just writing code and object-oriented programming. It gives you the power of reproducibility and scalability. So what are you waiting for? Get cooking with OOP!


The world wouldn't be the same without Romania

This video will show you why Romania is a wonderful and inventive country. Yes, it was sponsored by some beer companies, but it’s very nicely put together, and the things it talks about are all true.

The subjects presented in the video are listed below in the order of appearance:

  • The invention of the fountain pen, by Petrache Poenaru
  • The invention of the cybernetic model, by Stefan Odobleja
  • Insulin, invented by Nicolae Paulescu
  • The first jet-powered aircraft, invented by Henri Coanda
  • The first History of Religions, written by Mircea Eliade
  • Defending four penalty strokes in a row – done by Helmut Ducadam, in the soccer World Cup of 1986
  • The second most spoken language at Microsoft is Romanian
  • The Maramures Gates – some of the most beautifully sculpted wooden gates in the world
  • Romanian girls are some of the most beautiful in the world – I should know, I married one!
  • The sculpture of Constantin Brancusi
  • Brancovenean Architecture
  • Baseball (its grandfather, anyway – the sport got started all the way back in 1364)

In case you’d like to learn more about Romania, has a great collection of illustrious Romanians right here. Use the link menu on the right hand side to brows by subjects like Geography, History, Politics, Culture and Tourism.

(Thanks, Cristina!)


Google Translation is fantastic!

The Google Research blog has a great post about their latest development: Arabic translation. From what I understand, it’s hard to translate back and forth between English and Arabic because of the different sentence structures, but they’ve done it!

Google TranslationThanks to Google Translation and the power of the Internet, now you can read my site in eight languages other than English: French, Italian, German, Spanish, Portuguese, Japanese, Korean and Simplified Chinese. Arabic is coming soon.

Let me know how it reads in your language! 🙂 Just look for the Translate section in the site’s sidebar footer.

Updated 9/28/07: Arabic was added several months ago.