Well, there's a new tag in Model-Glue:Unity that allows just this:  &lt;include> as a child of &lt;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 <include> other ModelGlue.xml-format files, and that the "child" files can declare their own &lt;controllers> and &lt;event-handlers>.

Additionally, the Model-Glue XML "fragments" can use the &lt;setting> tag to declare additional XML files to load into ColdSpring as well as additional directories to use as view mappings.

<strong>Example</strong>

This means that I could have a Wiki.xml "fragment" file declaring everything needed for a wiki:

<div class="code"><FONT COLOR=NAVY>&lt;modelglue&gt;</FONT><br>
  &lt;config&gt;<br>
    <FONT COLOR=GRAY><I>&lt;!-- Add the wiki /views dir to the viewmappings --&gt;</I></FONT><br>
    <FONT COLOR=NAVY><FONT COLOR=FF8000>&lt;setting name=<FONT COLOR=BLUE>"viewMappings"</FONT> setting=<FONT COLOR=BLUE>"/mgwiki/views"</FONT> /&gt;</FONT></FONT><br>
  &lt;/config&gt;<br>
<br>
  &lt;controller name=<FONT COLOR=BLUE>"wikiController"</FONT> type=<FONT COLOR=BLUE>"mgwiki.WikiController"</FONT>&gt;<br>
    <FONT COLOR=NAVY>&lt;message-listener message=<FONT COLOR=BLUE>"wiki.page"</FONT> function=<FONT COLOR=BLUE>"getPage"</FONT> /&gt;</FONT><br>
    <FONT COLOR=GRAY><I>&lt;!--- other listeners... ---&gt;</I></FONT><br>
  &lt;/controller&gt;<br>
<br>
  <FONT COLOR=NAVY>&lt;event-handlers&gt;</FONT><br>
    <FONT COLOR=NAVY>&lt;event-handler name=<FONT COLOR=BLUE>"wiki.displayPage"</FONT>&gt;</FONT><br>
      <FONT COLOR=NAVY>&lt;broadcasts&gt;</FONT><br>
        <FONT COLOR=NAVY>&lt;message name=<FONT COLOR=BLUE>"wiki.page"</FONT> /&gt;</FONT><br>
      <FONT COLOR=NAVY>&lt;/broadcasts&gt;</FONT><br>
      <FONT COLOR=NAVY>&lt;views&gt;</FONT><br>
        <FONT COLOR=NAVY><FONT COLOR=FF8000>&lt;include name=<FONT COLOR=BLUE>"body"</FONT> template=<FONT COLOR=BLUE>"dspWikiPage.cfm"</FONT> /&gt;</FONT></FONT><br>
      <FONT COLOR=NAVY>&lt;/views&gt;</FONT><br>
      <FONT COLOR=NAVY>&lt;results&gt;</FONT><br>
        <FONT COLOR=NAVY>&lt;result do=<FONT COLOR=BLUE>"view.template"</FONT> /&gt;</FONT><br>
      <FONT COLOR=NAVY>&lt;/results&gt;</FONT><br>
    <FONT COLOR=NAVY>&lt;/event-handler&gt;</FONT><br>
<br>
    <FONT COLOR=GRAY><I>&lt;!--- More event handlers... ---&gt;</I></FONT><br>
  <FONT COLOR=NAVY>&lt;/event-handlers&gt;</FONT><br>
<FONT COLOR=NAVY>&lt;/modelglue&gt;</FONT></div>

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:

<div class="code"><FONT COLOR=NAVY>&lt;modelglue&gt;</FONT><br>
  <FONT COLOR=NAVY><FONT COLOR=FF8000>&lt;include template=<FONT COLOR=BLUE>"/mgwiki/config/Wiki.xml"</FONT> /&gt;</FONT></FONT>  <br>
<br>
  <FONT COLOR=GRAY><I>&lt;!--- Application stuff...---&gt;</I></FONT><br>
<FONT COLOR=NAVY>&lt;/modelglue&gt;</FONT></div>

<strong>Dangers of Includes</strong>

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" :).

<strong>"ActionPacks?"</strong>

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.