I've been looking at some very clever software recently, and to satisfy my own curiosity I want to try and figure out how it works under the covers.
It is essentially a CRM system but it allows the user to define their own business 'objects' via a configuration utility. To these objects you can obviously add properties and even associations to other 'objects'! It then has a complex UI designer so the users can layout how they want the object to be displayed on screen.
How would you tackle such a problem?
Firstly database schema.. Do you dynamically modify the database schema to actually add new tables whenever the user creates a new object? Or, do you have a fixed schema with one table that stores the data for all types of objects (presumably all data would have to be stored as a string representation in a single string-based column).
Secondly, application level.. Do you dynamically build classes using reflection? Or, do you have some generic object that represents all dynamic objects (surely this would be a nightmare to program against).
Are there any design patterns for dealing with this kind of scenario?
Any insights you can provide will be very interesting.