Click here to Skip to main content
15,905,028 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 22:55
Jaroslav Mitrovic23-Dec-19 22:55 
GeneralRESTful API Designing guidelines — The best practices Pin
Marc Clifton19-Dec-19 14:24
mvaMarc Clifton19-Dec-19 14:24 
GeneralRe: RESTful API Designing guidelines — The best practices Pin
PIEBALDconsult19-Dec-19 15:59
mvePIEBALDconsult19-Dec-19 15:59 
JokeRe: RESTful API Designing guidelines — The best practices Pin
NeverJustHere19-Dec-19 18:28
NeverJustHere19-Dec-19 18:28 
GeneralRe: RESTful API Designing guidelines — The best practices Pin
Mark_Wallace19-Dec-19 20:02
Mark_Wallace19-Dec-19 20:02 
GeneralRe: RESTful API Designing guidelines — The best practices Pin
Nand3219-Dec-19 20:52
Nand3219-Dec-19 20:52 
GeneralRe: RESTful API Designing guidelines — The best practices Pin
Jörgen Andersson19-Dec-19 21:41
professionalJörgen Andersson19-Dec-19 21:41 
GeneralRe: RESTful API Designing guidelines — The best practices Pin
agolddog23-Dec-19 3:09
agolddog23-Dec-19 3: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 6:10
Andrew Rissing23-Dec-19 6:10 
GeneralRe: RESTful API Designing guidelines — The best practices Pin
tjwise24-Dec-19 6:19
tjwise24-Dec-19 6:19 
GeneralWoohoo! Pin
honey the codewitch19-Dec-19 10:13
mvahoney the codewitch19-Dec-19 10:13 
GeneralRe: Woohoo! Pin
  Forogar  19-Dec-19 10:18
professional  Forogar  19-Dec-19 10:18 
GeneralOnce Again I'm Forced To Report Pin
W Balboos, GHB19-Dec-19 5:43
W Balboos, GHB19-Dec-19 5:43 
GeneralRe: Once Again I'm Forced To Report Pin
MarkTJohnson19-Dec-19 7:23
professionalMarkTJohnson19-Dec-19 7:23 
RantVB.NET is hateful Pin
honey the codewitch19-Dec-19 5:11
mvahoney the codewitch19-Dec-19 5:11 
GeneralRe: VB.NET is hateful Pin
Richard Deeming19-Dec-19 5:26
mveRichard Deeming19-Dec-19 5:26 
GeneralRe: VB.NET is hateful Pin
honey the codewitch19-Dec-19 5:28
mvahoney the codewitch19-Dec-19 5:28 
GeneralRe: VB.NET is hateful Pin
Richard Deeming19-Dec-19 5:35
mveRichard Deeming19-Dec-19 5:35 
GeneralRe: VB.NET is hateful Pin
honey the codewitch19-Dec-19 5:46
mvahoney the codewitch19-Dec-19 5:46 
GeneralRe: VB.NET is hateful Pin
Richard Deeming19-Dec-19 5:54
mveRichard Deeming19-Dec-19 5:54 
GeneralRe: VB.NET is hateful Pin
honey the codewitch19-Dec-19 5:55
mvahoney the codewitch19-Dec-19 5:55 
GeneralRe: VB.NET is hateful Pin
User 1106097919-Dec-19 6:00
User 1106097919-Dec-19 6:00 
GeneralRe: VB.NET is hateful Pin
honey the codewitch19-Dec-19 6:03
mvahoney the codewitch19-Dec-19 6:03 
GeneralRe: VB.NET is hateful Pin
obermd26-Dec-19 9:51
obermd26-Dec-19 9:51 
GeneralRe: VB.NET is hateful Pin
Rick York19-Dec-19 7:26
mveRick York19-Dec-19 7: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.