Using a non-JSON-enabled VB.Net web service (or really any web service in general), I’ve heard it’s pretty bad to be returning DataTables. I’ve read explanations on why it’s bad, but all these explanations seem to have one serious flaw in common: They show why it’s bad to return DataSets, not DataTables.
Those are obviously two different things. A DataTable is mostly just data (although not completely so), whereas a DataSet, from what I understand, is much more “operation-enabled”. There are differences either way though.
So putting DataSets aside, why is it bad to return a DataTable from a web service, in particular a non-JSON-enabled VB.Net one? Is there really any misstep in doing so, or is it just with DataSets? Thanks.
In the same way that you shouldn’t return a
DataSetbecause the client might not understand it, the client may not understand aDataTable. Why should it be understood by something that’s not running .NET?