Decently Exposing Your Views and Controllers 2.87 http://spkr8.com/t/3026

Description:

By far the most common means of making data available inside your Rails views--be they ERB or HAML--is by setting up instance variables inside your controllers. Although Rails makes this dead-simple for you, in reality it breaks encapsulation and leads to a spaghetti-like interleaving between two ostensibly seperate portions of the MVC stack. Enter decent_exposure, a lightwieght gem written at Hashrocket that is intended not only to clean up how data shows up in your views, but to simplify your controller logic as well. Incorporating lazy loading, memoization, and a super-tight implementation, decent_exposure represents a useful new Rails idiom. We'll discuss how it works, how it's written, and how to use it in your own apps.

Comments on this Talk

Stream.22622 John Nunemaker, 19 Apr 04:46 PM

Matt did a good job, but he could definitely be more confident and excited about the topic. I do not necessarily agree with the technique he was talking about, but I love hearing different ideas as it gets the creative juices flowing.

Stream.31899 ideaoforder, 21 Apr 02:34 PM

Ditto on John's comment. I wanted to want to use Decent Exposure--but especially on the tail of Steve's lecture, it just really seemed like it would muddy the code up for other developers. Some context would go a long way.

Avatar-missing-icon-08 , 01 Sep 02:38 PM

Reliable and professional China wholesale website where you can buy wholesale merchandise and dropship them anywhere in the world

China wholesale: The leading marketplace for wholesale products from Chinese Wholesaler and suppliers, including wholesale,Wholesale lipo battery,mobile signal booster,Wholesale Laser Pointer....

Have an account? Sign in or register.

Leave a Comment

9 Ratings: 2.87

Delivery: 2.84

Content: 2.90

Last Five Ratings