How to deal with assets and modules

I’m building a large app, all functionality is spread over different modules. Every module has it’s own assets. What’s the best location to store the assets?

  • Inside the module, publish on load.

  • Using a seperate folder like ‘src’ in the root.

  • Theme directory.

I’m considering the first one, since every module is bundled as a package, and it’s easier to publish the assets to a remote host like amazon. Another advantage is that when doing an update, the directory changes so the visitor will automatically fetch the new content instead of cache.

But I’m wondering wether copying a whole folder full of images/css/javascript is too heavy on every load (during production)

Please start by discard : "theme directory", is not the best place to store and handle assets. So, using a separated "src" folder at root (is not the best solution but) it will works fine, finally i think if your deployment is based using "yii modules" then use the module root folder for assets holding.