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.
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.
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.
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.
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.
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.
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.
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.