Advertisement

Designing Good API & Its Importance

Head of Engineering at NewsCred
Feb. 24, 2012
Advertisement

More Related Content

Advertisement

Designing Good API & Its Importance

  1. Designing Good API and its importance Imran M Yousuf Entrepreneur Smart IT Engineering Ltd.
  2. Why is API important?
  3. Designing API
  4. General Principles
  5. OOP Design Principles Smart IT Engineering Ltd.
  6. API is a source code-based specification intended to be used as an interface by software components to communicate with each other.
  7. ABI (Application Binary Interface) differs to API in that the former is specified on binary interface
  8. In this presentation we will consider ABI as API too Smart IT Engineering Ltd.
  9. Do we integrate Facebook API (FB Login, Like, Share, etc.)? How?
  10. How do we develop softwares that require system level integration?
  11. How do Web 2.0 portals communicate with its server?
  12. How do Smart Phone / Tablet Apps communicate with server? Smart IT Engineering Ltd.
  13. A lot of (Almost all) websites integrate with FB using its JavaScript API
  14. For Windows we use MFC or Windows API; for *nix system we use POSIX etc.
  15. Web 2.0 / Smart Phone / Tablet Apps make server side calls via HTTP protocol either from a App or from browser using AJAX. Smart IT Engineering Ltd.
  16. You are developing an Android or iPhone App and having problem using their API as you not understanding how to simply achieve them. What would you do?
  17. Your client asked you to use a Web Service to integrate one service to another and the Web Service makes no sense what so over and furthermore, it does not have ample documentation. What would you do?
  18. What would be your opinion of such API providers? Smart IT Engineering Ltd.
  19. Contact Andoid community mailing lists/forums and ask there
  20. Contact iPhone Developer Community and ask there
  21. Ask my customer to get me documentation or ask the company/developer for help
  22. We think those companies and their developers are crap and we are better than them Smart IT Engineering Ltd.
  23. Cost to stop/change API can be prohibitive
  24. Easy to use, even without documentation
  25. Hard to misuse
  26. Easy to read and maintain code that uses it
  27. Sufficiently powerful to satisfy requirements
  28. Easy to extend
  29. Appropriate to audience Smart IT Engineering Ltd.
  30. Designing API Smart IT Engineering Ltd.
  31. At the very beginning agility trumps completeness
  32. It serves as an API used by API implementations
  33. If you write one, it probably won't support another
  34. If you write two, it will support more with difficulty
  35. If you write three, it will work fine Smart IT Engineering Ltd.
  36. Aim to displease everyone equally
  37. Expect to evolve API Smart IT Engineering Ltd.
  38. General Principles Smart IT Engineering Ltd.
  39. Good names enables API to thrive
  40. Write tests demonstrating API usage
  41. Specification will get more specific through usage Smart IT Engineering Ltd.
  42. Public class should have no public fields other than constants
  43. This maximizes information hiding
  44. Allows modules to be used, understood, built, tested and debugged independently Smart IT Engineering Ltd.
  45. Be regular – strive for symmetry
  46. Code should read like prose Smart IT Engineering Ltd.
  47. Do not wrap API to gain performance
  48. Be aware of stateful vs stateless requirements Smart IT Engineering Ltd.
  49. Prefer composition over inheritence
  50. Provide programmatic access to all data available in string form to avoid user parsing strings Smart IT Engineering Ltd.
  51. Use most specific possible input parameter type
  52. Avoid using float (32 bits) in favor of double (64 bits) Smart IT Engineering Ltd.
  53. Lon list of identically typed params is harmful
  54. This presentation covered some heuristics of the craft
  55. API design is tough
  56. Once a API is Public it can evolve but has to support earlier releases Smart IT Engineering Ltd.
  57. Questions? Smart IT Engineering Ltd.
Advertisement