RailsSpace and over 360,000 other books are available for Amazon Kindle – Amazon’s new wireless reading device. Learn more

 

or
Sign in to turn on 1-Click ordering.
 
 
Express Checkout with PayPhrase
What's this? | Create PayPhrase
Sorry!
More Buying Choices
58 used & new from $16.45

Have one to sell? Sell yours here
 
   
RailsSpace: Building a Social Networking Website with Ruby on Rails (Addison-Wesley Professional Ruby Series)
 
 
Start reading RailsSpace on your Kindle in under a minute.

Don’t have a Kindle? Get your Kindle here.
 
  

RailsSpace: Building a Social Networking Website with Ruby on Rails (Addison-Wesley Professional Ruby Series) (Paperback)

~ (Author), Aurelius Prochazka (Author) "RailsSpace teaches you Ruby on Rails by developing a real-world application: RailsSpace, a social networking website aimed at the Rails community itself..." (more)
Key Phrases: active record, friendship request link, pending friendship, Started Finished, Foo Bar, Action Mailer (more...)
4.2 out of 5 stars  See all reviews (27 customer reviews)

List Price: $49.99
Price: $31.49 & this item ships for FREE with Super Saver Shipping. Details
You Save: $18.50 (37%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.

Want it delivered Wednesday, November 11? Choose One-Day Shipping at checkout. Details
37 new from $19.99 21 used from $16.45

Formats

Amazon Price New from Used from
  Kindle Edition $25.19 -- --
  Paperback $31.49 $19.99 $16.45

Frequently Bought Together

Customers buy this book with Practical Rails Social Networking Sites (Expert's Voice) by Alan Bradburne

RailsSpace: Building a Social Networking Website with Ruby on Rails (Addison-Wesley Professional Ruby Series) + Practical Rails Social Networking Sites (Expert's Voice)
  • This item: RailsSpace: Building a Social Networking Website with Ruby on Rails (Addison-Wesley Professional Ruby Series) by Michael Hartl

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Practical Rails Social Networking Sites (Expert's Voice) by Alan Bradburne

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details


Customers Who Bought This Item Also Bought

Advanced Rails Recipes

Advanced Rails Recipes

by Mike Clark
4.6 out of 5 stars (7)  $25.71
The Rails Way

The Rails Way

by Obie Fernandez
4.2 out of 5 stars (31)  $34.64
Beginning Ruby: From Novice to Professional, Second Edition

Beginning Ruby: From Novice to Professional, Second Edition

by Peter Cooper
4.9 out of 5 stars (30)  $26.39
The Ruby Way, Second Edition: Solutions and Techniques in Ruby Programming (2nd Edition)

The Ruby Way, Second Edition: Solutions and Techniques in Ruby Programming (2nd Edition)

by Hal Fulton
4.5 out of 5 stars (21)  $31.49
Programming Ruby: The Pragmatic Programmers' Guide, Second Edition

Programming Ruby: The Pragmatic Programmers' Guide, Second Edition

by Dave Thomas
4.3 out of 5 stars (61)  $20.71
Explore similar items

Editorial Reviews

Product Description

Ruby on Rails is fast displacing PHP, ASP, and J2EE as the development framework of choice for discriminating programmers, thanks to its elegant design and emphasis on practical results. RailsSpace teaches you to build large-scale projects with Rails by developing a real-world application: a social networking website like MySpace, Facebook, or Friendster.

Inside, the authors walk you step by step from the creation of the site's virtually static front page, through user registration and authentication, and into a highly dynamic site, complete with user profiles, image upload, email, blogs, full-text and geographical search, and a friendship request system. In the process, you learn how Rails helps you control code complexity with the model-view-controller (MVC) architecture, abstraction layers, automated testing, and code refactoring, allowing you to scale up to a large project even with a small number of developers.

This essential introduction to Rails provides

  • A tutorial approach that allows you to experience Rails as it is actually used
  • A solid foundation for creating any login-based website in Rails
  • Coverage of newer and more advanced Rails features, such as form generators, REST, and Ajax (including RJS)
  • A thorough and integrated introduction to automated testing

The book's companion website provides the application source code, a blog with follow-up articles, narrated screencasts, and a working version of the RailSpace social network.



About the Author

Michael Hartl is a programmer and entrepreneur. Before discovering Rails, he used Zope/Python in a startup he cofounded to produce fantasy sports websites, including BracketManager, at the time the number one independent NCAA Basketball Tournament website. Previously, he was a physics instructor at the California Institute of Technology, where he received the Lifetime Achievement Award for Excellence in Teaching. He also served as Caltech's editor for The Feynman Lectures on Physics: The Definitive and Extended Edition (Addison-Wesley). He is a graduate of Harvard College and has a Ph.D. in physics from Caltech.

Aurelius Prochazka is a pioneer of interactive, user-driven websites and has founded several companies, including Creative Internet Design, Inc., and ArsDigita Corporation. After working extensively with many operating systems and web frameworks, he happily calls Macintosh OS X and Ruby on Rails his preferred programming environments. Aurelius is the principal developer of Caltech's main website, as well as its admissions and alumni sites. He is a graduate of Rensselaer Polytechnic Institute and has a Ph.D. in computational fluid dynamics from Caltech.


Product Details

  • Paperback: 537 pages
  • Publisher: Addison-Wesley Professional (July 30, 2007)
  • Language: English
  • ISBN-10: 0321480791
  • ISBN-13: 978-0321480798
  • Product Dimensions: 9.1 x 7 x 1.3 inches
  • Shipping Weight: 2.9 pounds (View shipping rates and policies)
  • Average Customer Review: 4.2 out of 5 stars  See all reviews (27 customer reviews)
  • Amazon.com Sales Rank: #438,983 in Books (See Bestsellers in Books)

More About the Author

Michael Hartl
Discover books, learn about writers, read author blogs, and more.

Visit Amazon's Michael Hartl Page

Inside This Book (learn more)

What Do Customers Ultimately Buy After Viewing This Item?

RailsSpace: Building a Social Networking Website with Ruby on Rails (Addison-Wesley Professional Ruby Series)
79% buy the item featured on this page:
RailsSpace: Building a Social Networking Website with Ruby on Rails (Addison-Wesley Professional Ruby Series) 4.2 out of 5 stars (27)
$31.49
The Rails Way
6% buy
The Rails Way 4.2 out of 5 stars (31)
$34.64
The Ruby Programming Language
5% buy
The Ruby Programming Language 5.0 out of 5 stars (28)
$26.39
Practical Rails Social Networking Sites (Expert's Voice)
5% buy
Practical Rails Social Networking Sites (Expert's Voice) 3.2 out of 5 stars (10)
$32.84

Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(19)
(18)
(2)

Your tags: Add your first tag
 

 

Customer Reviews

27 Reviews
5 star:
 (17)
4 star:
 (4)
3 star:
 (2)
2 star:
 (2)
1 star:
 (2)
 
 
 
 
 
Average Customer Review
4.2 out of 5 stars (27 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
32 of 34 people found the following review helpful:
5.0 out of 5 stars Invaluable resource for hands-on learning of Ruby on Rails, September 11, 2007
By Nate Klaiber (nkbookreviews.com) - See all my reviews
  
RailsSpace does an excellent job of teaching Ruby on Rails through a hands-on, real world application. If you are like me then you probably cringed at the thought of yet another social networking site. However, after reading through the first part to this book my apprehensions were put at ease. The authors explained in the opening chapter that "There's a tension in any educational book between the two extremes of pure tutorial and pure reference. We land firmly on the tutorial side of this spectrum--" The audience for the book is anyone beginning with Ruby on Rails. This book assumes no prior knowledge of Rails or Ruby, and sticks to that through the entire book. Each chapter walks you through the process of creating RailsSpace, while also teaching you best practices and some of the nuances of Ruby and the Rails framework.

This book is broken into two main parts, Foundations and Building a Social Network, with each part comprising several chapters each.

Foundations
Getting Started
With the introduction out of the way, it is time to jump into building the application. This chapter assists you in getting Ruby on Rails and its dependencies on your platform of choice, and then gives instruction for setting up your development environment. Once all of the pieces are in place they move to setting up your rails application, and how to get started with your first pages. They use rails generator to create the controllers and give you an idea of the default routing of a Rails application. The rest of the chapter spends some time building views and using embedded ruby to work with your templates. For the beginner to Ruby or Rails, this part is valuable for the rest of the application. They teach the basics of Ruby and introduce you to instance variables, hashes, and symbols. It isn't practical for them to cover everything, so they also give you direction on finding answers to questions that might arise. The first place to look is always the API. We have the basics down, we have created our application, generated some controllers, and put our navigation into place.

Modeling users
What good is a social networking site without any users? Here we are introduced to setting up our models in our application. This chapter touches on defining your schema through the use of migrations. You build the migration, run the migration, and then work within the model to create your validations. They spend some time with the validations and show you how to use the default helper methods or extend the validations to be more powerful and suit your needs. Now we have a place to store our users, lets move on to the process of letting them become part of the community.

Registering users
This chapter focuses on the process needed to allow a user to register to RailsSpace. We are introduced to some more Rails magic as we build the User controller and the views. We start first with the view of the registration form and learn how to use Rails helpers to generate our form fields and error messages. Next we look at the action that handles the response to the user. This involves the validation, flash error messages, and flash notifications. With the registration in place, we take a pause to look at something very important in any software development: testing.

Getting started with testing
Before we move any further we need to make sure things are responding as they should be. Testing things yourself may seem practical when the application is small, but as it expands testing proves to be extremely useful. We create tests for the database connection, our site controller, the registration process, and testing of the User model. Testing allows us to check all important aspects of our application. We can simulate the processes of a user and assure that we receive the proper response and that everything stays fine tuned. This chapter sets the foundation for the rest of the application as we expand and create new tests. We have tested everything is working as planned, now let's handle the process of logging in.

Logging in and out
Authenticating a user may seem simple at first glance, but there are often times steps that are overlooked in the process. This chapter attempts to cover all bases of making the login process painless. We learn how to setup the database for sessions and how to utilize them in our application. The sessions allow us to keep state of a user and their privileges. This also means that we need to protect our pages and some of our actions. They take the time to cover friendly URL forwarding, letting a user be directed back to any page after they login. Again, we run tests as we build more pieces onto the application. The end of the chapter is spent looking at the current code and refactoring to keep neat and tidy with the DRY principle. Just as with testing, this is also a very important part to the application and something the authors spend time doing with each and every piece of the application. We are also introduced to some more helpful Ruby nuances such as boolean methods and the bang! methods. A user has the ability to login, but we can take it one step further.

Advanced login
Users now have the ability to login. It is time to extend the login by allowing the application to remember the user. This chapter is spent on building the remember me functionality. This involves extending several aspects including the User model, the user session, and the authentication cookie stored in the browser. Since we are updating different aspects we take the time to extend our tests, assure our previous tests still work, and refactor some more of the code that we are building.

Updating user information
With login out of the way it is time to look at allowing users to interact with the website. The first part to this interaction is allowing them to update their details and information. This chapter discusses the process of allowing a user to change their email or update their password. The username is left untouched, as we will be creating a permalink with their username.

Our foundation is set. We have come a long way in just a few chapters, now it is time to extend our solid foundation.

Building a Social Network
Personal profiles
In the last chapter we allowed the user to update their email and password. Now we extend that to let the user create their own profile or spec. This allows a user to share all of their most intimate details one a single page. We look at building the user profile to be modular and utilize the same views for the public face and administrative face. We are introduced to some more rails helpers and some advanced routing techniques named routes. The user profile is in place, now it is time to create the pieces that allow all of your friends, teachers, aunts, and enemies to find you.

Community
The next few chapters will be spent building the central hub that will allow you to interact with the community as a whole. The first part addresses setting up the Community controller and setting up sample data to test our features with. Our first piece to the community controller is allowing you to browse users by an alphabetical index. This shows us some more options of the find method in ActiveRecord and how we can implement pagination and a summary in our results. Browsing by an alphabetical index is helpful, but lets move on to allow search and browsing by A/S/L.

Searching and browsing
Here we are introduced to plugins and using Ferret to help us with our search. As with the alphabetical listing we set it up to allow pagination within the results. We then setup a custom form to allow the user to search by age and sex. This utilizes the same views to return the results and allow pagination. Now we look at the location part. This is a little more advanced as it uses a GeoData database and a proximity search that allows you to find other users within a certain mileage of your current zip code. This concludes giving us all of the tools we need to find any information we need related to our users.

Avatars

What good is a name without a face? This chapter discusses several new aspects. The first is using a model that doesn't connect to a table in the database. The second is handling image uploads and resizing. We create the interface and allow for the user to upload, save, or delete their picture.

Email
This chapter introduces us to Active Mailer, an aspect of Rails that allows us to send emails. We will setup a model that extends Active Mailer, configure our server to send email, and create the necessary links to allow users to contact their friends. We create a double-blind email system that allows the users to contact each other without exposing their actual email address. Naturally, we add the methods that allow you to correspond with the user. Once it is all in place, we take a look at some new testing methods that allow us to simulate the sending of emails without filling our inboxes.

Friendships
Friendships live at the core of creating a social networking system. After all, the more friends you have the more popular you must be in real life! Again, we are introduced to some new modeling techniques in this chapter. In order for a user to be a friend with another user, we must create the relationship accordingly. This involves having a Friendship model that has the current user ID, and the friend ID. Using has_many :through we are able to recursively look through this table to keep track of the friendships and their statuses. As with everything else, we take the time at the end to test and refactor.

RESTful blogs
This chapter throws an advanced topic our way, that of creating RESTful URLs for our application. There is much to be... Read more ›
Comment Comment (1) | Permalink | Was this review helpful to you? Yes No (Report this)



 
26 of 28 people found the following review helpful:
5.0 out of 5 stars My favorite of the Ten Ruby and Rails Books on my desk., August 3, 2007
By Charles Harvey (Arlington, Va United States) - See all my reviews
(REAL NAME)   
For this beginner/intermediate programmer struggling to become a Ruby and Rails expert, RailsSpace strikes a perfect chord.

I have been working through the Safari version of the book until receiving my hard copy yesterday.

I would highly recommend this as the first book on learning RoR after a pure Ruby book such as

Programming Ruby: The Pragmatic Programmers' Guide, Second Edition"(known in the community as the Pick Axe)

or

Beginning Ruby: From Novice to Professional (Beginning from Novice to Professional)"

two excellent books on Ruby which I found out the hard way is best learned before tackling Rails.

One of the many things that make this book a pleasure to study is the code just works as is. For those of you who have suffered through many Rails books that in the rush to publish have you constantly referring back to 5, 6, or more of errata, it is such a nice surprise to enter code and it just works. I am currently running Ruby 1.8.6 and 1.2.3 the current versions and have had to refer to only one example of errata in the first half of the book.(p.24 gemserver should be gem_server). Kudos to the technical editor for a "getting it correct."

The authors' programming style(s) are easy to read while following and teaching the Ruby/Rails community practices. The book uses output examples after each snippet of code so you can follow along not wondering if what you just did worked.

The example app you produce while working through RailsSpace is not YASNS (Yet Another Social Networking Site) rather a (LBERBPS) Learn by Example Rails Best Practices Site. It was fun for me as I was tired of shopping cart, and book/music store examples.

I don't know how to put it into to the right words, but this books code flows.

I always enjoy the rare book that sets a standard of excellence, and that is what puts this book at the top of my Ruby on Rails Library.



Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
11 of 12 people found the following review helpful:
5.0 out of 5 stars Pretty Good, August 21, 2007
By Li (CA) - See all my reviews
  
Amazon Verified Purchase(What's this?)
This book is a must have for a beginner Ruby on Rails programmer. It covers all of the basics of building a social networking website in depth. Specifically Railspace goes over: registration, login, user relationships (friends - this is quite complicated for the beginner), search, image uploads, and more... While you could technically use Google and the many Rails forums to find the answers found in this book, using this book is both a time saver and headache preventer (if it were around when I started development on my website).

On a related note, I've read both this book and Practical Rails Social Networking Sites. In my opinion, you should get both books. However if you have to choose one it would depend both on your skill level and taste. Would you rather have more subjects covered with less material, or would you like less subjects being covered more in depth. If you want more detail or if you are just starting ROR development, then I think RailsSpace wins. Still I would get the other book too since they're both pretty cheap (at Amazon.com)
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews

5.0 out of 5 stars Great introduction to Rails
I purchased this book after reading through some other Ruby and Ruby on Rails books and I find that RailsSpace provides an excellent introduction to Ruby, Ruby on Rails and the... Read more
Published 1 month ago by Stefan Uelpenich

1.0 out of 5 stars Maybe good back when good reviews were given
This book is horribly outdated, and trying to learn Ruby on Rails with it is an exercise in frustration. Read more
Published 5 months ago by Maneki Neko

3.0 out of 5 stars Good, but out-of-date
I must agree with other reviewers that this book is out-of-date. The author makes common use of things that are now deprecated in the newer versions of the software... Read more
Published 7 months ago by Michael N. Burch

1.0 out of 5 stars You need a manual for the book
I'm not an experienced coder by any means but I do have some very basic fundamental understanding of both Web programming (HTML, PHP, PERL, CSS) and working within Terminal (on my... Read more
Published 8 months ago by space kaiser

5.0 out of 5 stars Great reading, even if slightly outdated
I love this book because it is highly readable and full of little asides explaining why things work the way they do. Read more
Published 9 months ago by A. Kast

5.0 out of 5 stars Great Intro to Ruby on Rails
If you're thinking about getting this then stop now and just do it. It's a great introduction to RoR that is fun and practical. Read more
Published 16 months ago by Patrick Tulskie

3.0 out of 5 stars Mediocre for an experienced coder
I found this book frustrating. About 70 pages into the the tutorial I realized I was monkey-typing and had no real idea what was going on -- things were happening, but I didn't... Read more
Published 16 months ago by dondo

2.0 out of 5 stars Doesn't work with Rails 2.0
Buy this book at your own risk. It doesn't work with Rails 2.0 and even the author's updates (on the website) that supposedly makes it Rails 2.0 compatible doesn't work. Read more
Published 17 months ago by Negus Shabaka

5.0 out of 5 stars Greatg starter book for RoR
This book is teriffic. I started my journey into RoR by buying the two canonical starter books, Programming Ruby: The Pragmatic Programmers' Guide and Agile Web Development with... Read more
Published 19 months ago by J. Edlin

4.0 out of 5 stars Smacks of zealotry
You know you're in trouble when a nerd draws comparisons between anything on his computer and sex, and that's unfortunately what happens in the first few paragraphs of this book's... Read more
Published 19 months ago by orangekay

Only search this product's reviews



Customer Discussions

This product's forum
Discussion Replies Latest Post
How popular is Ruby on Rails ? 0 February 2008
See all discussions...  
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Discussion Replies Latest Post
Textbooks for Kindle DX? 61 2 days ago
textbook scam 66 7 days ago
Amazon is a great place to buy textbooks! 35 19 days ago
Search Customer Discussions
   




Product Information from the Amapedia Community

Beta (What's this?)

Help us improve this fledgling article by editing it on Amapedia.com opens new browser window



Look for Similar Items by Category


Look for Similar Items by Subject

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Your Recent History

 (What's this?)

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.