# Pls tell the answer

**URL:** <https://www.ruby-forum.com/t/pls-tell-the-answer/149195>\
**Category:** Rails\
**Created:** [September 22, 2008, 1:25pm UTC](https://www.ruby-forum.com/t/pls-tell-the-answer/149195 "2008-09-22T13:25:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Barun\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ba8739/32.png) [@Barun\_A](https://www.ruby-forum.com/u/Barun_A)\
**Post date:** [September 22, 2008, 1:25pm UTC](https://www.ruby-forum.com/t/pls-tell-the-answer/149195/1 "2008-09-22T13:25:59Z")

</div>

. What is the difference between having a method in a Model, Helper  
and a  
Controller?

---

<div class="post-metadata">

**Author:** ![Barun\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ba8739/32.png) [@Barun\_A](https://www.ruby-forum.com/u/Barun_A)\
**Post date:** [September 22, 2008, 1:34pm UTC](https://www.ruby-forum.com/t/pls-tell-the-answer/149195/2 "2008-09-22T13:34:48Z")

</div>

On Mon, Sep 22, 2008 at 1:23 PM, Barun A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> . What is the difference between having a method in a Model, Helper  
> and a  
> Controller?

Well, they are available in different places. You’d need to learn some  
Ruby surely before getting into Rails.

---

<div class="post-metadata">

**Author:** ![Barun\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ba8739/32.png) [@Barun\_A](https://www.ruby-forum.com/u/Barun_A)\
**Post date:** [September 22, 2008, 11:53pm UTC](https://www.ruby-forum.com/t/pls-tell-the-answer/149195/3 "2008-09-22T23:53:05Z")

</div>

The Model-View-Controller (MVC) design pattern has been around for a  
long time. If you google for it you will find LOTS of information about  
it.

Having so much written about a topic can present a bit of a problem. The  
danger is that MVC is such an abstract concept that you’ll see people  
“force fit” the idea into some areas where it really doesn’t apply at  
all.

For example, one blog I ran across was attempting to apply MVC to the  
web itself. The article was saying the HTML is the model, CSS is the  
view and the web browser was the controller. Maybe is some twisted  
universe or other space-time dimension that’s true, but in my  
interpretation of MVC that’s pushing things a bit.

Anyway, my point is that there are many ways to apply MVC, but the  
pattern grew from the requirements of desktop application user  
interfaces. The pattern is very clear there (when used properly). Things  
get a little more fuzzy in the web development space.

One of the best documents I’ve read on MVC is actually in the Apple  
Cocoa Fundamentals document. It’s not specifically related to Ruby, but  
it does a good job explaining the roles of objects in MVC.

Find it here:  
[http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/chapter\_5\_section\_4.html#//apple\_ref/doc/uid/TP40002974-CH6-SW1](http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/chapter_5_section_4.html#//apple_ref/doc/uid/TP40002974-CH6-SW1)

Barun A. wrote:

> . What is the difference between having a method in a Model, Helper  
> and a  
> Controller?
