Is there a best practice in regards to returning (or NOT returning datasets) from .NET web services? One camp says that we should promote interoperability and use XML schemas to define the web service payload, the other camp says we should return datasets because it's straightforward in Visual Studio and get's the job done more quickly.
Some arguments in the anti-dataset camp:
Some arguments in the pro-dataset camp:
Use Datasets? I would say a thousand times no. They are not interoperable with other toolkits (as you mention). Sure, your only consumers right now are .NET but things can change quickly and it's nice to be prepared.
See The XML Files for some reading.
Also, if you are developing new services, write them using WCF. Then you can expose them however you want. If the service and consumer are internal and both are .NET then you can use the TCP binding for better performance. Then later on when someone else wants to communicate with your service you can add a new web service binding so their Java app (for example) can interoperate with your service. See Choosing the right WCF binding for a handy flowchart.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With