What is a good way to set up an application to be used by multiple clients (domain / enterprise)

We are looking to build an application that can be used by multiple
organizations or unique domains and wondering if using custom
environments is the best way. So for example

Client 1 : http://client1.mydomain.com/ or www.mydomain.com/client1
Client 2 : http://client2.mydomain.com/ or www.mydomain.com/client2
etc..

So think via the new environment setting

environments = {
  client1 = "^client1",
        client2 = "^client2", // you get the idea
};

Then override the coldbox.cfc settings with unique database ,etc.
information . The database being the most important aspect.

One other aspect we intend to include modules (added services) that
could vary from client to client.

Finally, from the web server standpoint each domain would be mapped to
the same set of coldfusion files.

The other thought is to have the root files (Application.cfc and
index.cfm, config directory) in each domain, then map the rest of the
directories. Thus the core app would be common but settings would be
unique.

Would like to hear peoples opinions on this. After typing this I think
the second solution may be best from a server load and per client
maintenance perspective, just not sure.

Thanks

Hmm, I am also very insterested in layouts like this.

I do prefer the subdomain approach as it gives clients identity and nicer URLs. So I would start with that.

As for application setup, you could point all subdomains to the same domain and just parse the incoming subdomain as your client token. Then switch everything according to subdomain.

However, I am very intesreted in setups like this.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

What we have done is use the extension points in the framework for the subdomains and basically each site has an empty shell and leaches off of the central code base. This way if we need any of the sites consuming the application to act/look differently we can easily do so.

Curt Gratz

Computer Know How

Curt,

When you say you used the extension points, could you give me an
example?

I think under the unique domain model This basically happens, just
want to see.

Luis,

One question I have is using a database to manage the configuration
settings and using enviroments to dyamically update the config. This
way we could change a client with a simple click. Is this doable /
acceptable?

Thanks
Kevin

Kevin,

I mean using the config settings. Something like this, where core is where my application lives

    modulesExternalLocation = ["/core/modules"],
    pluginsExternalLocation = "core.plugins",
    viewsExternalLocation = "/core/views/",
    layoutsExternalLocation = "/core/layouts/",
    handlersExternalLocation = "core.handlers",

//Model Integration
models = {externalLocation = "core.model"};

Curt Gratz
Computer Know How

I am doing something like this right now, the way I have approached it is one code base with a url like this http://domainname/site.

The application name is setup as the site, and the ORM is then used to dictate the directory in which the entities are pulled from. There is also a base ORM directory for common database fields, I have also setup the extensions for rendering to handle skins so that each site can have a different look and feel with the aid of a skinService.

I have also got the same approach to handlers, where there is default handlers and site specific handlers for each site. The code is simple, and isn’t much to make this possible.

Regards,

Andrew Scott

http://www.andyscott.id.au/

Curt,

Ah that makes sense. External locations are the core instead of the
other way. Can see that working well.

Andrew,
If I understand correctly you use ORM (or database) to set all the
settings/entities/handler names/etc... If so do you do anything
special in loading those settings into the configuration? And how to
do keep clients unique without creating individual application for
each person (might just be not understanding).

Thanks all good information

Kevin

No,

I use skinService to handle the changing of the views, handlers etc. I use
the site name to have multiple ORM databases, and change the application
name based on the sitename as well as the location of the ORM entities.

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

From: coldbox@googlegroups.com [mailto:coldbox@googlegroups.com] On
Behalf Of kevinm
Sent: Tuesday, 24 August 2010 4:27 AM
To: ColdBox Platform
Subject: [coldbox:5447] Re: What is a good way to set up an application to

be

used by multiple clients (domain / enterprise)

Curt,

Ah that makes sense. External locations are the core instead of the other
way. Can see that working well.

Andrew,
If I understand correctly you use ORM (or database) to set all the
settings/entities/handler names/etc... If so do you do anything special

in

loading those settings into the configuration? And how to do keep clients
unique without creating individual application for each person (might just

be

I am guessing you do this on the Application.cfc?
Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

For the application name and ORM CFCLocation yes, the skinService and siteService is done at the onRequest handler.

Regards,

Andrew Scott

http://www.andyscott.id.au/

Thanks everyone for some good insight. Definitely have a few different
approaches to think about, but looks like could easily switch between
methods with minimal effort.

Kevin