I am looking for a tutorial / book that guides me to understand the Controll functions and the best practices to write my own controller + Model
Thanks in advance.
I am looking for a tutorial / book that guides me to understand the Controll functions and the best practices to write my own controller + Model
Thanks in advance.
Here is a hopefully helpfull link to an article.
and here is a link to a very descriptive tutorial.
Here are some useful links,
Why not trying codeigniter? It is a Model View Controller based Framework.
In combination with doctrine its pretty usefull.
Here the link to some codeigniter tutorials: codeigniter tutorials
You're question basicaly a design patern question, a realy good book about this subject is:
Im sure theres plenty of links been posted to get you started but some important factors in creating an MVC is:
Model_Database
)Library_session
would load /library/session.class.php
)They are just a few tips and ideas you should be thinking about when you create your system.
What you should also do is user other frameworks and build some sample projects, learn how an MVC Framework should be sued, so when your building one you know what the user should expect, then just really study the core structure of the framework.
Take into consideration in PHP the following are usually how MVC Works
but you can work with a MVCL
which is (M odel/V iew/C ontroller/L language)
Language is not a specific in the original documentation but its been adopted a few times in regards to the pattern structure, An example of the file structure below will guide you into whats the main purpose of the +L
M: \catalog\model\catalog\product.php
V: \catalog\view\template\product\product.tpl
C: \catalog\controller\product\product.php
L: \catalog\language\english\product\product.php
An example of what company / project uses this method is: OpenCart, AND I HIGHY RECOMMEND YOU LOOKING AT THE ARCHITECTURE!