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 8541123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:45:31+00:00 2026-06-11T11:45:31+00:00

   I have searched on SO about this question, but I basically haven’t found

  • 0

   I have searched on SO about this question, but I basically haven’t found one concerning this particular scenario; hence, my reason for asking.
    I have a basic, abstract understanding of the MVC pattern: Controller calls the right Model based on the action needed; the Model contains the actual business/data logic, and the View displays the result. What I am having trouble understanding is the actual implementation.
   Originally, my assumption was this: Controller calls Model; Model processes information, and returns the data back to Controller; Controller call the View, passing this
data to the View, which simply displays it. After reading more articles on MVC, I discovered that the Model doesn’t really pass the data back to the Controller; rather, it fires an event, which allows the Controller to call the proper View.
My question centers on this event firing part:

   Q.1: Must an event really be fired? Once the Model completes its processing, and returns control to the Controller, can’t the Controller simply call the View?
   Q.2: In an actual implementation, a Model object is injected into a Controller class. So, Model object basically has no idea what Controller called it. How does it know what Controller to fire an event to? And how do we know what Controller is expecting that notification?
   Q.3: The Controller calls the View, injecting it with the current Model object, so the View can use it to obtain the needed data. Is this correct or wrong? If wrong, why is it wrong, and what is the proper way to do it?
   I have read my questions on MVC on here and other sites, viewed MVC diagrams, but I haven’t been able to really connect the dots the way it’s supposed to be connected.
   Thanks.

  • 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-06-11T11:45:33+00:00Added an answer on June 11, 2026 at 11:45 am

    There are many way’s on how the different components on MVC are linked together. I think there is no ‘Golden Rule’.

    I use it the way shown in this picture:

    enter image description here

    The creation of objects is then like this:

    1. the app object creates a controller, depending on the route. The router is injected into the controller.
    2. The controller creates a model, depending on the route. The model is created by a IoC container.
    3. The controller creates a view, and injects the model into the view.

    In my situation I can answer your questions like this:

    Q1: No, I do not use events. There is no need. The controller calls the model, and when done the model has state, and can be used by the view.

    Q2: I do it just the other way, the controller creates the model. The model has no knowledge about the controller, or view.

    Q3: this is the way I implement it.

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

Sidebar

Related Questions

I have searched google but it seems no one has come across this issue.
I have spent quite a few hours reading and learning about LINQ to XML , but
Thanks for reading my question. I have searched for and read similar questions, but
I've searched for this, but maybe I'm using the wrong keywords. I have a
I have this function: function validate($data) { $newData = str_replace( , , $newData); $newData =
I have a sentence like this. 1       2     3
I've searched all over and have only found: <?php wp_nav_menu( array( 'sort_column' => 'menu_order',
I have html output in paging section like this; <p>&nbsp;<strong class=active>1</strong>&nbsp;<a href=http://localhost/project/report_nc/search_now/1>2</a>&nbsp;<a href=http://localhost/project/report_nc/search_now/2>3</a>&nbsp;<a href=http://localhost/project/report_nc/search_now/1>Next
I have searched hi and low for a solution for this, basicly I would
I've searched around and haven't found anything, which is surprising because of how common

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.