I'm thinking about a self-contained bundle to provide some
enhancements to ColdBox. Conceptually it's sort of a plugin,
addressing a cross-cutting concern.
It would contain several pieces, including one or more event handlers,
interceptors, services, views, and possibly layouts. For code
cohesiveness and ease of installation, I'd like these all to be in a
single directory. Since it includes a standard event handler, I think
that needs to be the convention handlers directory.
I'm wondering if this file organization is practical. Interceptors can
be anywhere, so that's not a problem. The service is used only by this
handler, so the handler can instantiate it directly. I know typically
services get injected into objects that use them, for looser coupling,
which I value, but in this self-contained package I'm ok with this
direct approach .
The views seems to be an issue though. Is there some way for a handler
to invoke a view that's in its own folder, not in the convention views
or external views locations?
Thanks,
Dave