Designing a better API?

2019-03-13 21:52发布

  1. What are the best practices and patterns to be followed for designing APIs?
  2. How to achieve implementation hiding the best way (C++/Java)?
  3. Designing APIs which are generic in nature?
  4. Any reference books/links which guide with neat examples to beginners?

10条回答
疯言疯语
2楼-- · 2019-03-13 22:16

I suggest you to check How to Design a Good API & Why it Matters

A well-written API can be a great asset to the organization that wrote it and to all that use it. Given the importance of good API design, surprisingly little has been written on the subject. In this talk (recorded at Javapolis), Java library designer Joshua Bloch teaches how to design good APIs, with many examples of what good and bad APIs look like.

http://www.infoq.com/presentations/effective-api-design

Also you can read the book Practical API Design: Confessions of a Java™ Framework Architect. I didn't read it so I'm not sure if it contents could be useful to you.

Another resource to check: How To Design a (module) API

查看更多
一纸荒年 Trace。
4楼-- · 2019-03-13 22:27

Read Effective Java by Josh Bloch. The book is great for any Java programmer, but also addresses lots of issues surrounding the creation of a useful API.

查看更多
乱世女痞
5楼-- · 2019-03-13 22:29

Checkout this podcast

Its talks about some really good concepts regarding api design.

查看更多
登录 后发表回答