java - MVC pattern vs Three tier - where does logic belong to? -
I am trying to present some good practices in coding my website, so I started checking MVC , Because it is a keyword website design :-) Though I'm confused by the MVC pattern. I used to think in one where you have 3 layers:
- Presentation
- Logic
- Data <
-
The "model" component is often presented as the data layer (database abstract) above. But where is the "high level" logic related? Decide what you will do with the data and how, check permissions, etc. Sometimes I've seen some controller, but it's really confusing in deciding which one is related to me.
-
The MVC pattern as a circle of 3 components that sends messages to each other, such as M - & gt; V, V - & gt; C, C - & gt; M, and around the other side, I fully understand the three-level design, where one layer calls the layer below it, but is not on the other side! Functions in your programming language can call other functions (you can call it "sending a message") - but this is an oriented tree graph. But how can the lower layer be, or, how is it said that the function can "send message" or "inform" the calling function?
Maybe I am very worried about MVC patterns and happily with my three-level designing? Anyway, I would like to understand MVC patterns at least to see if it's worth it to me.
Model is another way to tell your domain knowledge, your administrator should decide who Display, update, create, and present your model of the model should still present the data that the administrator has decided to present. To address your second question, the model is generally passed to see through the controller to see the data presented.
Scroll down to the Model View Controller section of for more details.
-
Comments
Post a Comment