/Application.cfc/CEApp.cfc
/DonationApp.cfc
You are overwriting the first app with the second by these two lines:
request._framework_one = new CEApp({
…
request._framework_one = new Donation({
Separate applications must have separate Application.cfc files and separate application names – that’s a CFML thing (not a FW/1 thing).
Sean
--
FW/1 documentation: http://framework-one.github.io
FW/1 source code: http://github.com/framework-one/fw1
FW/1 chat / support: https://gitter.im/framework-one/fw1
FW/1 mailing list: http://groups.google.com/group/framework-one
---
You received this message because you are subscribed to the Google Groups "framework-one" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
framework-on...@googlegroups.com.
Visit this group at https://groups.google.com/group/framework-one.
For more options, visit https://groups.google.com/d/optout.
Just a quick question, Matthew. Is it possible you just want to add a new section, maybe also a controller, to your legacy app? Is there really a reason to add in a subsystem or create an entirely new application? Just on the surface or seems like you are adding a section, maybe it could just be a controller and some views.
-Nathan Strutz
So what I am attempting to do is add another FW/1 subsystem to the main legacy FuseBox application that already has one FW/1 application that is really a subsystem of the legacy application.
Subsystems are not applications. A new subsystem would just be part of your (existing) CEApp. One FW/1 app, multiple subsystems.
Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
Aside from structKeyExists( request, '_framework_one_donation' ) should be structKeyExists( request, '_framework_one' ) …
…make sure each FW/1 app has a unique name via applicationKey in your FW/1 configuration struct for each app. In theory that will allow two separate FW/1 apps to exist within the same CFML “application”.
I think it still won’t work tho’… you’ll have just one CFML “application” so onApplicationStart() will only run once, for whichever app gets the first request – your Fusebox app, CEApp, or Donation – so setupApplication() in FW/1 may be called for one app or for the other (or for neither). The same is true for each user session and onSessionStart().
You are only likely to be able to make this work if you have just ONE FW/1 app and you either route to the FB app or the FW/1 app (and thus use subsystems if you want to keep these “separate” pieces – CEApp and the Donation stuff – self-contained). Having multiple “sub-apps” is exactly what subsystems are designed for.
Trying to fight the framework in the manner you’re proposing is just going to cause you pain – and no one here is likely to be able to offer support if (when!) you run into bizarre problems caused by interactions between your two dueling applications.
Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
Secondly, if you really do want to have two applications that also share some components, I would explore separating the two applications using sets of includes. Here is a basic example:
Pretty sure that won’t work for exactly the reasons I was outlining in my post – application/session initialization etc – unless you’re suggestion different CFML application names as well? Would _app.cfm include all the this.whatever settings normally in Application.cfc?
Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
Pretty sure that won’t work for exactly the reasons I was outlining in my post – application/session initialization etc – unless you’re suggestion different CFML application names as well? Would _app.cfm include all the this.whatever settings normally in Application.cfc?