Re: WebApi - PUT and DELETE

2017-03-26 Thread Tony Wright
Well, we're well into development and have delivered a bunch of apps already, and it hasn't done anything to us so far. As long as we stick with the "use GET to retrieve data" and "use POST to modify data" basic rules, then I don't think we can come unstuck. In fact, this has to be acceptable

Re: WebApi - PUT and DELETE

2017-03-26 Thread Greg Keogh
> > I think we'll stick with the RPC style of call and not go with a RESTful > interface, and anyone that cares that much about it in an interview can go > and get a pointier hat. > Oooh, I'd still try to do things the restful way and follow the "standards" (cough, ahem!), or "conventions". If

Re: WebApi - PUT and DELETE

2017-03-26 Thread Tony Wright
Ok, so now on understanding it, I don't actually believe it matters much in 99% of the cases. I could understand there would be some massive sites that want to get every ounce out of every request, but seriously, you're going to find bigger problems elsewhere. I think we'll stick with the RPC

Re: WebApi - PUT and DELETE

2017-03-26 Thread David Burstin
On 27 Mar 2017 09:00, "Greg Keogh" wrote: why hasnt anyone attempted to sound important and mentioned idempotent > yet!? > Because if I did, it wouldn't have any effect no matter how many times I said it -- *GK* Well played, sir.

Re: WebApi - PUT and DELETE

2017-03-26 Thread Greg Keogh
> > why hasnt anyone attempted to sound important and mentioned idempotent > yet!? > Because if I did, it wouldn't have any effect no matter how many times I said it -- *GK*

RE: WebApi - PUT and DELETE

2017-03-26 Thread Nick Randolph
But in all seriousness…. So long as you and your team have a documented understanding of how your services operate, there is a bit of freedom to build things how you want them to operate. As with other technologies there are going to be people who deem themselves to be purists and want things

Re: WebApi - PUT and DELETE

2017-03-26 Thread Wallace Turner
why hasnt anyone attempted to sound important and mentioned idempotent yet!? On Mon, Mar 27, 2017 at 5:49 AM, DotNet Dude wrote: > Just ask a bunch of devs to define REST and you get all different answers. > I wouldn't take all this too seriously though :) > > On Monday,

Re: WebApi - PUT and DELETE

2017-03-26 Thread DotNet Dude
Just ask a bunch of devs to define REST and you get all different answers. I wouldn't take all this too seriously though :) On Monday, 27 March 2017, Greg Keogh wrote: > Yep the client should detect what has changed > > > As an aside: this discussion hints at just what a

Re: WebApi - PUT and DELETE

2017-03-26 Thread Greg Keogh
> > Yep the client should detect what has changed As an aside: this discussion hints at just what a shambles REST is. As Wikipedia reminds us, REST is just a "style" not a well defined "protocol" like SOAP for example. I just don't know how this subject leaked out of a guy's PhD thesis and was

Re: WebApi - PUT and DELETE

2017-03-26 Thread DotNet Dude
Yep the client should detect what has changed On Monday, 27 March 2017, Tony Wright wrote: > Hmm ok. So you post, and only post the field(s) that have changed and need > to work out how to process the update on only those fields that have come > through (not null) on the

Re: WebApi - PUT and DELETE

2017-03-26 Thread Tony Wright
Hmm ok. So you post, and only post the field(s) that have changed and need to work out how to process the update on only those fields that have come through (not null) on the server. I assume you get some small efficiency from posting the whole object and having only those that have values passed

Re: WebApi - PUT and DELETE

2017-03-26 Thread noonie
Tony, Using the correct verb can sometimes remove ambiguity and promote efficiency. You POST a 30 field form to add a record to your system and later only want to update one of those fields. If POST was your only verb you would have to retrieve and re-post all 30 fields so that you could update

RE: WebApi - PUT and DELETE

2017-03-26 Thread Tony Wright
Thanks. I'm still reading up on it, but the penny hasn't dropped yet. I'm not seeing any real benefit of moving away from just using get and post, as to do so requires the team to be more disciplined, and for potentially dubious reasons. That is, just because it's seen as being more "correct" is

RE: WebApi - PUT and DELETE

2017-03-26 Thread Nick Randolph
The other verb you might want to consider is PATCH….. for when you want to update part of an entity but don’t want to send the whole item to the service. Definitely has its uses but it’s really a architectural choice whether you use PUT, PATCH or both. Nick Randolph | Built to Roam Pty Ltd |

Re: WebApi - PUT and DELETE

2017-03-26 Thread Tom Rutter
http://stackoverflow.com/questions/2493579/why-do-i-need-put-or-delete-http-verbs On Sunday, 26 March 2017, Tom Rutter wrote: > For "RESTfulness" perhaps > > On Sunday, 26 March 2017, Tony Wright >

Re: WebApi - PUT and DELETE

2017-03-26 Thread Tom Rutter
For "RESTfulness" perhaps On Sunday, 26 March 2017, Tony Wright wrote: > Hi all, > > I have written a few angular apps and our team has collectively got away > with using HttpGet and HttpPost for just about every call to the WebApi > services. We never seem to be having any

WebApi - PUT and DELETE

2017-03-26 Thread Tony Wright
Hi all, I have written a few angular apps and our team has collectively got away with using HttpGet and HttpPost for just about every call to the WebApi services. We never seem to be having any issues. When running through the tutorials for Angular 4 (yes, its out), I have come across yet