As I understand it, it's generally recommended to package by feature rather than by layer. This promotes higher levels of abstraction and modularity between classes.
I can understand how this works in regular non-utility applications where it has clear features (
security, etc), but it is hard to apply this to static utility libraries.
For example, take a look Google Guava's packaging structure. As it is a library, it is hard to categorize the features of the library into packages. There is an
annotations package, a
networking package, etc. This feels like a bit of a grey-zone to me as it isn't packaged in an explicit format?
What is the general consensus when packaging by feature for something which consists of utility classes (such as a library/API)?