Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>MVC and 3-tier are <strong>completely different</strong> things.<br /> I see a lot of people confuse the two because both got 3 parts.</p> <p><strong>MVC</strong> is a <strong>UI pattern</strong>:<br/> <strong>View</strong>: contains html and js only (in case of a web project)<br /> <strong>Controller</strong>: is a kind of a mediator between the UI (= the view) and the back-end (= the model)<br /> <strong>Model</strong>: this is where your domain objects live, as well as the business and data-access logic </p> <p><strong>3-tier</strong> concerns the <strong>whole</strong> of you <strong>application</strong>:<br /> <strong>UI</strong>: contains the html/js as well as the code behind of the pages.<br /> There is absolutely <strong>no logic</strong> here, other than UI code and calling the business layer.<br /> <strong>Business layer</strong>: this is where you put things like calculations, conditions, validation, ..<br /> So the actual behaviour of your application. There is no <strong>data access</strong> code here.<br /> <strong>Data access</strong>: here where you talk to the database and return the data to the business layer.<br /> <strong>Nothing else</strong>, the business layer should know what to do with it.</p> <p>So if you <strong>combine the two</strong>, you'll get:<br /> UI: views and controllers<br /> Business layer: part of the model<br /> Data access: part of the model<br /> Domain object: you'll want to put the objects you're working with (product, order, ..) in a separate layer.<br /> This is also a part of the model.</p> <p>Shoot if you got questions!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload