Building Multi-tenant Applications

1
Building applications for clients is one approach to delivering Mendix services. Another option is to develop a Multi-tenant application that enables reuse of the developed application, but creates a dimension that caters for a different clients – this could mean basic changes such as branding, language, and basic rules that may need to be configured.  Looking at Mendix’s core system domain model – would this be the right place to modify (at least as a start) the fundamental structure of multi-tenant solutions? See the below user structure – would one need to modify this structure to help differentiate “instances” of an application for multi-tenant operation? OR – would one attempt to build this into the actual application domain model i.e. pretty much replicating (but modifying) users, roles, security etc.    
asked
2 answers
0

Cobus,

Best practice is not to modify any System or App Store modules.  Doing so makes it more difficult to migrate your app to newer Mendix or Module versions.

One approach I’ve used is to create a new module, make a specialization (or maybe more than one specialization) of Administration.Account into your module and then create a Tenant entity which the accounts are associated with.  With this structure, you can then restrict access to data using access rules in the database (i.e. a user can only see objects created by someone else in their company, or that is associated to their company, etc.

Hope that helps,

Mike

answered
0

Great comment Mike. I will give this some deep thought. Thank you.

answered