I have lots (100+) of server objects, that can be shown into 10 different formats in the browser though different graphical widgets.
So, basically we have the following structure:
So, for every server object I need, at nnnWidgetDataGetter objects, to do some data transformation to widget data format to be sent to the client. Every widget can request data from all objects of the server.
Using a normal approach, I would have to write tons of methods, one for each server basic class times each datagetter class.
To avoid writing hundred of methods with similar behaviour, we decided to use a dynamic approach at the DataGetter classes (static classes), where the business object is evaluated at runtime, data is gathered from this object, formatted and sent to the client.
The problem is that using dynamic object creation and invokation we loose the Intellisense, so the code is turning very big and difficult to understand and maintain.
After a while we found out that we´re not using the correct approach and started thinking about sw patters that would help us solve this.
So we are looking for the correct pattern to solve this issue that would keep a typed structure where Intellisense could work and that avoid us to write hundred of different methods.
We appreciate very much any kind of help.