I am creating a new web service for an application and am currently designing the web methods for each service. I have noticed that there is no real different in my case between create and save except that save requires an ID and create does not.
The Java services API has both.
Is it a good practice to nix the create method and overload the save method such that if the ID is missing a new entity is created? Would this make it easier for clients of this web service? or harder?
I would say it depends on what your webservice, and data creation/update, mean :
I’ve often seen API that have two distinct methods ; but I’ve often used libraries that only have one…
I suppose it’s because, in those situations, on the API level, creating vs updating matters — while on a lower level (i.e. data-storage) it doesn’t matter much.