Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am looking for a book on how to design a web-service API. I'm constrained to using RPC-style Web services.

In particular, I'm looking for guidance on

  • [balancing...] granular vs course services
  • required parameters vs optional parameters
  • small chatty services vs services with large payloads

I'm also looking to address strategies for making reference data and caching on the consumer side. Even things like how to establish a rational naming convention are helpful.

Which books are good resources for designing a web API that addresses these questions?

share|improve this question
    
I edited this for clarity, but I'm not sure it will stick around given it is a very specific question related to your specific use-case. –  Craige Mar 6 '12 at 21:02
add comment

1 Answer

up vote 1 down vote accepted

Framework Design Guidelines is a gem.

If you haven't read this book yet, you really should. This book gives you a lot of insight into the "why"s, something which a lot of standards documents are missing. It's one thing to be told to do something in a particular way, but it's a lot better when you are told why. Simple coding patterns that I wouldn't have given a second thought to have turned out to have a great impact on other aspects of my code once they were explained.

The basics are covered, such as naming and formatting standards, but the book goes much further with sections about when and how to use certain interfaces, and provides some brief explanations of common design patterns as they relate to the .net framework. I'm not talking about "Visitor" or "Model View Presenter" here, I'm talking about "IDisposable"... muuuch lower level stuff.

Basically, this book isn't just about what you ought to be doing, it's about explaining why Microsoft did what they did in the .net framework. It's refreshing at times in the book to find a discussion about how something was a bad choice in retrospect, or how the framework designers wished they had done something differently knowing then what they know now. I feel a lot better about my own changes of mind, and less like an amateur for not having seen the eventual solution in the beginning. After reading it, I'm more comfortable that I've made the right career decision to stick with this programming stuff.

share|improve this answer
    
+1. I've mentioned this book in a number of posts now, and while it is very focussed on .NET and why they did what they did, it's also a good general primer for anyone who has ever thought about building an API... on purpose. –  S.Robins Mar 6 '12 at 21:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.