Skip to main content

Model/ Domain Model

Go To Naming Conventions

For information regarding models, click the images below

image-1602130700401.png

  • Contain properties to represent specific data e.g EF Entities or SQL objects
  • Contain business logic (e.g. validation rules) to ensure the represented data fulfills the design requirements
  • May contain code for manipulating data. For example, a SearchForm model, besides representing the search input data, may contain a search method to implement the actual search. e.g. Domain Conventions
  • The model may not contain any logic that is strictly required by the front end. This type of logic must rather be implemented in the View Model e.g. build an html control based on business rules should be done the ViewModel instead of the Model.
  • Should not use $_GET$_POST, or other similar variables that are directly tied to the end-user request.
  • Should avoid embedding HTML or other presentational code.