Subremes Codes

What are the Most Popular Libraries Java Developers Use? Based on Github’s Top Projects

By Guest Blogger Henn Idan

 

GitHub is the most popular git hosting service, letting independent developers host their code for free, or helping enterprise level companies share code within the company. It seems that everyone has used it or using it right now as we speak, which also makes it one of the best sources to identify trends and popularity of repositories and libraries.

 

And that’s exactly what we at OverOps decided to do; use the site to figure out which are the most popular Java libraries. Using a combination of BigQuery and SQL, we now have the results. Let’s check them out.

And the winner is…

 

The most popular Java library for 2017 is none other than the testing library JUnit. It’s so popular, that it caught the top 3 places of the chart. JUnit is in the first place, followed by JUnit library, the extended JUnit abstract Runner class. And the third place goes to the older junit.framework.

 

JUnit is not the only testing library that made it into the top 5, and Mockito, the open source mocking framework made it to the 4th place among the most popular Java libraries. And the library that’s closing our top 5 Java libraries of is slf4j, the logging facade for Java.

 

Hamcrest, a framework that assists writing tests within JUnit and jMock, made it into the 6th place, following the trend we can already see; the need for better testing environments.

 

The fact that the most popular Java libraries focus on testing is huge. It’s a sign that Java developers put the reliability of their code as a #1 priority. And this is a near and dear topic that I like to cover, especially new ways to produce reliable code, and how to use logs in the best way possible.

 

What were the biggest trends in the top 100?

There are a few well known names in our chart, Guava being one of them. The set of open-source common libraries for Java is super popular among many developers, and we can see 9 different libraries from that family that made it into the top 100:

 

#7 – com.google.common.collect

#9 – com.google.common.base

#14 – com.google.common.io

#21 – com.google.common.util.concurrent

#29 – com.google.common.annotations

#41 – com.google.common.cache

#42 – com.google.common.primitives

#51 – com.google.common.net

#62 – com.google.common.hash 

We can see that Spring has 8 libraries at the top 100: 

#57 – org.springframework.beans.factory.annotation

#60 – org.springframework.context

#65 – org.springframework.context.annotation

#66 – org.springframework.stereotype

#68 – org.springframework.util

#81 – org.springframework.test.context.junit4

#85 – org.springframework.beans.factory

#91 – org.springframework.web.bind.annotation

 

And Apache has no less than 17(!) libraries that are popular among Java projects:

 

#16 – org.apache.commons.io

#22 – org.apache.http

#24 – org.apache.commons.lang

#25 – org.apache.http.impl.client

#30 – org.apache.http.client

#33 – org.apache.http.client.methods

#34 – org.apache.log4j

#35 – org.apache.commons.codec.binary

#45 – org.apache.commons.lang3

#53 – org.apache.http.entity

#61 – org.apache.http.util

#64 – org.apache.commons.logging

#75 – org.apache.http.message

#88 – org.apache.zookeeper

#95 – org.apache.hadoop.conf

#98 – org.apache.http.client.config

#100 – org.apache.http.client.utils

 

And as a little anecdote, Javax, the prefix used for standard Java extensions, has 26 libraries in the chart.

Notable names on the chart

We also detected some new (and some not-so-new-yet-uprising) libraries that are worth mentioning. The first one that caught our attention was org.w3c.dom, which provides the interfaces for manipulating the DOM (Document Object Model).

 

Other names that popped up were Coda Hale Metrics, and Objectweb, a small and fast Java bytecode manipulation framework. Joda-Time, which provides a replacement for the Java date and time classes, landed in #46, and the PowerMock support module for JUnit 4.x (org.powermock.modules.junit4) also made an appearance at #85 on the chart.

 

Another name that’s worth mentioning is AssertJ, a library that provides a fluent interface for writing assertions. While it’s not new, it came up at a nice and cozy place in the middle of the chart, at #50.

 

Check out the complete list of the top GitHub Java libraries here.

How did we crunch the numbers?

This information is based on a research we did at OverOps during 2017, in which we used BigQuery to pull the top 1,000 Java repositories from GitHub’s API, according to their star ratings.

 

We extracted the Java libraries that  these repositories use, and focused on the pure Java projects, which left us with 477 repositories. We took a deep dive into those repositories, after filtering out Android, Arduino and deprecated repos, and were left with 259,885 Java source files.

 

After prettifying the process (removing duplicate uses of the same library in the same repo), we had a total of 25,788 unique libraries. Out of these libraries we pulled our top 100 list, which is brought before you in this post. You can see the complete list of the top GitHub Java libraries here.

What’s coming in 2018?

2018 is going to be a significant year for Java and for its developers. Since the release of Java 9 last September, the whole platform has changed a lot, and the lastest change is moving to a six month release model.

 

Oracle’s decision to move to a faster release cycle is part of a change we see within the entire industry. Companies, teams and even programming languages are aiming for short release cycles, constantly updating their products and staying up to date with changes and innovations that are relevant to them.

 

All this considered, it’ll sure be interesting to see which Java libraries will be popular next year, and what kind of impact the new Java release cycle would have on the ecosystem.

 

Статья полностью:What are the Most Popular Libraries Java Developers Use? Based on Github’s Top Projects

Login