Vote count:
0
There has been some debate around a web service for a project. A few of the old school developers think a single method which accepts a generic object (a JSON string containing a method name and data which be serialized into different objects) is a good way of doing it. It'll work...but feels completely wrong.
Personally, I think this completely goes against the grain of a service and further down the line will spell trouble and headaches as the project grows/changes. I would prefer to go down a RESTful route or standard service method verb of "GetCustomerById", giving a Separation of Concern. Plus if we ever expose the service, the method names will mean something to external consumers.
The generic method touted will work perfectly fine, but I feel it just goes completely against the principle of SOA and services. Plus, I feel like I'm losing a battle against some old school ways of thinking - "it works though".
Are there any other pitfalls I can put forward to show that this will be a bad idea in the long run? I'm a advocate of patterns and practices, which can fall on deaf ears. Any pros and cons I can use would be appreciated.
Single Method Web Service - Bad idea?
Aucun commentaire:
Enregistrer un commentaire