UKUUG home


(the UK's Unix & Open Systems User Group)






Book Discounts

Other Discounts

Mailing lists






Rails for PHP Developers: Refining Web Applications

Derek DeVries and Mike Naberezny
Published by Pragmatic Bookshelf
ISBN: 978-1-934356-04-3
430 pages
£ 22.99
Published: 11th February 2008
reviewed by Paul Waring
   in the June 2008 issue (pdf), (html)

As someone who relies on web development for the majority of my freelance work, I have been intending to get up to speed with this Ruby on Rails thing which everyone has been talking about for some time. Unfortunately, with several years of (possibly bad) PHP habits ingrained into my memory, picking up a new way of thinking from the existing Ruby on Rails books has been quite tricky, so a text which proclaims to be 'Rails for PHP Developers' sounds like the ideal solution to my problem.

The book begins as might be expected, with a short history of Rails and a brief nod in Ruby's direction, plus an overview of the Model View Controller (MVC) pattern. Thankfully, the authors stay clear of evangelising at this point — simply pointing out the main aspects of MVC rather than launching into a sermon — which makes a refreshing change from some other Rails books that I've read. The section on installing Rails is also kept brief, again a welcome change from some books (not just those focusing on Rails) which often pad themselves out with an entire chapter on installation, when all that is required is to run one or two lines in your package management software or download a setup file.

Moving swiftly on, I'm impressed to see my first Rails app up and running by page 11 — instant gratification if ever there was such a thing. Admittedly it doesn't do much, but by the end of chapter one I've followed the examples and got a functioning mailing list subscription form up and running, using only a tiny amount of code. Later chapters are a little bit disappointing as the pace slows drastically when new concepts from Ruby which don't exist in PHP are introduced, and you have to wait until chapter five before things start going again.

The chapter which I found the most useful however was 'Deploying the Application'. With PHP, I'm used to just copying the code to a server with Apache and mod_perl installed and having it 'just work', whereas Rails applications require significantly more effort. Thankfully, the book takes you through setting up and deploying a Rails application in a step by step process, in one of the most clear and concise ways I've seen.

In addition to specific pieces of content, the great thing about this book is that it really does do what it says on the tin. Each Rails example is preceeded by the corresponding PHP, which makes it easy to see how a construct in one language maps into the other, and suddenly the move from PHP to Rails doesn't seem so difficult. There are also plenty of side boxes which explain why something is different in Rails, or why some tasks are possible in one language but not the other.

My only minor criticism of the book is that in one or two places the authors have used what feels like deliberately poor PHP in order to emphasise the advantages of Rails, but this doesn't detract too much from the overall quality. Furthermore, the authors do admit that frameworks exist for PHP, so if you decide that Rails isn't your cup of tea you can still do similar things in the language you're already comfortable with.

Overall, I'd suggest that if you're a PHP programmer who wants to get up to speed with Rails without moving too far from your comfort zone, this is the book for you. Anyone else should probably look elsewhere though as this book is really only useful if you fit the exact niche which it is aiming for.

Back to reviews list

Tel: 01763 273 475
Fax: 01763 273 255
Web: Webmaster
Queries: Ask Here
Join UKUUG Today!

UKUUG Secretariat
More information

Page last modified 15 Jan 2009
Copyright © 1995-2011 UKUUG Ltd.