If you add a plugin to your application, ColdMVC will automatically
create a per-application mapping that points to the plugin so that
your application can easily access the plugin's components/views/
helpers/etc. I'm looking for feedback on what that mapping should be.
For example, let's say you're using the Markdown plugin (https://
github.com/tonynelson19/ColdMVC-Markdown).
Currently, ColdMVC will create a mapping for "/plugins/markdown/" that
points to the plugin, similar to the following:
this.mappings["/plugins/markdown/"] = "c:\inetpub\wwwroot\plugins
\markdown\";
If you wanted to then create a new instance of the
MarkdownProcessor.cfc, you could then write:
var markdownProcessor = new
plugins.markdown.app.model.MarkdownProcessor();
Does it make sense to have all plugins within the "plugins" mapping
namespace, or would it be better if each plugin had a mapping that
pointed directly at the plugin, like such:
this.mappings["/markdown/"] = "c:\inetpub\wwwroot\plugins\markdown
\";
Part of me likes having the mapping as direct/short/intuitive as
possible. Plus, with the shorter mapping, the plugins don't really
know they're plugins, which is rather nice.
Then again, I also like having everything bundled inside the "plugins"
namespace to not clutter the global mappings.
Thoughts?