Skip to main content
added 75 characters in body
Source Link
Bart van Ingen Schenau
  • 76.7k
  • 20
  • 125
  • 189

The additional kind of logic you mention (User Interface/Domain Model Manipulation Logic)It is actually a mixturethe job of User Interaction Logicthe Controller in MVC to take the data that the user has entered and Business Logicto modify the Model accordingly.

The example of sendingIn many cases, this might be as simple as hooking up a welcome emailclass from the Model to the View (or ViewModel) and caliing Commit on the database after inserting the new user inconfirmed the database is a prime example of Business Logicedits.
Actions that are based on options thatBut sometimes, like in your example with the user selectedBlogPost, the logic in the UIController has to be more involved to ensure that the constraints laid down by the Model are a good example of User Interaction Logicobserved.

The additional kind of logic you mention (User Interface/Domain Model Manipulation Logic) is actually a mixture of User Interaction Logic and Business Logic.

The example of sending a welcome email after inserting the new user in the database is a prime example of Business Logic.
Actions that are based on options that the user selected in the UI are a good example of User Interaction Logic.

It is the job of the Controller in MVC to take the data that the user has entered and to modify the Model accordingly.

In many cases, this might be as simple as hooking up a class from the Model to the View (or ViewModel) and caliing Commit on the database after the user confirmed the edits.
But sometimes, like in your example with the BlogPost, the logic in the Controller has to be more involved to ensure that the constraints laid down by the Model are observed.

Source Link
Bart van Ingen Schenau
  • 76.7k
  • 20
  • 125
  • 189

The additional kind of logic you mention (User Interface/Domain Model Manipulation Logic) is actually a mixture of User Interaction Logic and Business Logic.

The example of sending a welcome email after inserting the new user in the database is a prime example of Business Logic.
Actions that are based on options that the user selected in the UI are a good example of User Interaction Logic.