G’day all!
When I write web apps in Yii2 I find that I have a lot of reusable components. I always have authentication, acl’s, logging, menu builders, system properties, etc. I am looking to hear what you all do to manage your code if you work the same way.
I am thinking of either doing one of the following:
-
Create a ‘base application’, with lots of modules (one for each app) and use hooks/events to register menu items, etc. This would result in 1 code base for all my apps.
-
Create a base application which I extend and create a copy of it for each project I work on. This would provide more flexibility but multiple code bases to manage.
When I think about it, what I want to build is no different to the modules that I download from Github. But I guess my concern is that I want to integrate the modules a lot closer into the base code (ie. I have a notification tab, and a consistent way for creating menus).
Are there any design patterns or system architectures around for how I may build this type of modular application? Would it all be driven by modules & events?
Cheers
Dan