Splitting this conversation off into a slightly different branch, if
you were starting from scratch how would you setup a core application
to be shared across multiple different applications?  What is the most
elegant and easy to maintain solution in Mach II?

Am I on the right track with including the the mach-ii.xml config file
from the core application or should I be looking more closely at
modules?  Or am I missing out on a better solution?

Thanks,
Mike


On May 18, 4:31 pm, Mike <[email protected]> wrote:
> Hi guys,
>
> As the subject says, I'm looking for guidance on how to share a core
> codebase between applications.  This looked 
> promisinghttp://trac.mach-ii.com/machii/wiki/HowToShareCodeBetweenApplications
> (and so did the conversation here on google groups that spawned the
> entry) but it didn't get finished so I tried some stuff on my own and
> have run into roadblocks.  I've searched and searched and have not
> been able to find any clear picture of how to accomplish exactly what
> I'm after, but I think it's a relatively common approach.
>
> For reference I'm using Mach II 1.8.
>
> I have a core application that runs on its own...let's call it
> CoreApp.  Amongst other things, CoreApp handles all things "user":
> logins, roles, addresses, etc..  For the sake of simplicity, let's
> pretend that's all CoreApp does.
>
> I now have another application - let's call it OtherApp - in which I
> would like to reuse the "user" functionality from CoreApp.  So a user
> hitting OtherApp looking to login would actually use the logic defined
> in CoreApp.
>
> What I thought would be the best way to accomplish this was to include
> my CoreApp mach-ii.xml file in my OtherApp mach-ii.xml file so my
> CoreApp listeners and events would be accessible.  The immediate
> problem is that these applications are in different directories, and
> the dot.paths are relative to the webroot for the specific app (e.g.
> model.user.user exists in /root/CoreApp/model/user/ and that call
> works fine from within CoreApp itself, but loading it into OtherApp
> means that nothing can be found as it looks in /root/OtherApp/model/
> user/ which doesn't exist).
>
> I guess in the first instance, my question is: is there some simple
> property that I'm overlooking here that would allow me to make calls
> to my included CoreApp as if the objects were local to OtherApp from
> within OtherApp itself?  What I mean is, can my call to CoreApp's
> model.user.user from within OtherApp automatically be mapped to
> CoreApp.model.user.user?
>
> I suspect I can rejig my CoreApp to operate using absolute calls
> inside of itself (instead of model.user.user use
> CoreApp.model.user.user), but is that my only solution?
>
> Any direct help you can provide would obviously be fantastic, but
> failing that if you have a link or two that you think would help
> please don't hesitate!  Anything at all will be appreciated!!
>
> Thanks,
> Mike
>
> --
> You received this message because you are subscribed to Mach-II for CFML list.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to 
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/mach-ii-for-coldfusion?hl=en
>
> ***New URLs as of April 29th, 2010***
> SVN:http://svn.mach-ii.com/machii/
> Wiki / Documentation / Tickets:http://trac.mach-ii.com/machii/

-- 
You received this message because you are subscribed to Mach-II for CFML list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/mach-ii-for-coldfusion?hl=en

***New URLs as of April 29th, 2010***
SVN: http://svn.mach-ii.com/machii/
Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/

Reply via email to