Kijana Woodard

Software Minimalism

Vessel Modules

Friday, November 1, 2013

After implementing Vessel, I was curious what it would be like to add a module system. To do this, I added a RegisterModules method that scans for classes implementing IModule and executes them.

Doing this allows us to define our mediator functionality in context. I like this because it allows us to add new features without having to modify a central registry.

The down side is we lose some Application level legibility. We are exchanging that for Feature level legibility. Vessel allows us to arrange your projects as we see fit.

The central configuration is now fairly minimal with a small amount of duplication to satisfy ISP.

I think Vessel is now complete, perhaps a bit bloated by features. Maybe some day I'll add a way to specify assemblies to scan or a plugin folder if the need arises.

I considered a special hook to register controllers given that we found that Controllers always take exactly one dependency. However, I'd like to live with that "pain" for the moment and see if it can inspire better solutions.

If you see a mistake in the post *or* you want to make a comment, please submit an edit.

You can also contact me and I'll post the comment.