I'd like to make a customizable entity class (by the application end user). The idea is that a user can add, delete or modify properties of a certain an entity or even creates new entites.
The application should be able to use them without having to bring down the application server (three tier architecture) nor recompile the whole app.
I have thought of three cases. Given an entity specification (fields, type, restrictions, etc.) in XML:
1) Generate C# code and compile each entity into a class inside a specific DLL library
2) Have a generic .NET class that will behave as the XML specifies
3) Have different entity classes with an "extrafields" collection where users can add more if needed. (variation of 2)
The classes will persist using an O-R Mapping / peristence framework.
In case 1 I would like to use class attributes to add metadata to properties, etc.
In case 2 this metadata can be included in the XML.
In case 3 a mixture of both.
Any ideas on which road to take?
Any other experiences on creating customizable classes?
Thanks for your help.
The application should be able to use them without having to bring down the application server (three tier architecture) nor recompile the whole app.
I have thought of three cases. Given an entity specification (fields, type, restrictions, etc.) in XML:
1) Generate C# code and compile each entity into a class inside a specific DLL library
2) Have a generic .NET class that will behave as the XML specifies
3) Have different entity classes with an "extrafields" collection where users can add more if needed. (variation of 2)
The classes will persist using an O-R Mapping / peristence framework.
In case 1 I would like to use class attributes to add metadata to properties, etc.
In case 2 this metadata can be included in the XML.
In case 3 a mixture of both.
Any ideas on which road to take?
Any other experiences on creating customizable classes?
Thanks for your help.