Which Page Is Which Acording To Model-view-controller?
EDIT: My below example is more of a post-redirect-get than a MVC I am reading a lot about correct structure for my page, MVC pattern, frameworks etc. and yet I am confused which pa
Solution 1:
Which page is which according to model-view-controller?
A page is a page. It isn't part of MVC, it is built using MVC.
The view is the class that (given some data) generates whatever is sent to the client (usually HTML).
The model is the class that operates on the data. It talks to your database or other data store.
The controller is the class that looks at the URL, decides which models and views are right for it and exchanges data between the submitted data, the models and the view.
Am I doing it right at all?
No
Where would I link or include index.php?
Your index page should just bootstrap your controller class.
Post a Comment for "Which Page Is Which Acording To Model-view-controller?"