dpacmittal Posted December 1, 2009 Share Posted December 1, 2009 I've been into PHP for quite some time now and what really stumps me is modular programming. I haven't found any good book, tut or article on how to make my script modular. By modular, I mean you can add individual modules like wordpress and get the functionality the module provides. I've tried searching for articles on hook system but google doesn't seem to provide any good results for that. If you know of any good tut, article or book, please recommend. Link to comment https://forums.phpfreaks.com/topic/183609-modular-programming/ Share on other sites More sharing options...
JustLikeIcarus Posted December 1, 2009 Share Posted December 1, 2009 PHP Frameworks usually provide this. I use Kohana kohanaphp.com which does it well. v2.3.4 has a nice hook system. v3.0 Does it a bit differently but it works well. Link to comment https://forums.phpfreaks.com/topic/183609-modular-programming/#findComment-969132 Share on other sites More sharing options...
dpacmittal Posted December 1, 2009 Author Share Posted December 1, 2009 PHP Frameworks usually provide this. I use Kohana kohanaphp.com which does it well. v2.3.4 has a nice hook system. v3.0 Does it a bit differently but it works well. PHP frameworks provide it, fine. But what if I want to code it on my own. Basically, I want to learn, not just implement. Link to comment https://forums.phpfreaks.com/topic/183609-modular-programming/#findComment-969137 Share on other sites More sharing options...
Mchl Posted December 1, 2009 Share Posted December 1, 2009 Perhaps you should try to see how others do it then? Take a look at kohana, at some other framework, and perhaps you will come up with an idea of your own. Link to comment https://forums.phpfreaks.com/topic/183609-modular-programming/#findComment-969138 Share on other sites More sharing options...
Infected.Shadow Posted December 1, 2009 Share Posted December 1, 2009 I've been looking for one for a while. I couldn't find anything. Best thing to do is download some software you know has a module system and look at it, see how it works and such. It's really helped me get an idea of where to go with mine. This post I found is pretty old (2002), but it kinda gives you an idea of how it works on a very simple level. http://forums.devarticles.com/general-programming-help-4/oop-emergency-making-a-module-system-491.html Link to comment https://forums.phpfreaks.com/topic/183609-modular-programming/#findComment-969148 Share on other sites More sharing options...
dpacmittal Posted December 2, 2009 Author Share Posted December 2, 2009 ^ Thanks for the tutorial. Will have a read. Link to comment https://forums.phpfreaks.com/topic/183609-modular-programming/#findComment-969487 Share on other sites More sharing options...
Mchl Posted December 2, 2009 Share Posted December 2, 2009 I'm not sure there's anything interesting in the post linked above. Guy clearly didn't even bother to read the manual, where calling parent class' constructor is explained. Link to comment https://forums.phpfreaks.com/topic/183609-modular-programming/#findComment-969567 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.