Click here to Skip to main content
14,456,157 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: Youtube, patreon, etc... Free Lunch is over... Pin
Jaroslav Mitrovic23-Dec-19 23:55
MemberJaroslav Mitrovic23-Dec-19 23:55 
GeneralRESTful API Designing guidelines — The best practices Pin
Marc Clifton19-Dec-19 15:24
communityengineerMarc Clifton19-Dec-19 15:24 
GeneralRe: RESTful API Designing guidelines — The best practices Pin
PIEBALDconsult19-Dec-19 16:59
professionalPIEBALDconsult19-Dec-19 16:59 
JokeRe: RESTful API Designing guidelines — The best practices Pin
NeverJustHere19-Dec-19 19:28
MemberNeverJustHere19-Dec-19 19:28 
GeneralRe: RESTful API Designing guidelines — The best practices Pin
Mark_Wallace19-Dec-19 21:02
MemberMark_Wallace19-Dec-19 21:02 
GeneralRe: RESTful API Designing guidelines — The best practices Pin
Nand3219-Dec-19 21:52
MemberNand3219-Dec-19 21:52 
GeneralRe: RESTful API Designing guidelines — The best practices Pin
Jörgen Andersson19-Dec-19 22:41
communityengineerJörgen Andersson19-Dec-19 22:41 
GeneralRe: RESTful API Designing guidelines — The best practices Pin
agolddog23-Dec-19 4:09
Memberagolddog23-Dec-19 4:09 
Caveat: I don't have enough experience in this area to be qualified to pass judgment.

When consuming someone's API, I prefer explicitness. So, I think I like your approach of "getServiceFee".

However, that's a property of some larger entity, so I could certainly see the argument that one should just get the entity and look for ServiceFee within that. That scales; as new properties are added, the API has to change in the method you're describing.

As to the plural versus the singular, the author's examples give it away: to get the collection, you use plural; but then tacking on an id gives you companies/xxx, which returns a single company and seems clumsy.

I suspect the answer is just pick one and be consistent. I guess I prefer the pluralized version slightly, because it's more like this is a search API: get me all companies which qualify under the provided parameters (or lack thereof). I might even argue that companies/XXX should return a collection, even though we certainly expect only one to qualify, because it is a search.

But my lack of experience in this area probably means I'm filtering through the wrong lens.
GeneralRe: RESTful API Designing guidelines — The best practices Pin
Andrew Rissing23-Dec-19 7:10
MemberAndrew Rissing23-Dec-19 7:10 
GeneralRe: RESTful API Designing guidelines — The best practices Pin
tjwise24-Dec-19 7:19
Membertjwise24-Dec-19 7:19 
GeneralWoohoo! Pin
honey the codewitch19-Dec-19 11:13
mvahoney the codewitch19-Dec-19 11:13 
GeneralRe: Woohoo! Pin
  Forogar  19-Dec-19 11:18
professional  Forogar  19-Dec-19 11:18 
GeneralOnce Again I'm Forced To Report Pin
W Balboos19-Dec-19 6:43
mveW Balboos19-Dec-19 6:43 
GeneralRe: Once Again I'm Forced To Report Pin
MarkTJohnson19-Dec-19 8:23
professionalMarkTJohnson19-Dec-19 8:23 
RantVB.NET is hateful Pin
honey the codewitch19-Dec-19 6:11
mvahoney the codewitch19-Dec-19 6:11 
GeneralRe: VB.NET is hateful Pin
Richard Deeming19-Dec-19 6:26
communityengineerRichard Deeming19-Dec-19 6:26 
GeneralRe: VB.NET is hateful Pin
honey the codewitch19-Dec-19 6:28
mvahoney the codewitch19-Dec-19 6:28 
GeneralRe: VB.NET is hateful Pin
Richard Deeming19-Dec-19 6:35
communityengineerRichard Deeming19-Dec-19 6:35 
GeneralRe: VB.NET is hateful Pin
honey the codewitch19-Dec-19 6:46
mvahoney the codewitch19-Dec-19 6:46 
GeneralRe: VB.NET is hateful Pin
Richard Deeming19-Dec-19 6:54
communityengineerRichard Deeming19-Dec-19 6:54 
GeneralRe: VB.NET is hateful Pin
honey the codewitch19-Dec-19 6:55
mvahoney the codewitch19-Dec-19 6:55 
GeneralRe: VB.NET is hateful Pin
0x01AA19-Dec-19 7:00
professional0x01AA19-Dec-19 7:00 
GeneralRe: VB.NET is hateful Pin
honey the codewitch19-Dec-19 7:03
mvahoney the codewitch19-Dec-19 7:03 
GeneralRe: VB.NET is hateful Pin
obermd26-Dec-19 10:51
Memberobermd26-Dec-19 10:51 
GeneralRe: VB.NET is hateful Pin
Rick York19-Dec-19 8:26
mveRick York19-Dec-19 8:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.