11
Oct

Book Review - Rails for PHP Developers

   Posted by: Brandon   in Book Reviews, Computers & Technology

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Rails for PHP Developers
Derek DeVires, Mike Naberezny
The Pragmatic Bookshelf, 406 pp.
ISBN 978-1-934356-04-3
Reviewed by Brandon Ching

As a long time PHP developer, the advent of Ruby on Rails as a mainstream web development platform never quite peaked my interests; nor the interest of the majority of developers I have worked with over the years. The running joke being that if we simply used Ruby instead of PHP, there would most certainly be a buildEntireProject() method that would do all of our work for us. However, times change, and as developers it is our responsibility to explore new and different methods of getting work done; no matter how fruitless our initial expectations are.

Rails for PHP Developers by Derek DeVries and Mike Naberezny was my first serious attempt at practicing another language, aside from PHP, for web application development. As much as I hate to admit it; I think I like it! The book is broken up into three core sections designed to lead you through a comparative analysis between PHP and the Rails framework followed by the construction of an entire Rails application.

Section I begins with a brief introduction to the Ruby language and outlines some of the basic differences between PHP and Ruby. While far from an exhaustive introductory reference on the Ruby language, these first few chapters utilize your existing PHP knowledge and comparatively shows you how to get things done in Ruby. For instance, section 2.6, outlining method creation and parameter passing, the authors show how to create a method in PHP, and follow it by showing the same code in Ruby. The authors proceed to explain the Ruby specific how and why, which gives good context and surprisingly helpful insight given the relatively short length of each section.

The first section is also where you will be introduced to the Rails framework and build your first basic Rails application. By the end of chapter 3, you will have covered a good majority of Ruby’s object-oriented features including attributes, namespaces, typing, and overriding. Again, each topic is placed within a comparative code context with both PHP and Ruby examples.

Section II is where you really get into the heart of the Rails framework. With the pretext of building a meeting management application, the authors guide you through the major concepts of the Rails framework including: database modeling, controllers and views, validation, user management, associations, and deployment. This section of the book is quite extensive in both its descriptions and code samples. As you progress through building the messaging application, you are exposed to everything from form creation and validation to caching and even some production server recommendations and configuration help.

In the book’s final section, the authors present three reference chapters devoted to relating PHP to Ruby syntactically. Akin to a foreign language dictionary, these chapters bring back the comparative code examples seen in the first section but laid out in a reference style manner. Each topic contains both code comparisons and brief details of Ruby specifics. This section seems incredibly handy to have as it covers everything from strings and array manipulation to object cloning to header redirection and so much more.

Overall, I was very impressed with Rails for PHP Developers. The wording was down to earth, the flow of the book was coherent, and the content was relative and informative. Each of the main chapters has a good summary plus a number of practical exercises to reinforce your learning of the material. While not a replacement for a strict Ruby language instructional or reference book, it certainly lives up to its title and capitalizes upon the existing development knowledge of its intended audience (which, by the way, should be an intermediate to advanced level PHP developer). If you are a current PHP developer serious about learning Ruby on Rails, then I would certainly recommend this book.

So, am I a Ruby convert? Well, maybe not just yet. However, Rails for PHP Developers has certainly provided me the guidance and peaked my interest in Ruby on Rails and I can promise that I will at least be dabbling in some Ruby in the near future.

  • Share/Bookmark

Tags: , , , ,

This entry was posted on Saturday, October 11th, 2008 at 12:39 pm and is filed under Book Reviews, Computers & Technology. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment

Restrained Freedom is Digg proof thanks to caching by WP Super Cache!