Sub Application set up

16 views
Skip to first unread message

Tim Maguire

unread,
Mar 19, 2008, 6:32:29 PM3/19/08
to model...@googlegroups.com
I have a question on how sub applications work in Model Glue.  I can't really seem to find any concrete examples of how to set up an application.

I have a parent MG application which should act as a single sign on.  Theoretically a user can log into the parent app - let's call it "members" and have access to any child applications.  I then want to have 2 separate MG sub applications.  One being Canvas Wiki, the other a web service based application.  My current directory structure looks like this:

/members/[MG APP]
/members/canvaswiki/[MG APP]
/members/library/[MG APP]

My question would be how to organize my config file, what is accessable from where?  Can an event handler result in the library model-glue.xml file point a user to an event in the parent members model-glue.xml file?  Should I have one uber mg.xml file or handle it with includes?  Also if I use includes in a model-glue.xml file, does an event in mg1.xml know about an event in mg2.xml?

The reason I need a single sign on is that these children apps have their own user systems which are different.  When a user request a canvas wiki page, I plan on taking their parent sso user id and get their canvas wiki login credentials and pass them to the wiki.  This will all be handled on the back end seem less to the user.

Any help is greatly appreciated.

Thanks,
Tim

Joe Rinehart

unread,
Apr 8, 2008, 8:19:46 AM4/8/08
to model-glue
Hey Tim,

Responses in line.

> I have a question on how sub applications work in Model Glue. I can't
> really seem to find any concrete examples of how to set up an application.

It's not really "subapplications," more like "shared applications."
Basically, their application.cfm's just need to state the same
application name, and in their index.cfm files, you need to instruct
model glue _not_ to put itself in a specific application variable:

/members/Application.cfm:

<cfset ModelGlue_APP_KEY = "members" />

/members/canvaswikie/Application.cfm:

<cfset ModelGlue_APP_KEY = "membersWiki" />

...and so on.

> Can an event handler result in the library model-glue.xml file point
> a user to an event in the parent members model-glue.xml file?

No. Unfortunately, you have to <cflocation /> in your controller.
<result> _is_ getting a doUrl attribute in MG3 (implicitly forcing
redirect=true):

<!-- In the wiki app: -->
<result name="user.notLoggedIn" doUrl="/members/?event=user.login" />

> Should I have
> one uber mg.xml file or handle it with includes? Also if I use includes in
> a model-glue.xml file, does an event in mg1.xml know about an event in
> mg2.xml?

I've found building an app out of modules (using includes) much better
in this situation, avoiding everything listed above. It lets you
"join on" child apps as necessary, and it allows things like <result /
> tags redirecting to event-handlers in the main application.

-Joe


Reply all
Reply to author
Forward
0 new messages