small medium large xlarge

Rails for PHP Developers


Cover image for Rails for PHP Developers

Rails for PHP Developers


Are you a PHP developer interested in the Ruby on Rails framework? Rails for PHP Developers kick-starts your Rails experience by guiding you through learning both Ruby and Rails from a PHP developer’s perspective. Written by developers with deep experience using PHP, Ruby, and Rails, this book leverages your existing knowledge of PHP to learn Rails application development quickly and effectively.

Customer Reviews

I highly recommend Rails For PHP Developers. Provides side-by-side PHP/Ruby code and is overall a great introduction to Ruby.

- Ben Borowski

, Stack Overflow

This is an enjoyable book packed with great information and usable examples. I like the organization of the book and the gentle, informal voice with which the authors cover many complex topics. It’s easy to read, yet it has plenty of substance and depth to give the reader a great introduction to Rails.

- Bill Karwin

, MySQL Guild

This book does exactly what it says on the front: it gives a comprehensive overview of Rails from the perspective of the seasoned PHP developer and it does it very, very well.

- Peter Daly

, BCS Book Reviews

It quickly brings any PHP programmer up to speed with one of the hottest technologies in existence today. I’d recommend this manual to any PHP developer who would like to quickly learn how to use Rails.

- Blog Critics Magazine

See All Reviews

About this Title

Pages: 432
Published: 2008-02-01
Release: P1.0 (2008-02-11)
ISBN: 978-1-93435-604-3

As a PHP developer, you have some great tools for developing web applications. Ruby on Rails is another key tool to add to your web development toolbox. Rails is a high-level web development framework that emphasizes high productivity and clean code. However, the Ruby language and Rails framework take a different approach from the way many PHP developers write applications.

Ruby lies at the foundation of Rails, and we’ll teach you the Ruby language from the beginning by building on your existing foundation of PHP. We’ll explore Ruby through parallel code examples that illustrate the differences between the languages, and help you understand the Ruby idioms and how they differ from popular PHP code and style.

You’ll then learn the Rails framework by iteratively building a complete application, starting from the home page through to a finished product. Along the way, you’ll build your skills as a Rails developer by learning the Rails fundamentals such as MVC structure, domain modeling, and testing.

In addition to serving as a guide to learning both Ruby and Rails from a PHP developer’s perspective, this book includes two extensive reference chapters. They map the most common PHP tasks to their equivalents in the Ruby and Rails world, giving you at-a-glance information that you’ll refer to often.

  • Leverage PHP knowledge to learn Ruby on Rails quickly
  • Understand key differences between Ruby and PHP
  • Learn Rails best practices and relate them to PHP
  • Develop techniques for writing effective Rails code

Contents & Extracts

  • Table of Contents
  • I. From PHP to Rails
    • Getting Started with Rails
    • Beginning Ruby Code
    • Embracing the Ruby Philosophy
  • II. Building a Rails Application
    • Modeling the Domain (extract)
    • Working with Controllers and Views
    • Validating and Testing Models
    • Authenticating Users
    • Defining Associations
    • Preparing to Launch
    • Deploying The Application
  • III. PHP to Ruby At-a-Glance
    • PHP to Ruby Basics Reference
    • PHP to Ruby Advanced Reference
    • PHP to Rails Reference (extract)


Derek DeVries has an education in fine arts and a strong background as a web application developer. As vice president of design for Maintainable Software, Derek leads design, branding, and user experience for the company. He is also a Zend Certified PHP Engineer with over five years experience leading PHP development teams at Xerox, Amici LLC, and several startup companies. Derek has worked on a number of Ruby on Rails products in his current position and in his spare time develops, a Rails application for finding the best new sports articles on the web.

Mike Naberezny is the founder of Maintainable Software, a software development company in the San Francisco Bay Area. He has over ten years software engineering experience working with companies such as Flextronics and Instrumentation Engineering. Mike’s PHP experience includes holding a senior position at Zend Technologies, and he sits on the Zend PHP Education Advisory Board. Mike heads engineering at Maintainable, where he has developed and deployed a number of Rails applications. He is a regular speaker at software conferences and contributes to several open source projects.

You can read more about the authors at their website,