Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to write API define best way to write API?

user-image
Question added by Bilal Hassan , Web developer , Ace Company
Date Posted: 2017/02/19
Shahid Manzoor Bhat
by Shahid Manzoor Bhat , Senior Software Engineer , Lunera - Aricent Altran

  • Useful - it addresses a need that is not already met (or improves on existing ones)
  • Easy to explain - the basic understanding of what it does should be simple to grasp
  • Follows some object model of some problem domain or real-world. It uses constructs that make sense
  • Correct use of synchronous and asynchronous calls. (don't block for things that take time)
  • Good default behavior - where possible allow extensibility and tweaking, but provide defaults for all that is necessary for simple cases
  • Sample uses and working sample applications. This is probably most important of all.
  • Excellent documentation
  • Eat your own dog food (if applicable)
  • Keep it small or segment it so that it is not one huge polluted space. Keep functionality sets distinct and isolated with few if any dependencies.

There are more, but that is a good start to define a robust API. 

More Questions Like This