2

I'm developing a component which has the below structure. This system is developed under Multi-Tenant concept.

enter image description here

www.a.com, www.b.com, www.c.com are web sites which are in different domains but they run the same system. Each website have their own template and web pages in their local database. That's doable.

The system which is ran on these three sites are independent from the mentioned above(templates etc). www.a.com, www.b.com, www.c.com have a one large database where all the system data is maintained. Since the system is developed according to MVC what I want to do is have a single model(multiple models) where all the logic is contained. So if I make a single change in the model it affects the 3 sites.

According to my research, model should be maintained in the cloud. How can I implement such a requirement with MVC(Given I'm using Joomla as my CMS, MySQL as DBs) ? How can I have a single model for all the 3 sites ?

2
  • Model is not a class, but a layer. And only tiny art of it is about interaction with storage.
    – tereško
    Nov 29, 2012 at 17:53
  • If the model knows which site it's being used for, why can't it generate the right queries?? Nov 30, 2012 at 5:24

2 Answers 2

0

You can put more than one domain on the very same joomla installation without any changes, just add a plugin that's called virtualdomains which will allow you (for free) to choose template and - thus - menus, extensions and available pages for each domain; Maintenance-wise this will be easy since all is in one box; but the users will see three sites with different content, layout and urls.

Just a couple of warnings: 1) make sure no scripts or css or other local resources are invoked with the url (http://www.a.com/template/xxx/js/jquery.autocomplete.js) vs /template/xxx/js/jquery.autocomplete.js, the first will work badly with cache. 2) handle any intricacies such as same-url on different domains with .htaccess; use a sh404 or similar component to manage the SEF urls.

0

This model looks quite complicated to me.

It depends what the main goal of this? Its just fetching all articles/users together? But why?

If you are dealing with problem of running one project on multiple Joomla installations I can advise you to put them on single Joomla and than using Virtual Domains (http://extensions.joomla.org/extensions/core-enhancements/multiple-sites/7557) for "copying" the website on other domains. Then you will one database for all your project.

One downside of this is that its mainly suitable for the projects with same component and article structure. Meaning for example local news divided by regions under different domains etc.

For the reference: the solution is really working fast on Joomla 2.5 latest update.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.