[coldbox:6340] Re: Coldbox Multi-Application Architecture

Every thing inside a single MVC skeleton. No MVC inside MVC.

That statement makes no sense.

Regards,
Andrew Scott
http://www.andyscott.id.au/

From: coldbox@googlegroups.com [mailto:coldbox@googlegroups.com] On
Behalf Of jeetu
Sent: Sunday, 24 October 2010 9:43 PM
To: ColdBox Platform
Subject: [coldbox:6368] Re: Coldbox Multi-Application Architecture

Every thing inside a single MVC skeleton. No MVC inside MVC.

> Ok, I understand what you are trying to do now. But why you are not
> doing this as modules is a mystery to me.
>
> In your config.cfc you will need to do something like this.
>
> //--------------------------------------------------------------------
> ----- -
> ----------------------
>
> //--------------------------------------------------------------------
> ----- -
> ----------------------
> string function detectEnvironment() {
> //.... Detect the URL variable
> Return url.variable; //Will return either news,
> product news or sport news
> }
>
> Then you just need to create a function called, you only need to add
> here what is going to be different for each url.
>
> void function sportnews() {
> coldbox.debugMode = true;
> coldbox.handlersIndexAutoReload = false;
> coldbox.configAutoReload = false;
> coldbox.debugPassword = "";
> coldbox.reinitPassword = "";
> }
>
> And you can have your different settings etc., but to be honest it
> sounds like these are not going to be using each others handlers or
> views etc. and a module approach would have been easier and better.
>
> Regards,
> Andrew Scotthttp://www.andyscott.id.au/
>
>
>
>
>
> > From: coldbox@googlegroups.com [mailto:coldbox@googlegroups.com]
On
> > Behalf Of jeetu
> > Sent: Sunday, 24 October 2010 7:56 PM
> > To: ColdBox Platform
> > Subject: [coldbox:6364] Re: Coldbox Multi-Application Architecture
>
> > What i am thinking is to instantiate 3 object instances of config
> > (Coldbox.cfc) ie, coldbox1, coldbox2 & coldbox3 in the single
> Application.cfc
> > (Application Scope) and use the 3 instances to load their default
> controllers
> > based on the URL.
>
> > All i want to do is to get 3 config objects in the single
> > application
> scope to
> > control my 3 sub applications (Product News, Investor News and Sport
> > News) in the News Application framework skeleton. These three are
> > different business in the single framework.
>
> > News -- is the coldbox framework -- contains Application.cfc
> > (this.name =
> > "News") ---Product News -- is Application 1 initiates from url

/index.cfm?

Sorry for creating confusion. I was talking about modules.
For modules the standard examples shown follows mvc structure.
ie,

Application -- MVC

And that is a problem how?

Regards,
Andrew Scott
http://www.andyscott.id.au/

Well that is not at all a problem :slight_smile:
In fact its a good way of integrating independent applications
together.

However the application i am developing is having sub applications or
modules that have very smiler functionality. There is sharing in the
model too. So I was thinking of a single MVC skeleton that could make
it more easier to share and reuse the model. Also a single MVC
skeleton has better maintainability as redundancy in folder structure
is reduced.

Application -- Single MVC

So the config option I showed you earlier is your best bet then.

Regards,
Andrew Scott
http://www.andyscott.id.au/

From: coldbox@googlegroups.com [mailto:coldbox@googlegroups.com] On
Behalf Of jeetu
Sent: Sunday, 24 October 2010 11:25 PM
To: ColdBox Platform
Subject: [coldbox:6372] Re: Coldbox Multi-Application Architecture

Well that is not at all a problem :slight_smile:
In fact its a good way of integrating independent applications together.

However the application i am developing is having sub applications or
modules that have very smiler functionality. There is sharing in the model
too. So I was thinking of a single MVC skeleton that could make it more

easier

Now you see why i was suggesting COLDBOX_CONFIG_OBJS instead of
COLDBOX_CONFIG_FILE in the Application.cfc
The config file wont work here as its just one instance. For a
requirement like this you will need multiple config object instances.

Is there any way to do this in the Coldbox core files?

In your config.cfc you will need to do something like this.

//------------------------------------------------------------------------

@Jeetu, Sorry, it sounds like what you are trying (if I understand
what you are describing) is not possible without some extensive
changes to core. BUT, it seems to me that what you are describing is
exactly what a module is for. Please read up on them here:
http://wiki.coldbox.org/wiki/Modules.cfm

Yeah I agree, and with anything that should be shared like handlers views
etc. then this should be considered core code.

Regards,
Andrew Scott
http://www.andyscott.id.au/

From: coldbox@googlegroups.com [mailto:coldbox@googlegroups.com] On
Behalf Of Ken Smith
Sent: Monday, 25 October 2010 1:48 AM
To: ColdBox Platform
Subject: [coldbox:6376] Re: Coldbox Multi-Application Architecture

@Jeetu, Sorry, it sounds like what you are trying (if I understand what

you

are describing) is not possible without some extensive changes to core.

BUT,

it seems to me that what you are describing is exactly what a module is

for.