I am writing an API for my ASP.NET application that other developers will use. The API will basically return a list of people with their first name, last name, and id. There are lots of ways to write web services in ASP.NET, the easiest probably being create a web service function (asmx) that returns a DataTable. This is simple enough for other .NET developers to deal with, but I am not convinced that this is the best way to write a web service for general platform and language independence.
What is the currently accepted standard to write a web service like this that plays well in the wild today?
Some ideas that come to mind from experience:
List<Person>rather thanDataTable. Basic types serialize more easily and will make more sense in other programming environments since you want your service to be language independent.getBlah(),updateBlah(obj newObj),deleteBlah(obj objToDelete), etc. that use the same data types.Personclass with 30 properties, and only 5 are relevant to the end-user, provide a class that interfaces betweenPersonand aPersonSimpleclass which is exposed. Without this layer, your end-users will have to modify your code every time you change your data structure, and you will be locked down by this tight coupling.If security is important