Top 10 Libraries and Apis for Java Programmers
rammersOne of the most important things in Development these days is performing regular Unit tests. However, many developers avoid performing Unit Tests citing various difficulties. This can be alleviated to a great degree by using some popular Unit Test libraries such as JUnit, PowerMock, and Mockito.
Logging Libraries are extremely common because they are essential to all projects. Logs are usually placed where you can conveniently access them to aid in project efficiency. Although JDK ships with its own logging library, there are many better alternatives such as SLF4j, and LogBack.
One of JDK’s main drawbacks so far is a complete lack of support for HTTP. Although there are ways to establish HTTP connections using classes in java.net packages, it is rather inconvenient to do so. There is an easier way to achieve the same using popular HTTP client libraries such as Apache HttpClient and HttpCore.
Considering the importance of Internet of Things and general Web Services, JSON Protocol has found a lot of use carrying information from client to servers. While JDK does not have a default JSON Library, there are many solid 3rd Party options such as Gson and Jackson. Most companies offering Java Development Services are familiar with at least one of these Libraries.
Although JDK has rich Collection Libraries, there are some 3rd party alternatives that provide an enhanced experience such as Apache Commons Collections, Google Collections and Trove.
FastUtil is another similar API which extends the Java Collections Framework by providing type specific maps, lists sets etc.
There are many APIs available to assist in processing emails, such as javax.mail and Apache Commons Email. They are built atop the JavaMail API.
The Apache Commons Codec package contains simple encoder and decoders for various formats such as Base64 and Hexadecimal. The codec package also maintains a collection of phonetic encoding utilities in addition to the former.
If you are writing an application where you need to do low-level networking tasks, consider using Networking Libraries such as Netty and Apache MINA.
HTML is a common format that many have to deal with like JSON and XML. To greatly simplify working with HTML in Java Applications we can use jsoup. It provides an API for extracting and manipulating data.