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

The Archive Base Latest Questions

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

I am primary a web developer but I do have a very good understanding

  • 0

I am primary a web developer but I do have a very good understanding of C++ and C#. However, recently I have writing a GUI application and I have started to get lost in how to handle the relationship between my controller and view logic. In PHP it was very easy – and I could write my own MVC pattern with my eyes closed – mainly because of how PHP is stateless and you regenerate the entire form per request. But in application programming languages I get lost very quickly.

My question is: how would I separate my controller from view? Should the view attach to events from the controller – or should the view implement an interface that the controller interacts with?

  • 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. 2026-05-10T18:30:33+00:00Added an answer on May 10, 2026 at 6:30 pm

    If I was you I would expose events from an interface of your view. This would allow you to make the controller central to the entire interaction.

    The controller would load first and instantiate the view, I would use dependency injection so that you don’t create a dependency on the view itself but only on the interface. The controller would access the model and load data into the view. The controller would bind to events defined on the view interface. The controller would then handle saving of data back to the model via an event.

    If you wanted to you could also use an event broker which would void the need to declare an interface per view. This way you could bind to events through attributes.

    This would leave you with the Controller being dependent on the model and the view interface, the view being dependent on the data only and the model having no dependencies.

    Some examples of the above design thinking can be found in CAB and the Smart Client Software Factory Link To Smart Client. They use the MVP pattern but it could equally easily be applied to the MVC pattern.

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

Sidebar

Ask A Question

Stats

  • Questions 74k
  • Answers 74k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I'm not familiar with the functions in question but: #if… May 11, 2026 at 2:32 pm
  • added an answer Folks, I could be off-base here, but based on the… May 11, 2026 at 2:32 pm
  • added an answer Your call seems all right to me, i think this… May 11, 2026 at 2:32 pm

Related Questions

I am not sure how to phrase a good question, so I will just
I am having a similar issue to this person . The primary difference being
For a web application I'm developing, I need to store a large number of
I am working on a web API for the insurance industry and trying to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.