# Question

**URL:** <https://www.ruby-forum.com/t/question/77133>\
**Category:** Ruby\
**Created:** [November 24, 2006, 4:25pm UTC](https://www.ruby-forum.com/t/question/77133 "2006-11-24T16:25:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![businessnews](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8dc957/32.png) [@businessnews](https://www.ruby-forum.com/u/businessnews)\
**Post date:** [November 24, 2006, 4:25pm UTC](https://www.ruby-forum.com/t/question/77133/1 "2006-11-24T16:25:52Z")

</div>

I don’t have much experince in using any web based framework.  
I have a few questions. I understand that ruby on rails is an open  
source web application framework written in Ruby that closely follows  
the Model-View-Controller (MVC) architecture. Could someone explain the  
MVC architecture in simple terms?  
To use the rails framework, does one need to have knowledge of the ruby  
programming language?  
Does it support javascript?  
If one is to compare this with coldfusion, which is the better choice  
for creating database driven websites and why? Which one is better?

* * *

[www.OnlineBusinessServices.net](http://www.OnlineBusinessServices.net) - BPO offshore company, outsource Email &  
Chat 24 website support services, news b2b outsourcing

---

<div class="post-metadata">

**Author:** ![businessnews](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8dc957/32.png) [@businessnews](https://www.ruby-forum.com/u/businessnews)\
**Post date:** [November 24, 2006, 5:14pm UTC](https://www.ruby-forum.com/t/question/77133/2 "2006-11-24T17:14:17Z")

</div>

On 11/24/06, Abra C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Could someone explain the MVC architecture in simple terms?

Someone has:

> **[Model–view–controller](https://en.wikipedia.org/wiki/Model-view-controller)**
>
> Model–view–controller (MVC) is a software design pattern commonly used for developing user interfaces that divides the related program logic into three interconnected elements. This is done to separate internal representations of information from the ways information is presented to and accepted from the user.
> Traditionally used for desktop graphical user interfaces (GUIs), this pattern became popular for designing web applications. Popular programming languages have MVC frameworks that facilita...

> To use the rails framework, does one need to have knowledge of the ruby  
> programming language?

Yes.

> Does it support javascript?

Yes. It includes the [script.aculo.us](http://script.aculo.us) JS library and facilitates the  
construction of AJAX apps.

> If one is to compare this with coldfusion, which is the better choice  
> for creating database driven websites and why? Which one is better?

“Better” is always relative. Cold Fusion is based on the premise that  
you should embed application logic in the HTML. This is considered bad  
today, and the whole point of MVC is to avoid mixing business logic  
and presentation, to improve maintainability and flexibility. To me,  
comparing Cold Fusion to Rails is like comparing an ox-drawn carriage  
to a Ferrari, but I admit this is subjective (comparisons always are).

Also, Cold Fusion is proprietary software, which for me is a fatal  
flaw for a software plaform. I don’t mind wasting time and money with  
proprietary games, but building your business on proprietary languages  
and frameworks is too risky. Nobody knows whether Cold Fusion will be  
actively maintained 2 or 3 years from now. The once mission-critical  
Windows NT server OS is no longer maintained, and none of it’s users  
can do anything about it because it was a proprietary product. Now  
it’s a non-product, unsupported but still in production in many places  
that could not migrate fast enough to keep up with the business goals  
of Microsoft.

Cheers,

Luciano

---

<div class="post-metadata">

**Author:** ![businessnews](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8dc957/32.png) [@businessnews](https://www.ruby-forum.com/u/businessnews)\
**Post date:** [November 24, 2006, 10:27pm UTC](https://www.ruby-forum.com/t/question/77133/3 "2006-11-24T22:27:19Z")

</div>

Abra C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I don’t have much experince in using any web based framework.  
> I have a few questions. I understand that ruby on rails is an open  
> source web application framework written in Ruby that closely follows  
> the Model-View-Controller (MVC) architecture. Could someone explain the  
> MVC architecture in simple terms?

Yes. See below.

> To use the rails framework, does one need to have knowledge of the ruby  
> programming language?

Yes.

> Does it support javascript?

Yes.

Model-view-controller is an old, tried-and-true pattern for separating  
the functionality of GUI programs into three areas:

(1) The underlying data and the management thereof. (Model)

(2) The visible manifestation; the user interface. (View)

(3) Mediation between (1) and (2). (Controller)

So basically MVC just means that visible form and underlying content are  
separated. This is always a good principle because it means you can  
change one without necessarily changing the other. If my view is  
expecting to display the value of a variable called @lastname, it  
doesn’t matter to it how @lastname is determined. If my model is a  
database containing a table “people” containing a field “lastname”, it  
doesn’t care how (or whether) that data is displayed. The controller’s  
job is to ask the model for the data and put it into the @lastname  
variable so the view can display it; it is the mediator.

Rails literally separates model, view, and controller into three  
different pieces of the program you write. It enforces MVC for you by  
the sheer physical structure of a Rails app, as well as by the  
underlying behavior. m.
