.net - Passing badly structured information to WCF method. Best practice -
I have a legacy reporting engine class that is responsible for the 50+ report; a single method CreateReport Id, report parameter) parameter;
Reports require 12+ and their combination of different parameter types (guide, int, bull, enumeration). For example:
- Report # 1: No parameters required
- Report # 2: 2 Boolean (populate user by check box)
- Report # 3: Guyed (Person ID) & amp; Integer (year to start with)
- Report # 4: Guid (person income) & amp; PersonType (cognition)
The report params are a class with 12+ attributes and arrays that are populated before calling the method. But most of them are unused in the call report engine examines the class that populate the appropriate assets and use strong type of information access.
Every time I add a new parameter type to the reporting engine WCF friendly, then I have to rebuild the server, the proxy must be updated (which the client has to re-install), and make sure Make sure that ReportParam structure is being converted right between WCF-friendly version and reporting engine version.
I wonder how to reduce all these conversions, checks, client restores, e.t.c. What could happen if I take the report PAMM into the XML document? This will make the proxy stable, report wcf is friendly, but I have to re-apply strong type of access to information in the report engine category.
What would you suggest?
Do you control both ends of WCF communication ??
In that case:
- Put your service agreement and data agreement in the Class Library Assembly
- Between the server and the client that assembly Share
- On Customer
Comments
Post a Comment