Skip to main content

All Questions

6 votes
3 answers
342 views

Should a high-performance API expose low-performance utility functions?

Context: I'm working on an open source project to solve a problem that comes up in ad-tech and social media data mining: indexing boolean expression trees, and matching them against incoming documents....
Robert Fraser's user avatar
9 votes
4 answers
5k views

How to minimize a Java library's exposed interface surface while breaking down the library into subpackages?

I'm making a library or two for and Android app and I want to keep the library's exposed interfaces to a minimum to avoid the abstraction leaking everywhere by avoiding making all of the classes '...
JosephRT's user avatar
  • 319
0 votes
2 answers
421 views

Throwing custom exceptions in library: do I throw concrete ones or their superclass?

I am designing a library that abstracts a typical CRUD http service named FooService. In this library I am throwing different exceptions like FooServiceClientException for network related errors or ...
Carlos Campderrós's user avatar
1 vote
3 answers
678 views

Should a file reader library API throw exceptions?

I am developing a (Java) library providing an API to read a file in a specific format into an object. The format is basically a map, and specifies valid values for some of the keys, and valid types ...
s.d's user avatar
  • 243
8 votes
3 answers
2k views

Breaking API changes: how can I make the transition easy for library users?

In the past, I used the standard way of adding @Deprecated annotations to API methods which will be removed in a later version. Now I am preparing a major version for a library, with many API parts ...
mjn's user avatar
  • 293