The Rails View: Create a Beautiful and Maintainable User Experience is a book published by the Pragmatic Bookshelf by Bruce Williams and John Athayde. It is the most comprehensive resource on the view layer in Ruby on Rails available, clocking in at 264 pages and 9 chapters.
The book explains each concept to the reader by building an application ArtFlow. Each chapter builds upon the content in the previous, and provides a good sense of the order in which things should be done while developing.
Despite the fact that I have been working with Rails for years, I found the book to be an excellent reference and filled with things I wasn't aware of. For example, having read multiple HTML5 books, I was surprised to discover
<aside> tags are not to be used for layout sidebars. While some of the chapters were introductions to technologies such as Sass, the authors always provided enough tips and links to further explore each topic.
Who Should Read It?
- Anybody working with Ruby and maintain views for web applications. While some of the chapters are Ruby on Rails specific, many of these concepts can be applied to any Ruby web framework such as Sinatra.
- Rails developers looking for a great reference for building a maintainable view layer.
- Experienced Rails developers looking to learn a couple new tips and tricks.
Here is a list of what is covered in The Rails View:
- Creating an Application Layout
- Improving Readability
- Adding Cascading Style Sheets
- Building Maintainable Forms
- Using Presenters
- Handling Mobile Views
- Working with Email
- Optimizing Performance
When reading the book, I was constantly reminded of a presentation I watched on the Envy Labs Blog named "Beautiful Markup"
Only after taking a look at the video again did I realaize that it was done by co-author of The Rails View, John Athayde.
While the presentation is from 2010, it is a great compliment to the book. Many of the topics are still relevent today and are expanded upon in the book.
If you are developing Ruby on Rails applications for a living, you should pick up The Rails View. While some areas may be to introductory for some developers, there will always be enough new knowledge to be discovered that more than pays for the book.