Beginning Ruby on Rails

( 3 )


Ruby on Rails is the revolutionary online programming tool that makes creating functional e-commerce web sites faster and easier than ever. With the intuitive, straightforward nature of Ruby and the development platform provided by Rails, you can put together full-fledged web applications quickly, even if you're new to web programming.

You will find a thorough introduction to both Ruby and Rails in this book. You'll get the easy instructions for acquiring and installing both; ...

See more details below
$29.39 price
(Save 26%)$39.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (28) from $1.99   
  • New (10) from $1.99   
  • Used (18) from $1.99   
Sending request ...


Ruby on Rails is the revolutionary online programming tool that makes creating functional e-commerce web sites faster and easier than ever. With the intuitive, straightforward nature of Ruby and the development platform provided by Rails, you can put together full-fledged web applications quickly, even if you're new to web programming.

You will find a thorough introduction to both Ruby and Rails in this book. You'll get the easy instructions for acquiring and installing both; understand the nature of conditionals, loops, methods, and blocks; and become familiar with Ruby's classes and objects. You'll learn to build Rails applications, connect to databases, perform necessary testing, and put the whole thing together to create real-world applications such as shopping carts and online catalogs—apps you can actually use right away.

What you will learn from this book
* How to install and use Ruby and Rails
* Object-oriented programming with Ruby
* Rails fundamentals and how to create basic online applications
* How to work with HTML controls, use models in Rails applications, and work with sessions
* Details on working with databases and creating, editing, and deleting database records
* Methods for handling cookies and filters and for caching pages
* How to connect Rails with Ajax

Who this book is for

This book is for anyone who wants to develop online applications using Ruby and Rails. A basic understanding of programming is helpful; some knowledge of HTML is necessary.

Wrox Beginning guides are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that will guide you through all the techniques involved.

Read More Show Less

Editorial Reviews

From Barnes & Noble
The Barnes & Noble Review
If you've never built web applications before, Ruby on Rails makes it a whole lot easier to start. Whatever your experience, Ruby on Rails can help you build more substantial and powerful applications faster (and you'll have more fun doing it). Now Steven Holzner has written a beginner's guide to Rails that's as good as the framework itself.

With 100-plus books under his belt, Holzner may have more experience teaching programming technologies than anyone else on earth. So, whether he's discussing Ruby's core constructs (strings, variables, loops, arrays) or the Model-View-Controller architecture that's central to Rails, you can rely on him for accuracy, clarity, and relevance.

And efficiency. One concept at a time, Holzner manages to thoroughly introduce both Ruby and Rails in barely 350 pages (including the hands-on exercises and case study applications).

Holzner walks you through installing both Ruby and Rails, then learning enough Ruby coding techniques to get results. If you're a little weak on object-oriented programming, there's a chapter on classes, objects, and encapsulation. By Chapters 4 and 5, you're writing real web applications that access and store data -- and you're ready for Holzner's coverage of database-integrated web applications. Here again, Holzner assumes virtually no background, covering everything from creating your database to building a full-fledged shopping cart application.

By the end of the book, you'll know how to validate and test applications; centrally control them with Rails' Action Controller; and use Views. Holzner even offers up enough Ajax to whet your appetite.

As we've said, Holzner's written on just about every imaginable programming topic. Yet his enthusiasm for Rails is palpable. By the time you're done, we think you'll share it. Bill Camarda, from the January 2007 Read Only

Read More Show Less

Product Details

  • ISBN-13: 9780470069158
  • Publisher: Wiley
  • Publication date: 11/29/2006
  • Series: Wrox Beginning Guides
  • Edition number: 1
  • Pages: 408
  • Sales rank: 964,099
  • Product dimensions: 7.30 (w) x 9.20 (h) x 0.80 (d)

Meet the Author

Steven Holzner is the award-winning author of more than 100 programming books. He’s been involved in Ruby on Rails for a long time, and does commercial Rails development. He’s also been on the faculty of Cornell University and MIT, as well as having been a contributing editor for PC Magazine.

Read More Show Less

Table of Contents



Chapter 1: Welcome to Ruby.

Creating a First Web Application.

Getting Started with Ruby.

Checking the Ruby Documentation.

Working with Numbers in Ruby.

Working with Strings in Ruby.

Storing Data in Variables.

Creating Constants.

Interpolating Variables in Double-Quoted Strings.

Reading Text on the Command Line.

Creating Symbols in Ruby.

Working with Operators.

Handling Operator Precedence.

Working with Arrays.

Using Two Array Indices.

Working with Hashes.

Working with Ranges.

Chapter 2: Conditionals, Loops, Methods, and Blocks.

It’s All about Making Choices: the if Statement.

Using the case Statement.

Using Loops.

Creating and Calling a Method.

Making Use of Scope.

Working with Blocks.

Chapter 3: Classes and Objects.

All about Encapsulation.

Creating a Class.

Creating an Object.

Basing One Class on Another.

Understanding Ruby’s Object Access.

Overriding Methods.

Creating Class Variables.

Creating Class Methods.

Creating Modules.

Creating Mixins.

Chapter 4: Welcome to Rails.

Putting Ruby on Rails.

Introducing Model-View-Controller Architecture.

Giving the View Something to Do.

Mixing Ruby Code and HTML Inside the View.

Passing Data from an Action to a View.

Escaping Sensitive Text.

Adding a Second Action.

Chapter 5: Building Simple Rails Applications.

Accessing Data the User Provides.

Using Rails Shortcuts for HTML Controls.

Working with Models.

Tying Controls to Models.

Initializing Data in Controls.

Storing Data in Sessions.

Chapter 6: Connecting to Databases.

Tutorial on Databases.

Creating a Data-Aware Rails Application.

Creating the Database.

Running the store Application.

Adding Another Record.

Beautifying the Display.

Chapter 7: Working with Databases.

Displaying Items to the Customer.

Creating a Shopping Cart.

Combining Purchases in the Cart.

Clearing the Cart.

Letting the User View the Cart Anytime.

Chapter 8: Validating and Testing.

Validating the Presence of Data.

Validating if Data Is Numeric.

Validating if Data Is Unique.

Creating the Validator Application.

Writing Your Own Validate Method.

Testing Your Model.

Testing Your Controller.

Chapter 9: Controlling the Action with the ActionController.

Routing Refinements.

Creating Cookies.

Creating a Filter.

Logging in with Filters.

Using After Filters.

Rendering Text Directly.


Chapter 10: Getting the Big Picture with Views.

Creating XML.

Creating XML Attributes.

Using View Helpers.

Using View Pagination.

Using Partial Templates.

Passing Data to Partial Templates.

Chapter 11: Ajax and Rails.

Using Ajax.

Getting Access to Ajax Data.

Using XML and Ajax.

Using HTML Controls and Ajax.

Performing Ajax Searches.

Performing Visual Effects.

Appendix A: Answers to Exercises.


Read More Show Less

Customer Reviews

Average Rating 3.5
( 3 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & 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 & 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 & 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 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 & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & 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 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
Sort by: Showing all of 3 Customer Reviews
  • Anonymous

    Posted January 27, 2007

    Good first guide, but incomplete

    I've been a big fan and advocate of Dr. Steven Holzner's technical writing ever since penned wrote what, in my humble opinion, is THE authoritative JavaScript reference, New Riders' 'Inside JavaScript'. So it was with great enthusiasm (perhaps unfairly so) that I purchased 'Beginning Ruby on Rails' by Wrox. I expected a lot out of it, which goes against my journalism disciplines of approaching each review objectively and without bias. First, the positives. The good doctor's redeeming quality as a technical author is his ability to make the complex graspable for an audience ¿ being neither too intimidating for the beginning coder, nor too condescending for the experienced architect. In this light, the book is very well done. Also, many readers with whom I've interacted find the holy grail of Rails writing, 'Agile Development with Rails' to be too presumptuous and at times difficult to grok. Holzner addresses this crowd very appropriately, so those new to Rails, or Ruby programming, or web development in general will appreciate this book. I realize that writing an introductory level book on any web framework is a huge undertaking for any platform. An author has to introduce a programming language, object-oriented tenets, database theory, SQL, operating systems support, web server integration, page handling, etc. ¿ and then get into the actual web development. Add to this the challenge of a framework like Rails evolving at such a pace that a major publication might be outdated by the time it hits the shelves, and you've got a pretty daunting task at hand. Holzner gives a good introduction into the Rails directory structure, working with databases, command-line syntax for creating Rails apps, working with Rails scaffolding, and provides a very healthy discussion for using Ajax in Rails. There's practical code in the book you can yank and use right away (not dependent on previous chapters), and the book shows how to work with WEBrick. There's a nice little section on unit testing, and cited are examples for setting up Rails on a Windows PC, a Mac, or a Linux box, so the content is available to a wide audience. But with that said, I found the book to be short in a couple of key areas. Only a scant amount of information was provided on working with XML and for using ActionController for REST-like URL mapping. And there isn't anything at all presented on the use of RJS templates. And there's likewise a tragic omission of using Rails to author web services, and nothing was presented about apps based on real-world relationships from database tables, only a simple one-to-many example. I also found the book to be incomplete without a firm discussion of a page's life cycle when handled by Rails. And there shockingly wasn't enough mentioned about the critical facet of Rails ¿ its underlying Model-View-Controller architecture. And what winds up being the book's most code-heavy example ¿ a Rails shopping cart using session data and custom models - is merely regurgitation of the Pragmatic Programmers sample in the 'Agile...' book. The book's appendix is merely the answers to the end-of-chapter questions. I would have liked to see such a section dedicated towards more in-depth info on keeping Rails up to date, working with and authoring custom Ruby gems, examples of various sites currently using Rails, URLs to screencasts and podcasts, and IDEs developers can use instead of hand-coding new applications each and every time out. Since the examples mainly create a new rails app for each demo, I worry that the book may allow the first-time reader to misconstrue Rails development as a lot of work for even the simplest of jobs. Which defeats the whole purpose of Rails to begin with. So, I'm giving this book 3 stars. It's very well written with a friendly voice and it'll get you into Rails fast. It's a great way to start learning RoR development for any level of developer. I've shared it with a few fri

    1 out of 1 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted November 18, 2008

    No text was provided for this review.

  • Anonymous

    Posted March 18, 2009

    No text was provided for this review.

Sort by: Showing all of 3 Customer Reviews

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