Announcement Announcement Module
Collapse
No announcement yet.
Using Roo for Multi Tenant Apps - UI Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Roo for Multi Tenant Apps - UI

    I'm new to Roo (and fairly new to Spring) and one of the criteria I'm looking to fulfill is a solution for building multi-tenant applications.

    For different tenants using the same application instance, they often want to modify the look and feel of their application. This could take the form of changing the colours and layouts via CSS, changing the labels and order of fields, hiding given fields (that aren't used), adding additional fields (which is obviously far more complex), etc.

    Can anyone provide any guidance on how to implement such an approach with Roo?

  • #2
    Most of that sounds like it will need to be custom logic you will build, not something that roo will help with.
    It all sounds 'easy enough' to do manually (the biggest unknown from your post is what you mean by allowing your tennant to do it themselves).

    Comment


    • #3
      On the UI side, I don't see it as "logic" so much, but perhaps that's just semantics. I'm thinking along the lines of using a search rule for the UI components: search for an tenant-specific version of a file. If it's not found, use the standard definition.

      As far as the tenant being able to define to make the changes themselves, I'm thinking along the lines of them being given write access to a directory on the host and if they drop the appropriate file in place, it will be picked up (preferably automatically, without restarting Tomcat).

      whyBish, you mention that it all sounds 'easy enough' to do manually. As this is all fairly new to me, I'd be grateful for any tips or pointers in the direction of appropriate reading materials.

      Thanks heaps,
      Jamie

      Comment


      • #4
        Some options
        * To change css per tenant
        1) Brute force via servlet. get some identifier out of the session that identifies the tenant. Map a servlet to the *.css url. Make the custom servlet select the css based on the logic you defined. (This wont require a restart, but you need to make sure that the stylesheet doesn't get cached)
        2) Brute force via jsp/x. In the jsp change the stylesheet reference based on the logic you specified. (I think this requires a restart)
        3) Different architecture. Consider using a portal (e.g. Liferay) where multitenant is supported, and expose your business logic as custom portlets

        * changing labels/order of fields/hide fields
        It depends on how you let the client define this stuff
        1) Allow client to slap down a jsp/x. This has serious security issues. If you can live with those then you'd need to have something like a jsp for a screen that is just a skeleton, then use a dynamic include to include the correct table jsp per tenant.
        2) Allow the client to slap down something like a properties file with field name/field label list. Some custom logic to load this list into the context for the jsp would be required.
        3) Consider a different architecture like using a Portal (Liferay for instance). A custom portlet in config mode could be used so that the customer can interactively customise the table (potentially on a per user or per tenant or global basis depending on the portlet properties)

        * adding fields.
        Depends if the field already exists in the model or not. If it does then same as above. If it doesn't that's a separate conversation.

        Comment

        Working...
        X