cmgmyr Posted October 22, 2007 Share Posted October 22, 2007 I've been reading up on MVC though some posts on here and some other site with tutorials on them. I also downloaded CodeIgniter and have been playing around with that a little. I was wondering how many people use these frameworks and why? I would rather make my own once I know how they work a little more, any insight on this? Pro's/Con's with using MVC? Thanks, -Chris Quote Link to comment https://forums.phpfreaks.com/topic/74329-to-mvc-or-not-to-mvc/ Share on other sites More sharing options...
Daniel0 Posted October 22, 2007 Share Posted October 22, 2007 Well, a pro would be that you've got a nice separation of the code which makes it easier to maintain and reuse. Quote Link to comment https://forums.phpfreaks.com/topic/74329-to-mvc-or-not-to-mvc/#findComment-375561 Share on other sites More sharing options...
cmgmyr Posted October 22, 2007 Author Share Posted October 22, 2007 Well my code right now is structured well and is easy to maintain and reuse. Usually I have something like this: /css --style.css /includes --/classes ----class.mysql.php ----class.functions.php ----ect. --/nav ----header.php ----footer.php --includes.php <- this is to include all of the classes and config file /js --main.js about.php contact.php index.php but it's not as dynamic as it could be Quote Link to comment https://forums.phpfreaks.com/topic/74329-to-mvc-or-not-to-mvc/#findComment-375567 Share on other sites More sharing options...
Buyocat Posted October 23, 2007 Share Posted October 23, 2007 You've asked two questions. 1) Should I use a framework? If you're more comfortable working in your own format/style, and don't mind implementing a lot of common, possibly tricky/difficult routines yourself then don't bother with a framework. 2) Should I try to organize my code along the MVC pattern? Probably yes. At least it's worth having a separation of concerns so that you can more easily make changes to one section without effecting another section of code. A possible third question is how much separation? I think the answer to that needs to be made case-by-case. For most things you do less is probably enough. If you anticipate many people working with the code you're writing then air on the side of more separation. Quote Link to comment https://forums.phpfreaks.com/topic/74329-to-mvc-or-not-to-mvc/#findComment-375966 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.