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

  • Home
  • SEARCH
  • 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 5957145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:21:32+00:00 2026-05-22T18:21:32+00:00

Before I ask the question, here is my understanding about Controller in MVC pattern.

  • 0

Before I ask the question, here is my understanding about Controller in MVC pattern.

  1. Controller is Application Layer (in DDD)
  2. It controls Application flow.
  3. It is kept thin
  4. It controls unit of work (a.k.a Transaction)

My question is “when should I create new Controller class?“. I’ll take an example as DinnerController in NerdDinner.

  • Is it the controller for Dinner Module? (Is it module? IMO, it is too small for module)
  • If it is, should I create controller for each module? And will the controller become fat?
  • If it is not, when should I create new controller?

I personally prefer to create Controller class per use case. For example, CreateDinnerControllelr, EditDinnerController, ListDinnerController, SearchDinnerController, etc. But there are a few drawbacks IMO such as

  1. Sometimes, it violates DRY principle (it might need to create the same ViewModel in two place, e.g. Create and Edit might have DinnerViewModel)
  2. Need to explicitly define routing? (I still perfer route like /Dinner/Create, /Dinner/Edit/1)

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-22T18:21:33+00:00Added an answer on May 22, 2026 at 6:21 pm

    After working on ASP.net MVC and rails, I think Controller should create per Resource (in the REST style application).

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

Sidebar

Related Questions

I was going to ask a question here about whether or not my design
Before I ask my question: I just started ASP.NET MVC, so an advanced answer
Here is my old question Link I ask a question before,But I put the
I want to ask a question about the iPhone application. I am writing a
i already search here before i ask this question.. I know there is an
I ask a question before Link Here Someone answer the data won't lost But
Before ill ask my question I sould mention that i read every post about
I have a model Question with a field called userid , before one ask
I have ask this kind of question before, but it seems my previous question
before I ask my question I wanted to let everybody know that I appreciate

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.