can we use MVC in php? if so please give some sample codes
can we use MVC in php?
jayanagi wrote:can we use MVC in php? if so please give some sample codes
Sure, check these out...
http://framework.zend.com/
http://www.cakephp.org/
http://www.symfony-project.com/
Have fun!
or you can use PHP5 and make your own.
You don't need PHP 5 to do MVC. You can still have the basics of it in PHP 4.
MVC is just an approach to software design; it's a mental outline of how a program can be laid out, nothing to do with what language you're writing the program in.
You guys are right.
But sometimes people need a push in the PHP5 direction ...
But sometimes people need a push in the PHP5 direction ...
Not necessarily. While PHP 5 is an improvement, it's not always what's available. They don't need php 5 to use MVC, so they can "save money" by going to a host that doesn't offer php5. Or they don't have to upgrade their current install (which might break other scripts).
I agree that php5 is better, but a push towards it is not always the best idea
I agree on some aspects. Although, in my opinion, any reputable, redundant and service oriented host (which all should be) will have multiple servers and therefore has no excuse for not being able to provide PHP5 at the same cost as PHP4.
(I'm pretty sure that's a fairly malformed sentence, but I don't care).
Eh, when I get my server running again, I'm going to be running php4 as the module, and php5 as a cgi. So all I have to do is rename my files *.php5 to make the server parse it as php5