dflow Posted August 24, 2011 Share Posted August 24, 2011 my php coding experience has apparently accumulated to something substantial but my coding practices are a big mess, currently i am writing procedural scripts not using MVC etc need suggestions on how to , what to use to make my life more organised and what would be the best for maintainable code? Link to comment https://forums.phpfreaks.com/topic/245621-mvc-or-procedural-coding-suggestions/ Share on other sites More sharing options...
requinix Posted August 24, 2011 Share Posted August 24, 2011 If you try MVC then one of two things will happen: 1. It will click with you and your code will start looking better. 2. You'll continue with your messy practices but in a whole new way. A mess how? Try cleaning that up first with what you write now before trying to learn something new. Link to comment https://forums.phpfreaks.com/topic/245621-mvc-or-procedural-coding-suggestions/#findComment-1261566 Share on other sites More sharing options...
dflow Posted August 25, 2011 Author Share Posted August 25, 2011 Quote If you try MVC then one of two things will happen: 1. It will click with you and your code will start looking better. 2. You'll continue with your messy practices but in a whole new way. A mess how? Try cleaning that up first with what you write now before trying to learn something new. in mess i meant that my html is with my php i understand that MVC will sparate the data, layout and logic but it is OB oriented with files i dont really like that. Link to comment https://forums.phpfreaks.com/topic/245621-mvc-or-procedural-coding-suggestions/#findComment-1261763 Share on other sites More sharing options...
trq Posted August 25, 2011 Share Posted August 25, 2011 You can create applications using MVC without using OOP, it's just not as clean. Link to comment https://forums.phpfreaks.com/topic/245621-mvc-or-procedural-coding-suggestions/#findComment-1261768 Share on other sites More sharing options...
dflow Posted August 25, 2011 Author Share Posted August 25, 2011 Quote You can create applications using MVC without using OOP, it's just not as clean. so go the OOP route? Link to comment https://forums.phpfreaks.com/topic/245621-mvc-or-procedural-coding-suggestions/#findComment-1261810 Share on other sites More sharing options...
trq Posted August 25, 2011 Share Posted August 25, 2011 If your after code organisation, you could do far worse than learning OOP. Link to comment https://forums.phpfreaks.com/topic/245621-mvc-or-procedural-coding-suggestions/#findComment-1261813 Share on other sites More sharing options...
dflow Posted August 25, 2011 Author Share Posted August 25, 2011 Quote If your after code organisation, you could do far worse than learning OOP. so what do you suggest and any recommendations for frameworks? Link to comment https://forums.phpfreaks.com/topic/245621-mvc-or-procedural-coding-suggestions/#findComment-1261817 Share on other sites More sharing options...
ignace Posted August 25, 2011 Share Posted August 25, 2011 Quote Quote If your after code organisation, you could do far worse than learning OOP. so what do you suggest and any recommendations for frameworks? Zend's framework 2.0, Symfony 2, and also try Proem (thorpe's framework). Personally I'm more of a component freak myself so you may want to try these aswell: Doctrine 2 (db), Symfony components (good for Routing, Config, Autoloading, ..): it also has an HttpFoundation, translated this means that you can write your own bootstrap code and decide whether you'll route to an action in a controller (the default setting for most frameworks)?, a class?, a php file?, a closure? (I like this kind of flexibility even when I'll never need it ) Twig: because I hate Smarty. I have a few personal projects to get my feet wet with all the above frameworks and I mostly mix them all: use Zend's routing, Symfony's autoloading, Twig for templating, Doctrine for database, .. Link to comment https://forums.phpfreaks.com/topic/245621-mvc-or-procedural-coding-suggestions/#findComment-1262012 Share on other sites More sharing options...
trq Posted August 25, 2011 Share Posted August 25, 2011 Quote also try Proem (thorpe's framework) I wouldn't go near that yet. Still plenty of work to be done. (I really should remove it from my sig) Link to comment https://forums.phpfreaks.com/topic/245621-mvc-or-procedural-coding-suggestions/#findComment-1262054 Share on other sites More sharing options...
cassey071 Posted September 8, 2011 Share Posted September 8, 2011 MVC is good. its OOP for me its more organize than the procedural but it depend on how your code more organize., Link to comment https://forums.phpfreaks.com/topic/245621-mvc-or-procedural-coding-suggestions/#findComment-1266669 Share on other sites More sharing options...
jotorres1 Posted October 19, 2011 Share Posted October 19, 2011 Hi, Unless you are planning to stay in the stone-age, I suggest you go the OOP route. Eventually everything will be translating the OOP due to its' organizational structure, and usability- re-usability of code. If you yourself acknowledge that you have messy code, then you should consider organizing it, and OOP can help. In the end, you will love yourself for making the change, since maintaining it will be a lot easier. Let us know what ever you do. BTW I'm new to the forum. Link to comment https://forums.phpfreaks.com/topic/245621-mvc-or-procedural-coding-suggestions/#findComment-1280612 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.