Hot answers tagged

4

Model View Controller is one of the oldest if not first design pattern. It was created at a time when few people understood any proper way for objects to interact. Consequently the only common thing implementations have is three separate areas of responsibility: Model, View, and Controller. How they interact and which knows about what is completely up for ...


3

One way to achieve what you're asking with minimal code changes is to check in both the view and the model if data has actually changed when a notification comes in before performing an update/notify. Program-flow example: User sets text field to "Some text". GUI sends an update notification to the model with the new value. Model checks that the value has ...


2

Your understanding is correct. Keep in mind that different frameworks use different approaches, so something which would for instance apply to Laravel won't necessarily apply to, say, Symfony. This is especially true when it comes to deciding where the logic goes: some frameworks use models as basic objects containing data, but practically no logic by ...


1

With a little guidance from @RobertHarvey I found a StackOverflow answer about Presentation Models. A presentation model is a utility class that is used to render data on a screen or report. Presentation models are typically used to model complex data structures that are composed from data from multiple DTO’s. Presentation models often represent a ...


1

Design patterns don't have much to do with with languages you use. They attempt to separate an application to different elements in an effort to facilitate loose coupling and portability to different platforms to mention a couple. I don't see why using MVC wouldn't be feasible in game development. The nature of the application very rarely defines the ...


1

The decision of whether something has been modified or not is best left to a collection of objects that can perform change-tracking or dirty-checking. Your view model is not the best place for this. Having a collection of classes called your "Domain Model" containing business logic and utilizing an Object Relational Mapper (ORM) can do the dirty checking of ...



Only top voted, non community-wiki answers of a minimum length are eligible