After few years of Java programming, I improved slower than I expected but still... When designing complex software which needs to be reused, I still find it difficult to make quick and "good" choices without adding too much complexity.
In the last branch of XPontus XML Editor(major refractoring), I had a dilemma:
- Release soon : couple of patches and dirty classes which do the job
- Wait 4 or 5 months to be ready : clean up the code, perform thorough testing, remove unused classes, add or redesign interfaces, etc.
IMHO, an API is great when it's
- simple
- useful
- flexible(without adding too much complexity when it's unnecessary).
I tend to prefer APIs which expose few interfaces, abstract classes and some concrete classes. Complex applications APIs without/with few interfaces, are somehow difficult to maintain, refractor, make evolve.

One Response to What makes an API great?
jEdit has an awesome api. It's all the things you mention, but it's easy to get up to speed with and easy to come back to and hack on. If you're a java programmer you will probably enjoy hacking the beanshell interface.
It's been 2 years or so since I last saw any jEdit code, and I really miss hacking on it.
How does one script xpontus?
Daniel
Post a Comment