Module or Plugin, which should I write?

I've got it in my head to work on a project to put together an Actor
Producer pattern implementation for CF, probably based on the Akka
project. Since most of my CF work is in Coldbox these days, I also
want to make sure I can use it with CB. As such, I'm faced with the
question of whether to build it as a Plugin or a Module.

In my head, I have a Plugin as being a system-wide utility that would
be used by services, handlers, etc but wouldn't ever really be
addressed directly as an application. And I think of a Module as being
more of an application that may have other pieces tie into it but is
also going to have views, layouts, etc that will get addressed
directly through a url like /blog.

Does that match up with other people's conceptions? From that point of
view, an Actor Producer setup would probably be a plugin and handlers
would use it for message passing. I don't think it would ever be
addressed directly. Are there any downsides or upsides to making it a
Module instead of a Plugin?


Well, Modules can be composed of plugins also, so, you can leverage that too. I think modules are more robust than simple plugin CFC’s. Again, you have to evaluate the use case and see if the power of modules is what you need, or a simple plugin CFC does the job.

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager:

Do you have a write up anywhere that compares and contrasts Modules
with Plugins? I've not yet written one of either (only an interceptor)
so I'm definitely interested in going the right direction. If Modules
are more powerful and flexible, maybe that is a better way to go.


I don’t know either Luis, all I can tell you is that if I add that line. Reboot the server, and try to run module 1 it actual runs module 2.

I will run the line debugger over this after getting some more sleep, and let you know what I find.


Andrew Scott

Yes please do Andrew thanks