Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7658289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:10:57+00:00 2026-05-31T13:10:57+00:00

In Ruby on Rails, MVC architecture is designed in such a way that, the

  • 0

In Ruby on Rails, MVC architecture is designed in such a way that, the controller will receive the request and talk to model to receive data and again controller will talk to view to generate html. Now my doubt is, why should model reply to controller and then controller to view, rather than model directly replying to view to generate html. Why was it not designed in that way?

Can someone please clarify? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T13:10:58+00:00Added an answer on May 31, 2026 at 1:10 pm

    … model directly replying to view to generate html …

    And what if tomorrow you need to generate JSON? And then XML? And other 10 formats? Will you update model each time?

    Model, View and Controller have distinct responsibilities.

    • Model – business logic. Saves and loads data.
    • View – renders data in a specific format.
    • Controller – mediator between the two. Parses requests, does authentication/authorization, asks model for data, calls appropriate view with that data.

    There should be no business logic in views, rendering in models, etc. This helps for better, cleaner code.

    In my hypothetical example, you just need to add a view that can render JSON representation of data. And, probably, add one or two lines to controller (often you don’t have to). Model is left unchanged. Its concern is data persistence, not data presentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello Ruby/Rails/Merb developers! Im currently working on a web project that will have a
First let me ask about MVC architecture- ASP.NET MVC and Ruby on Rails. They
Given the Ruby-on-Rails MVC framework, what is the best way to handle a rating
In Ruby on Rails you can write a simple controller action such as: def
In Ruby on Rails Development (or MVC in general), what quick rule should I
Does ASP.NET MVC have anything like the RESTful out-of-the-box features like Ruby on Rails
we have a mixed development environment using ASP.NET MVC and Ruby on Rails. We
I am just starting to write ruby rails. I wrote a controller but is
What is the best way to generate a random DateTime in Ruby/Rails? Trying to
If developing web applications using ASP.NET MVC or Ruby on Rails make the application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.