Java Reference
In-Depth Information
Utility classes and packages are common in projects. No one can argue that you need a class to per-
form some math operations, such as rounding or converting different number types. If you do have
such utility or helper classes, you probably need to organize them with a package name of util or
helper , right? No, in reality, they just help you collect junk. Because r util and helper sound too
generic, many classes are moved into these packages. Any class that may not be categorized easily
will end up in your package. The generic name does not provide real information, so even though
those classes are not used anymore, no one would dare to remove them.
If you have a great utility that everybody needs to use, just place it where it belongs with the cur-
rent usage and provide proper documentation. You can move it to some more generic package in the
future if needed.
Just like lasagna, Adam Bien i rst described and named this pattern.
1. The complete list of HTTP methods is: GET, POST, DELETE, PUT, PATCH, OPTION,
2. Oracle's WebSocket API tutorial: .
3. This could introduce a development cost if the system makes use of HTTP session data and
there is not a clustered solution in place for HTTP session replication.
The Art of Scalability: Scalable Web Architecture, Processes, and Organizations for the
Modern Enterprise , Martin L. Abbott, Michael T. Fisher. January 1, 2009.
Adam Bien. Author and Java Champion.
Search WWH ::

Custom Search