When working on applications with multiple developers, I find it hard to keep track of unused publications as your application grows and changes. E.g. a developer chooses to create a new publication, but doesn’t know if he can remove the old one, since another part of the application (created by another developer) might still use it. Eventually, you’ll end up with unused and unmaintained publications, potentially leaving you with security exploits.
So I was thinking about creating a debugOnly package for this, but before I do that:
- Is there already something like this (I couldn’t find anything)?
- The approach I’m thinking of is:
- Hijack DDP, and track every subscribed publication
- Implement a method that diffs the used publications so far with all registered publications, output the unused publications to the console
It doesn’t give you 100% certainty, but it might give you a good idea if you use your application for a while and some publications are never called…
Anyone knows a better approach?