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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:14:46+00:00 2026-05-25T19:14:46+00:00

Possible Duplicate: Understanding Model-View-Controller I have a general programming question about how to divide

  • 0

Possible Duplicate:
Understanding Model-View-Controller

I have a general programming question about how to divide up my code, usually (and I’m trying to get away from this) I just write it all in the viewController, lots and lots of code in the view controller. But now i’ve reviewed some information on the MVC but I have some questions.

My Question

Mainly, if I a view controller (holding a model and a view), and in the model I run a method figures out a number display for the view, so just a simple int which the view would take and display on the screen. In order for my model to tell my view to do this should I go straight from model —-> view. Or should I return the data back to the controller and then send it to the view?

Lastly, if I need to send the data back to the controller, how might I do so, because I thought that the model should’nt know about the controller, only vice-versa.

Sorry for the lengthy question. Thanks for all your help.

  • 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-25T19:14:46+00:00Added an answer on May 25, 2026 at 7:14 pm

    There’s a lot of info about this in the net. From Wikipedia:

    Though MVC comes in different flavors, control flow is generally as
    follows:

    1. The user interacts with the user interface in some way (for
      example, by pressing a mouse button).

    2. The controller notifies the model of the user action, possibly
      resulting in a change in the model’s state. (For example, the
      controller updates the user’s shopping cart.)

    3. A view queries the model in order to generate an appropriate user
      interface (for example the view lists the shopping cart’s contents).
      The view gets its own data from the model. In some implementations,
      the controller may issue a general instruction to the view to render
      itself. In others, the view is automatically notified by the model of
      changes in state (Observer) that require a screen update.

    4. The user interface waits for further user interactions, which
      restarts the control flow cycle.

    The goal of MVC is, by decoupling models and views, to reduce the
    complexity in architectural design and to increase flexibility and
    maintainability of code. MVC has also been used to simplify the design
    of Autonomic and Self-Managed systems

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

Sidebar

Related Questions

Possible Duplicate: Undefined, unspecified and implementation-defined behavior I'm trying to deepen my understanding of
Possible Duplicate: What is IOC? Need some practical code examples to illustrate I have
Possible Duplicate: Rails - Help understanding how to use :dependent => :destroy I have
Possible Duplicate: Understanding Python decorators I was reading a django app source code where
Possible Duplicate: Similarity Between Colors I know it's not a programming question but I
Possible Duplicate: Understanding when to call retain on an object? I have a hard
Possible Duplicate: C header file loops Original Question: I always had problems understanding why
Possible Duplicate: How does the Google Did you mean? Algorithm work? Suppose you have
Possible Duplicate: Haskell vs. procedural programming in the real world Few times I heard
Possible Duplicate: Parsing text in C Say I have written to a text file

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.