Put Your Controllers on a Diet already!
25 comments Latest by http://www.bestretroshoes.com Tue, 10 Aug 2010 08:56:58 GMT
If you’re working with Ruby on Rails and are looking for ways to improve your existing code base, I would encourage you all to read the following blog posts.
- Skinny Controller, Fat Model, Jamis Buck
- Find methods in controllers, by Graeme Nelson
- RailsConf Recap: Skinny Controllers, The Rails Way
- Rspec notes from the trenches 2, by Courtenay
Hopefully… you’ve already read each of them and as a result… put your controllers on a diet.
Enjoying the content? Be sure to subscribe to my RSS feed.






Are there performance increases in having smaller controllers? I understand that moving a a find method out of the controller into the model may look nicer, but it seems to me that it is an extra step. Why is doing it this way better? Thanks.
Dan,
In general, you’re not likely to find the application speed change much if the code is in the controller or the method. What is being advocated is a cleaner way of developing MVC applications. If we start looking at our Models as a set of APIs that interact with our data source, we can call upon their services and get what they provide us. We provide them with some parameters and they return it. By reducing the amount of code in our controllers, we’re also able to test the behaviour of our models much more efficiently. The more business logic that you can keep in your models.. the better. Perhaps there needs to be more discussion about what is and isn’t business logic.
That explanation makes perfect sense. As someone new to Rails I found myself using models to declare relationships and do validation but not much else. I think many people like myself would find articles about business logic very useful. Thanks.
http://adbrwsrfqwffa.host.com desk3 [url=http://adbswsrfqwffa.host.com]desk4[/url] [link=http://adbawsrfqwffa.host.com]desk6[/link]
The Slim Fast Diet has been around for over two decades. This simply shows that the Slim Fast Diet is really a popular form of diet and it is definitely the most popular diet shake ever existed.
The Slim Fast Diet has been around for over two decades. This simply shows that the Slim Fast Diet is really a popular form of diet and it is definitely the most popular diet shake ever existed.
nice to you will buy Abercrombie & Fitch Abercrombie Fitch Abercrombie
yes, very good, thanks
I’m getting to learn the ins/outs of the system, I find myself having to rerun the specs, which can take quite a bit of time watching.
http://www.mbtchapagtx.com/mbt-lami-black-leather-womens-p-40.html
nike 6.0 dunk
ert
TRY
TRY TROI RTYT;R JRTIOY
Designer Handbags Wholesale Handbags Discount Handbags Barbara Bui Handbags Chloe Handbags Dior Handbags Gucci Handbags Hermes Handbags Jimmy Choo Handbags Louis Vuitton Handbags Miu Miu Handbags Mulberry Handbags Prada Handbags Valentino Handbags Versace Handbags YSL Handbags Handbag Collection Balenciaga Leather Handbags Chloe Leather Handbags Gucci Boston Miu Miu Bow Miu Miu Coffer Mulberry Bayswater Prada Fairy
Louis Vuitton 2009 Collection Louis Vuitton 2009 New Arrival Louis Vuitton Antigua Collection Louis Vuitton Damier Azur Louis Vuitton Damier Geant Canvas Louis Vuitton Damier Canvas Louis Vuitton Damier Graphite Louis Vuitton Epi Leather Louis Vuitton Graffiti Louis Vuitton Leather Handbag Louis Vuitton Mahina Louis Vuitton Men Bag Louis Vuitton Monogram Louis Vuitton Monogram Canvas Louis Vuitton Monogram Denim Louis Vuitton Monogram Dentelle Louis Vuitton Monogram Glace Louis Vuitton Monogram Jokes Louis Vuitton Monogram Leather Louis Vuitton Monogram Leopard Louis Vuitton Monogram Mini Lin Louis Vuitton Monogram Miroir Louis Vuitton Monogram Multicolor Louis Vuitton Monogram Perforation Louis Vuitton Monogram Suede Louis Vuitton Monogram Vernis Louis Vuitton Nomade Louis Vuitton Seasonal Collection Louis Vuitton Snakeskin Leather Louis Vuitton Suhali Leather Louis Vuitton Taiga Leather Louis Vuitton Wallet
Louis Vuitton 2009 Collection Louis Vuitton 2009 New Arrival Louis Vuitton Antigua Collection Louis Vuitton Damier Azur Louis Vuitton Damier Geant Canvas Louis Vuitton Damier Canvas Louis Vuitton Damier Graphite Louis Vuitton Epi Leather Louis Vuitton Graffiti Louis Vuitton Leather Handbag Louis Vuitton Mahina Louis Vuitton Men Bag Louis Vuitton Monogram Louis Vuitton Monogram Canvas Louis Vuitton Monogram Denim Louis Vuitton Monogram Dentelle Louis Vuitton Monogram Glace Louis Vuitton Monogram Jokes Louis Vuitton Monogram Leather Louis Vuitton Monogram Leopard Louis Vuitton Monogram Mini Lin Louis Vuitton Monogram Miroir Louis Vuitton Monogram Multicolor Louis Vuitton Monogram Perforation Louis Vuitton Monogram Suede Louis Vuitton Monogram Vernis Louis Vuitton Nomade Louis Vuitton Seasonal Collection Louis Vuitton Snakeskin Leather Louis Vuitton Suhali Leather Louis Vuitton Taiga Leather Louis Vuitton Wallet
free Ringback Tones value city furniture vitamin shoppe Poptropica nice article for you sharing i like it ….......... thank you very much
Monogram Mini Lin Louis Vuitton Speedy 30 M95319 Louis Vuitton Speedy 30 Louis Vuitton Saumur M95314 Louis Vuitton Saumur Louis Vuitton Bucket PM M95316 Louis Vuitton Bucket Louis Vuitton Boulogne M95317 Louis Vuitton Boulogne Louis Vuitton Speedy 30 M95224 Louis Vuitton Speedy 30 Louis Vuitton Saumur XL M95220 Louis Vuitton Saumur XL Louis Vuitton Diaper Bag M95221 Louis Vuitton Diaper Bag Louis Vuitton Danube M95228 Louis Vuitton Danube Louis Vuitton Bucket PM M95226 Louis Vuitton Bucket Louis Vuitton Boulogne M95225 Louis Vuitton Boulogne Louis Vuitton Manon Mini Pouch M95668 Louis Vuitton Manon Mini Pouch Louis Vuitton Manon PM M95621 Louis Vuitton Manon Louis Vuitton Manon MM M95619 Louis Vuitton Manon Louis Vuitton Saumur M95227 Louis Vuitton Saumur Louis Vuitton Manon PM Platine M95620 Louis Vuitton Manon PM Platine Louis Vuitton Angele M95622 Louis Vuitton Angele Louis Vuitton Angele M95617 Louis Vuitton Angele Louis Vuitton Manon MM M95618 Louis Vuitton Manon
Use specific search terms ed hardy Swimwear at the search engines when trying to find Port Authority items, Always type in the ed hardy Bikini name Port Authority without the quotes before typing the kind of merchandise you are trying to find, For ed hardy Bikini example Port Authority shirts or Port Authority jackets. This will Abercrombie T Shirts give you a list of online clothing stores that carry Port Authority items, Then you can comparison shop and find an online store or mall that fits your needs and budget,Always check the shipping costs on Port Authority items before ordering, Some Web stores will offer a special on shipping for multiple purchases, or they might offer a discount when you ed hardy swimsuits buy multiple you should learn how to wash your jersey properly. a poorly washed jersey’s colors can run or the stitching and patchwork., Beware of stores that advertise extremely low prices, but then bump up the shipping to outrageous amounts, You’ll probably lose money with these,
www.airjordanshoesdiscount.com > jordans www.vibram5fs.com/ > vibram www.fivefingersvibramdiscount.com/ > five fingers vibram www.uggaustralianew.com/ > boots shoes www.airjordanshoesdiscount.com > air jordan
The post is very nicely written and it contains many useful facts. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement. Thanks for sharing with us.
so good
and are looking for ways to improve your existing code base, I would encourage you all to read the following blog posts.
Discount Women parda shoes,Discount Women parda shoes
air jordan retro 18,air jordan retro 18
air jordan retro 19,air jordan retro 19
air jordan retro 20,air jordan retro 20
air jordan retro 8,air jordan retro 8
air jordan retro 9,air jordan retro 9
Air Jordan 2010 Shoes For Sale,Air Jordan 2010 Shoes For Sale
Air Jordan 28,Air Jordan 28