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
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.
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.
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.
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?
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.
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).
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.
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
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.