I have a web site that is, at a simple level, a document that contains a series of forms and a workflow as to how that document is managed. There are other systems which are outside of the document itself so its not just a collection of forms but the core problem I have is.
Each document needs to be managed in such a way that I can view the contents of the forms (not edit) as it was when it was created, so any changes to how the forms are displayed cannot affect a previous version of forms including captions, list values etc.
The problem is that the forms vary depending on which region the user logs in belongs to. Some of the forms content is common among users but there is far more that is not. Also the user can have variations in how the workflow works for them in particular, though the list of available actions are limited.
Its not really multi-tenancy from a traditional cloud point of view given the level of control that each regional user has over the contents of the system its a similar type of problem.
I have been looking at whether or not it would be better to create a dynamic system to define and render the forms. Since the definitions could be versioned it should be able to recreate a form as it was originally defined. However a fully dynamic system is quite complex and its not something I want to jump into without evaluating alternatives as there are a number of complex rules within the system which are easier to implement when you can manually manage the view. It does have the benefit that managing changes per region in the future should be quicker but may not be as flexible if a region requires something custom.
Currently I am working off a standard base Abstract class and Then Regional Specific subclasses using MVC Areas with views for each Regional Specific class and a custom AreaResolver that routes to the correct area to use depending on user. For version atm I cannot see any way to manage it except to keep specific version of the classes themselves and associated views or keep 1 version of the class but dont allow breaking changes to be done to it and still have multiple versions of the Views.
Would you have any suggestions on patterns that could be applied to handling the versioning requirement on the document or for managing the document contents itself?