Monday, August 3, 2009

MVC in PHP?

I used java a little bit and it seems it%26#039;s good to seperate the business layer, database layer and presentation layer when building web apps. But when I use php it seems it%26#039;s not a good programming langauage or it%26#039;s just me that I haven%26#039;t understand what php can do.



Can anyone use MVC architect in PHP? I%26#039;m using 3rd party online web hosting so there isn%26#039;t much php extension or library they will provide. So is there a way I can build my web apps in php using MVC architect?



Any links or books u know about it will be helpful.



Thanks.



MVC in PHP?





firstly @ sridhar



if you do not know what MVC is please do not give incorrect advice.



@OP



I guess you already know what MVC is..



if you need a good MVC architecture, use CAKE.. that is the best I%26#039;ve seen for PHP. Not very extensive on documentation and tutorials, yet if you know php well enough, CAKE is the way to go.



Looks exactly like Rails. Yet it is not a port or a clone. Just a php implementation of rails mvc idea.



got ActiveRecord and a very good ORM layer.



MVC in PHP?



http://php.net/



This should tell you everything you need to know about php. It is a scripting language which is different from Java which is a general purpose language. PHP is a scripting language that runs on the server. It preprocesses the php commands in the files and executes on the server which is different from a client-side scripting language like javascript. For php to work you need to make sure that php support is setup on your server. MySQL is an open source database. I always use MySQL as my database layer. Hope this helps.



Other Replys:MVC is the idea that you have three different pieces that work in unison to form a complex application. A car is a good real-world example of MVC!



It isnt really an application... you have the ability to do this.. its more of a guideline of how to build you application..



to be come modular.. and independant while adding or removing features



heres a good guide on MVC in php



http://www.onlamp.com/pub/a/php/2005/09/...



Hope it helps!



Blue chip hosting staff,



http://www.bluechiphosting.com



Other Replys:Actually php is most one of server side scripting. It acts a .jsp and .asp likely. But main difference means it can be used in windows, linux and MacOs. and it can be used in IIS, Apache, Tomcat and any other web servers.



M - Front end html, client side scripting and CSS



V - As web page in browser.



C - Coding with an text editor as java. Or there are so many php editors available.



that%26#039;s it. If you have doubts, mail me.

No comments:

Post a Comment