I have worked with MS CRM. There we can design our custom entity graphically and then we can also build a visual form to perform CRUD operations on that entity.
This feels so simple from end user’s perspective. However I am interested to know how can I develop the similar kind of application where I design my table on the fly and the design UI on the fly.
What I want to know is like how do they achieve all of this dynamically? If I have to create CRUD on one simple table, I need to write good amount of code. How MS achieves everything on the fly? Any pointers, any document would be of great help.
I have no idea how they actually do it, but if it were me I’d use attributes and reflection.
Here’s how I think it’d probably work / or rougthly how you could do it…
Components
The system would need a bunch of components or sub-systems; they coudl be stuff you write yourself or existing libraries (use existing libraries if you can):
The trick is in points 2 and 3; this is where I’d define a set of Attributes that could be used to define the user created objects. These attributes are what logically joins the process together. Because Attributes can be read at runtime:
Another approach I’ve used is based pretty much on this but it also makes use of interfaces, and the data is stored as a “blob” of XML – not specific discrete metadata.