Well, there's a new tag in Model-Glue:Unity that allows just this: <include> as a child of <modelglue>. I've resisted it for a while, but I think that, when used properly, it could be a very nice addition to the framework.
This addition means that any ModelGlue.xml file can other ModelGlue.xml-format files, and that the "child" files can declare their own <controllers> and <event-handlers>.
Additionally, the Model-Glue XML "fragments" can use the <setting> tag to declare additional XML files to load into ColdSpring as well as additional directories to use as view mappings.
This means that I could have a Wiki.xml "fragment" file declaring everything needed for a wiki:
<!-- Add the wiki /views dir to the viewmappings -->
<setting name="viewMappings" setting="/mgwiki/views" />
<controller name="wikiController" type="mgwiki.WikiController">
<message-listener message="wiki.page" function="getPage" />
<!--- other listeners... --->
<message name="wiki.page" />
<include name="body" template="dspWikiPage.cfm" />
<result do="view.template" />
<!--- More event handlers... --->
Then, if I wanted to add Wiki functionality to any other Model-Glue application, I could change its ModelGlue.xml file to include the Wiki fragment:
<include template="/mgwiki/config/Wiki.xml" />
<!--- Application stuff...--->
Dangers of Includes
Doing this isn't without a danger: it's quite possible that an include would overwrite an existing event handler or controller. That's the reason I prefixed everything with "wiki" :).
I'm planning on releasing a few fragments in the publuc "2.0" Unity release that I'll be calling "ActionPacks." One will provide an easy to use, configurable e-mail service. Another will provide role-based and row-level security, user profile management, and user administration interfaces.
Because these "ActionPacks" don't require any change to the framework, and are really just Model-Glue XML fragments, anyone is free to contribute their own to the Model-Glue community. If anyone's interested in developing them, I'd be happy to help out where I can, and for select Action Packs (like maybe a forums app!), adding them to the Model-Glue distro itself.