Originally, the sites were going to just be skins, so having the site
engine change the skin on each request depending on the
cgi.server_name/cgi.http_host was fine. But as the requirements
changed, we realized we needed specialized code for some sites, so we
decided to make each site its own application.
We first tried to implement this by having the engine add each site as
a module. This would allow each site to inherit the engine's reusable
code and seemed like the best solution. The main drawback to this was
that we still needed a filter to change skin depending on the domain,
and that we had to load all modules on application start, which did
not seem best for performance reasons. (Is there a way to lazy-init
modules?).
So in the latest iteration, we have each site including the engine as
a module instead. (This is where my previous problems with module
environments came into play :D ). This has worked fine so far except
that we were hoping to have the engine module include the dashboard
module so that all sites would be able to access it. This apparently
is not possible since modules cannot include other modules. This is
not a huge problem since, for now, we can just include the dashboard
on each site.
I had thought about including a default set of xml files in each site
as you mentioned, but it seemed an easier approach to just include one
module which has all of the default code than to include all of the
xml files per site.
We also have a main API, separate from the engine, which is used for
administration reasons and has much of the default code. This is
exposed via coldspring to the engine module. For this, would it be
best to use an SVN external that would include all services and their
dependencies (model), or to just rely on mappings?
Do you see any advantages/disadvantages to our current approach?
Would it be better to forget the engine, add all that code to the main
API, and include it (where needed) per site through coldsping?
> > Thank you.- Hide quoted text -
>
> - Show quoted text -