Jump to ratings and reviews
Rate this book

The Rails View: Creating a Beautiful and Maintainable User Experience

Rate this book
Working in the View layer requires a breadth of knowledge and attention to detail unlike anywhere else in Rails. One wrong move can result in brittle, complex views that stop future development in its tracks. This book will help you break free from tangles of logic and markup in your views as you pick up the practical skills you need to implement your user interface cleanly and maintainably.

You'll discover how to build up solid, sustainable layouts and popular interface elements with semantic HTML5 and CSS3, and when you can responsibly generate markup and use advanced presenters... all without leaving the designers on your team out in the cold. Widen your appeal with responsive design, and discover how new progressive enhancement techniques can take you beyond the "weakest link" approach of the past. Master the asset pipeline introduced in Rails 3.1 and use Sass and Coffeescript to make your interface code shorter and more enjoyable.

You'll create elegant, well-structured views that are a joy to build on. You'll appreciate its comprehensive, objective guidance in a realm full of subjective opinions.

What You

All examples in the book assume Rails 3.1 or later and Ruby 1.9.x are installed. Detailed information on how to install these for Windows, Mac OS X and Linux is included in the book.

245 pages, Paperback

First published March 6, 2012

5 people are currently reading
80 people want to read

About the author

Bruce Williams

1 book9 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
13 (18%)
4 stars
30 (42%)
3 stars
23 (32%)
2 stars
3 (4%)
1 star
1 (1%)
Displaying 1 - 11 of 11 reviews
Profile Image for Bjoern Rochel.
398 reviews83 followers
August 31, 2012
Like a coin this book has two sides. One side where it really shines and, well, one where it doesn't. I really like the parts where it's rails specific and I tend to think that I learned quite a bit regarding view level structuring, the presenter pattern and some useful gems. Since I currently work in a 3.0 app I also appreciated the detailed description of the asset pipeline and how it affects the structuring of javascript files and stylesheets. What I didn't like in particular are those areas where the introduction chapters in the book, namely html5, sass and media queries. They feel like generic fillers. I would've preferred I they'd just reduced the book to the rails specific parts and only referred to external material for the general topics.
Profile Image for Lynn.
5 reviews12 followers
March 28, 2012
As a designer working with rails apps, this is the book that I wish every developer on my team had read before starting any project. It gives a real understanding of best practices, helpful tips and tricks that will help developers understand the power of creating clean, semantic views as well as being a good read for designers working with rails 3.1 and the new asset pipeline offering.
Profile Image for Dave.
127 reviews8 followers
November 13, 2024
Much to my surprise and delight, I'm working on a greenfield Rails application at the moment, one which doesn't warrant a full-blown SPA system such as React. Hence, review the Views! I've had this book since (probably 2012) but had not read it thoroughly then. On this read, I was pleasantly surprised to find several useful techniques I either missed or had forgotten. I did skip the chapters on CSS and Javascript, I'm working in Rails 8 right now, and those are too out of date. I can recommend this book for 1. when working with legacy system dating from Ruby 2.x and Rails 3/4, 2. when you find it super inexpensively (or acquire as a gift) and need some Rails View referesher, and 3. if you're the sort of person with the space inclination to have an extensive, historically relevant Rails library.
Profile Image for Katherine.
149 reviews
October 11, 2013
This is for beginners. I did not learn anything new here. I have over 5 years experience in Ruby on Rails.

This is my suggestion for some chapters:

Chapter 1: Some bad examples have to be rewritten. You load JavaScript below closing body tag. Never add that within head tag.
Chapter 3: Prefer SASS import rules over Sprockets require directive.
Read: http://robots.thoughtbot.com/post/250...

Chapter 7: Prefer mocks and stubs over factories. They speed up tests by at least 50%. In the long run, you would not want to use factories to test views, helpers and presenters.

I have yet to find a well-written Rails book for designers and frontend developers. This is not that book.
Profile Image for Stefan Kanev.
125 reviews235 followers
May 13, 2012
It's a nice overview of most of the technologies you should know about in Rails, but it does not go into great depth. You can **learn about** a lot of things, but **learn** a lot of things.

The book is great for someone who is just entering the Rails world, or who is not too-experienced in the front-end. It's a good read for seasoned Rails developers too, since there are are a couple of gems for everybody.
Profile Image for Todd.
18 reviews7 followers
December 8, 2013
The book is a little lacking when it comes to editing, but it has many good techniques to teach. It's a great book for a back-end Rails developer who needs to take on front-end work after years of being able to delegate or expecting others to do that work.
Profile Image for Michael Bond.
159 reviews4 followers
June 26, 2013
I enjoyed the depth provided here. It provides some novel techniques and interesting details that you don't find in the larger books that attempt to do everything.
Profile Image for Kiril Kirilov.
110 reviews16 followers
September 25, 2013
Could be better (but also could be worse). This book is satisfying for my current level of Rails understanding.
Profile Image for Orban.
41 reviews
December 28, 2013
A comprehensive reading about the View part of Ruby On Rails.
Displaying 1 - 11 of 11 reviews

Can't find what you're looking for?

Get help and learn more about the design.