Rails for PHP Developers / Edition 1

Paperback (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 94%)
Other sellers (Paperback)
  • All (14) from $1.99   
  • New (4) from $1.99   
  • Used (10) from $1.99   
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
Seller since 2006

Feedback rating:



New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

BRAND NEW 100% Money Back Guarantee. Shipped to over one million happy customers. Your purchase benefits world literacy!

Ships from: Mishawaka, IN

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Seller since 2015

Feedback rating:


Condition: New
Brand New Item.

Ships from: Chatham, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Seller since 2015

Feedback rating:


Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Seller since 2015

Feedback rating:


Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Sort by


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.

Read More Show Less

Product Details

  • ISBN-13: 9781934356043
  • Publisher: Pragmatic Programmers, LLC, The
  • Publication date: 2/1/2008
  • Series: Pragmatic Programmers Series
  • Edition description: New Edition
  • Edition number: 1
  • Pages: 430
  • Product dimensions: 7.58 (w) x 8.92 (h) x 0.79 (d)

Table of Contents

Acknowledgments     xiii
Preface     xv
What Rails Offers     xv
Who Should Read This Book     xvi
Resources     xvi
PHP and Rails: A Personal View     xvii
About the Code Examples     xviii
About the Environment Used     xviii
Version Requirements     xix
How to Read This Book     xix
From PHP to Rails     1
Getting Started with Rails     3
Rails as an Extension of Ruby     3
The Components of Rails     4
Opinionated Software     5
The MVC Pattern and Rails     7
Installing Ruby and Rails     9
Creating a Rails App     10
Chapter Review     27
Exercises     27
Beginning Ruby Code     29
Seeing Ruby as a General-Purpose Language     29
Interacting with Ruby     31
Objectifying Everything     33
Accepting Ruby's Object World     34
Assigning to Variables     36
Writing Methods and Passing Parameters     39
Controlling Program Flow     43
Handling Errors     45
Understanding Blocks     51
Chapter Review     56
Exercises     57
Embracing the Ruby Philosophy     59
Thinking in Objects     59
Understanding Attributes     62
Method Visibility     64
Understanding Typing     66
Implementing Interfaces with Mixins     71
Organizing Code with Namespaces     75
Overriding Operators     78
Reopening Classes     80
Chapter Review     82
Exercises     82
Building a Rails Application     83
Modeling the Domain     85
Defining Requirements     86
Using the Database     89
Creating the Application     92
Generating the First Model     94
Building Database Tables     96
Employing ActiveRecord     101
Chapter Review     106
Exercises     107
Working with Controllers and Views     109
Identifying Resources     109
Creating Controllers     111
Routing Requests     114
Retrieving Meeting Data     118
Viewing Meetings     120
Adding Links     121
Creating New Meetings     127
Redirection and Flash Data     132
Administrating Meetings     134
Separating Public Files     142
Adding a Layout     144
Chapter Review     147
Exercises     149
Validating and Testing Models     151
Validating Model Data     151
Using Rails Environments     154
Testing Our Models     155
Chapter Review     161
Exercises     162
Authenticating Users     163
Migrating to a More Secure User     163
User Registration     165
Viewing and Editing Users     176
Restoring Sessions     182
Logging In     185
Chapter Review     190
Exercises     190
Defining Associations     193
Connecting Presentations     193
Testing Associations     196
Integrating Presentations into Meetings     198
Routing Presentations     199
The Presentation Controller     201
Spring Cleaning     206
Chapter Review     212
Exercises     213
Preparing to Launch      215
Adding the Home Page     215
Securing Our Actions     218
Protecting from Mass Assignment     224
Caching the Pages     226
Chapter Review     232
Exercises     232
Deploying the Application     235
Choosing a Host     236
The Production Environment     238
Preparing Our Application     239
Preparing Our Deployment Server     241
Launching the Application     246
Enhancing Performance     249
Scaling Your Application     253
Chapter Review     254
Exercises     255
PHP to Ruby at a Glance     257
PHP to Ruby Basics Reference     259
Basic Syntax     259
Basic Data Types     261
Variables     279
Constants     287
Expressions     289
Operators     291
Control Structures     300
PHP to Ruby Advanced Reference     311
Blocks     311
Functions     313
Classes and Objects     321
Exceptions     349
References     350
External Libraries and Packages     352
Documenting Code     354
PHP to Rails Reference     367
Templates     367
{dollar}_GET/{dollar}_POST     368
{dollar}_FILES     369
{dollar}_SERVER     372
Cookies     372
Sessions     374
Headers and Redirection     376
Security     377
Debugging     382
Accessing the Database     384
Email     386
Testing Rails Code     387
Rails Plug-Ins     392
Bibliography     395
Index     397
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)