Ask HN: What makes an API good?
21–30 of 68 posts
Re: Ask HN: What makes an API good?
#22Re: Ask HN: What makes an API good?
#23One vote for good documentation. Not just a link to the Javadocs; preferably a "getting started" page that covers the most common use cases with plenty of plug and play examples (if such a thing is even possible in your case). Also, getting back to the API reference, I'm grateful when there is a roadmap or overview of the class/package structure so I don't have to crawl through the entire thing.
I wish more java projects had python-style documentation. I can probably figure out how to do things eventually by wading through Javadocs, but they can be really frustrating if all I need to know is how to accomplish the core activity of the project.
Re: Ask HN: What makes an API good?
#24Re: Ask HN: What makes an API good?
#25URL Design is key. I often refer to the naming chapter of Uncle Bob's Clean Code book for this. This also helps with consistency and predictability, which in turn, makes writing docs easier.
I've got an API Design Readlist, which I've added this thread to. http://readlists.com/6c5c6009/
Re: Ask HN: What makes an API good?
#26Key points:
- When in doubt, leave it out - you can never remove things from an API but always add to it.
- Write several clients of the API to get a good feel how its used. Three is usually enough, one is not.
Re: Ask HN: What makes an API good?
#27Re: Ask HN: What makes an API good?
#28Re: Ask HN: What makes an API good?
#29One vote for good documentation. Not just a link to the Javadocs; preferably a "getting started" page that covers the most common use cases with plenty of plug and play examples (if such a thing is even possible in your case). Also, getting back to the API reference, I'm grateful when there is a roadmap or overview of the class/package structure so I don't have to crawl through the entire thing.
>Not just a link to the Javadocs; preferably a "getting started" page I wish more java projects had python-style documentation. I can probably figure out how to do things eventually by wading through Javadocs, but they can be really frustrating if all I need to know is how to accomplish the core activity of the project.