Hello,
I am having one hell of a time trying to wrap my mind about how to modularize my code. what i mean is,
Right now when i right something it has all the functions that i think i will need and to add more functionality i have to edit a few files. I usually allow for functions to be disabled through configuration. My issue is i want to make it so that i can build a base package and then add in the functions i need.
an example would be adding in a comments module to a blog. Right now for me to do this i would usually copy and paste some code i have written and hack it to work with my current set up. What i would like to do is have the base package load and use the modules.
Currently every function would be in a class
for example i would have a class called content which contains all the functions which manipulate the output, like blog post or whatever. I also have some other class lets say comments which controls all the aspects of the comments. but i cant seems to modularize the entire thing.
What i want to do is something similar to how other packages allow modules to be made and added in. Can you point me somewhere, perhaps a book. thanks
Modularizing code?