One of the characteristics of an experienced Java developer is good at using existing wheels to build a car. Joshua Bloch, author of EffecTIve Java, once said: "It is recommended to use the existing API to develop instead of recreating wheels." In this article, I will share some of the most useful and necessary libraries and APIs that Java developers should be familiar with. Incidentally, this does not include frameworks such as Spring and Hibernate because they are very famous and have specific features. This article summarizes the commonly used class libraries of the log, JSON parsing, single test, XML parsing, byte code processing, database connection pool, collection classes, mail, encryption, embedded SQL database, JDBC fault diagnosis, and serialization. It is something that you may often need to use for your day-to-day development. Now it does not matter, but you should know that there is such an article for your reference. Do not know is not terrible, terrible is that you do not know you do not know. Logging libraries are very common because you need them in every project. Printing logs is the most important thing in server-side applications, because logs are the only way you know what's happening in your program. Although the JDK comes with its own log library, there are still many better options available, such as Log4j, SLF4j, and LogBack. Java developers should be familiar with the pros and cons of logging, and understand why SLF4J is better than Log4J. In today's world of web services and Internet of Things (IoT), JSON has replaced XML as the preferred protocol for transferring information from client to server. There is a good news and a bad news. The bad news is that the JDK does not provide a JSON library. The good news is that there are many excellent third-party libraries that can be used to parse and create JSON messages, such as Jackson and Gson. A Java web developer should be familiar with at least one of Jackson and Gson. The use of unit testing technology is an important indicator to distinguish between a general developer and a good developer. Programmers often have various excuse not to write unit tests, but the most common excuse is lack of experience and knowledge. Common single-test frames include JUnit, Mockito, and PowerMock. There are several good third-party general-purpose libraries available to Java developers, such as Apache Commons and Google Guava. I will often use these generic class libraries in my code, because these class libraries have been practiced by countless developers, and they are the best in both practicality and performance. One important reason why I don't like the JDK is that they lack support for HTTP. Although you can use the java.net package class, this is much more troublesome than directly using open source libraries like Apache HttpClient and HttpCore. Although JDK 9 will begin HTTP 2.0 and have optimized HTTP support, I strongly recommend that all Java developers be familiar with the popular HTTP processing libraries such as HttpClient and HttpCore HTTP. There are many XML parsing libraries on the market, such as Xerces, JAXB, JAXP, Dom4j, and Xstream. Xerces2 is the next generation of high performance, fully compatible XML parsing tools. Xerces2 defines the Xerces NaTIve Interface (XNI) specification and provides a complete, standards-compliant implementation of the XNI specification. The parser is completely redesigned and implemented, simpler and modular. Many applications need to provide the ability to export data to Excel. If you want to do the same Java application, then you need the Apache POI API. This is a very rich class library where you can read and write XLS files from Java programs. If you are writing a framework or class library. There are some popular bytecode libraries such as javassist and Cglib Nodep that you can choose from. They allow you to read and modify the bytecode generated by the application. Javassist makes JAVA bytecode operations very simple. It is a library for editing Java bytecode. ASM is another useful bytecode editing library. If your Java application interacts with the database without using a database connection pool library, then you are wrong. Because creating a database connection at runtime is time-consuming and slows down your program. Therefore, cracking is recommended, and some useful connection pools are available, such as Commons Pool and DBCP. In web applications, web servers usually provide these functions. However, in the java project, the database connection pool library needs to be imported into the application. Like log and database connection pooling, messaging is a must for many actual Java projects. Java provides JMS Java Message Service, but this is not part of the JDK. You need to introduce jms.jar separately. Similarly, if you are going to use a third-party messaging protocol, TIbco RV is a good choice. In addition to Excel and Word, PDF is a common file format. If your application is to support PDF file processing, you can use iText and Apache FOP library. Both provide very useful PDF processing capabilities. Prior to Java, the JDK's date and time library has been criticized by people, such as its non-thread-safe, immutable, error-prone and so on. Many developers choose the better-used JodaTIme library. However, after the introduction of Java8, we can completely abandon JodaTime, because Java 8 provides all its features. However, JodaTime is still worth using if your code is running on an earlier version of the JDK. Although the JDK has a rich collection of classes, there are still many third-party libraries that provide more and better functionality. Such as Apache Commons Collections, Goldman Sachs collections, Google Collections, and Trove. Trove is especially useful because it provides a faster version of all standard Collections classes and the ability to have the Collections class operate directly on primitives (such as Maps that contain int keys or values, etc.). FastUtil is another similar API that inherits from the Java Collection Framework and provides several specific types of containers, including mapping maps, set sets, list lists, and prority queues, and implements the java.util package standard. Interfaces (also providing bidirectional iterators not available in the standard classes) also provide large (64-bit) arrays, sets, lists, and I/O operation classes for fast, useful binary or text files. Javax.mail and Apache Commons Email provide APIs for sending emails. They are based on the JavaMail API and provide simplified usage. Like XML and JSON, HTML is another form of transport that we may be dealing with. Thankfully, we have jsoup that can greatly simplify the use of HTML in Java applications. You can not only use JSoup to parse HTML but also create HTML documents. The Commons Codec in the Apache Commons family provides some common codec implementations, such as Base64, Hex, MD5, Phonetic, and URLs. I really like the memory database like H2, which can be embedded in your Java application. If you need a database to verify your SQL when you run a single test, he is a good choice. By the way, H2 is not the only embedded DB, you have Apache Derby and HSQL to choose from. The existence of a nice JDBC extension library makes debugging easy, such as P6spy, a dynamic monitoring framework for database access operations that allows database data to be intercepted and manipulated seamlessly without having to code the existing application. Make any changes. The P6Spy distribution includes P6Log, an application that records all JDBC transactions for any Java application. When the configuration is complete, data access performance can be monitored. The Google Protocol Buffer is a lightweight and efficient structured data storage format that can be used to serialize, or serialize, structured data. It is well suited for data storage or RPC data exchange formats. It can be used for language-independent, platform-independent, and extensible serialized structured data formats in fields such as communication protocols and data storage. Currently provides APIs in three languages: C++, Java, and Python. Some useful network libraries are mainly Netty and Apache MINA. If you are writing an application and you need to do the underlying network tasks, consider using these libraries. This is a very useful library for every Java developer should be familiar with. The Java ecosystem is very large and you will find that there are many different libraries that can do different things. There may be a library for everything you think of. Pearl Cotton Bag Cutting Machine Pearl Cotton Bag Cutting Machine,Front Sealing Bag Cutting Machine,High-Speed Bag Cutting Machine,Square Bottom Bag Cutting Machine Dongguan Yuantong Technology Co., Ltd. , https://www.ytbagmachine.com