Hello All,
Please note that I’m posting here and not on the extension forum because this doesn’t concern a specific extension and I want to reach as many Yii developers and possible with these questions.
I’ve been developing extensions for Yii for the past year and a half and during that time I’ve encountered a few questions. Here are some for starters:
1. Module dependencies
If I would be to develop a smaller extension that I want to use in all of my modules would it be better to just build in the functionality instead of providing the extension and an extension within the module. Providing the extension with the module could easily lead to duplicate of code and naming collisions (assuming that PHP 5.3 is not available). What would be the best practice in this case?
2. Module themes
When developing a module that could be used in any Yii project there are some limitations to the user interface and lately I have been creating alternative UIs for my newest modules using Twitter’s amazing Bootstrap library. Now my question is how I should distribute the alternative views/css for my modules? Should I add a themes/bootstrap folder and place the files there or what is the best practice?
3. Modules with application components
Sometimes it’s necessary to both have a module and an application component for accessing the module functionality also outside of the module. Is it appropriate to include an application component with my modules and if so, should the configuration be split up between the component and the module? Have anyone else encountered a similar situation?
If you have any thoughts regarding any of the above questions please leave a reply below.
Thanks for reading.