ChrisR
Active member
Hello,
I know a bit of PHP, Well the thing i can never get my head around is MVC and well i want to learn it but after googling a lot i can not find many sites that tell on how to implement it, looking at other frameworks code i am getting very lost and well i mite go crazy .
The things that i do not get are listed below.
1) With the hole controller's and all whats the point of having controllers like this.
2) With the index file how do you call to the controller and tell what method to load? after looking at some frameworks there like no GET's and i can not seem to break it down to basic code to find out how it works.
3) with a framework does the main controller need/have to load all the lib's like database, email etc... or is that for the model only?
or is it better to have that in the model.
4) last one and thats all the issue i sort of having issue with understanding MVC.
With controller say you want to submit a form how is that done does it still use POST as you see some people when you post something it goes to a URL like mysite.com/login/dologin how can POST be pasted in that hole dologin mothered in the controller?
Also if you you any sites or tips that will help me out in learning how to use and work with MVC that would be cool.
I know a bit of PHP, Well the thing i can never get my head around is MVC and well i want to learn it but after googling a lot i can not find many sites that tell on how to implement it, looking at other frameworks code i am getting very lost and well i mite go crazy .
The things that i do not get are listed below.
1) With the hole controller's and all whats the point of having controllers like this.
PHP:
class admin extends controller {
}
class manage_user extends admin {
}
2) With the index file how do you call to the controller and tell what method to load? after looking at some frameworks there like no GET's and i can not seem to break it down to basic code to find out how it works.
3) with a framework does the main controller need/have to load all the lib's like database, email etc... or is that for the model only?
PHP:
class admin extends controller {
function index() {
// send email.
$this->email->send(//your email);
}
}
or is it better to have that in the model.
4) last one and thats all the issue i sort of having issue with understanding MVC.
With controller say you want to submit a form how is that done does it still use POST as you see some people when you post something it goes to a URL like mysite.com/login/dologin how can POST be pasted in that hole dologin mothered in the controller?
Also if you you any sites or tips that will help me out in learning how to use and work with MVC that would be cool.