If I come to the point where I get a job that has almost identical requirements as a previous job, I try my best to reuse and repurpose previous work.
It is never that easy and it usually takes some time (but not as long as redoing it from scratch!)
Anyway, I have a few jobs coming up where they need identical login systems. Where as previously I would have created a site for the project, then a new folder for the login system, this time I have made a whole project just for the login system.
I could easily use this as a base, then copy and paste to my future projects and adapt it to them - however, I would really like to be able to just maintain this one release and add to future projects when needed (and improve then release to all projects using it).
I have tried to sum up what it is I am trying to achieve. There are a lot more components that can be reused across my projects which is why I really want to understand how to build this way.
My biggest worry and question is about databases - Every component needs to have a database. I have created the schema for the login system and have given all tables a prefix, however, if each component has its own database, how do I move them all to one at the end?
Sorry if I have been confusing, I will be happy to sum anything up or respond to comments - I am hoping someone can basically give a guide to best practices or books that can help me achieve this as I am hoping it could save me significant time in the future to maintain components independently of the projects that need them.