But... WTF is MVC? Microsoft Visual C++?

I'm crawling with acronyms :/

  • 10
    Model View Controller
  • 3
    It's a design pattern, a way of designing a program. MVC stands for
    - Model : this is where actual functionality is implemented, it does the work
    - View : this displays the Model's data to the user. It usually implements interfaces that the model will call to, so that you can change the view easily with little changes to the model.
    - Controller gets user input, I personally have a very hard time distinguishing it from the View

    If anyone knows this better than me, please correct me, I'm not 100% sure I got it right
  • 4
    model takes care of data handling,
    Controller does the logic,
    The view is being pretty
  • 2
    @Codex404 Thanks, started to think I learned it wrong 😓
  • 1
    @linuxxx well I got taught MVC wrong three times (at the same school teachers were debating).

    Then I followed the internet, my colleagues and frameworks. Which taught me the right way.
  • 0
  • 1
    The M in MVC are the models containing the data for the view aka classes mirroring your database

    The V is the viewlayer where the data from the models is being displayed in a markup language

    The C are the controllers responsible for passing the models to the viewlayers and also containing state about the views

    Check out MVVM (should be MCVMV) where a View Model is added, which get's responsible for representing the whole state of the view (combination of models and UI state) which leaves the controller with the task to just present the models

    Add some repositories and services with dependency injection and your good to go ;)

    Sorry for the long comment, hope this helps
  • 0
    @phexter you are right, but a database isnt just the one you think of righr away. An txt file is also an ini file is also a database according to the global definition.
  • 0
    @phexter This is the first time I hear this pattern, thank you very much everyone !! ^_^
  • 0
Add Comment