-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This app uses an extended model of the traditional MVC design pattern, adding a Service Layer, and View Controllers:
Services allow for an additional level of abstraction between the Controller and the Models, and the View Controllers (sort of like React) provide a way to manipulate the views, taking the information from the models and processing it as needed.
Services, which are sort of part of the M portion of MVC, perform tasks that would traditionally be done by the Controller. They comprise of the business logic of the application. This allows the Controllers to concern themselves with sending and receiving messages and information and not with logic.
Models, then, should mostly concern themselves with allowing other parts of the program to manipulate their state (and if there is a database, with updating that state to the database)
Views often the visual representation of a model.
View Controllers is sort of like a service for the views. It takes the information from the controller and then manipulates the views. It also provides the visual user interface, passing the information to the controller, which translates it into back-end commands. Depending on what front-end library we use this may be unnecessary.