A way to evaluate an Android open source library

This last year, I have had opportunity to learn many things about open source libraries.
Working on my small library (thanks to everybody for the support and help!) I could see some aspects on the other side.

Before using a library, you should check some points.

It is a very focal point! The first thing to look at is the what license the code has been released.
Open source doesn't mean that you can use the code in any context.
There are various types of licenses and you should check if the license is compatible with your project otherwise you can have legal issues.

Check the last commits in the repository. If the last commit was 1 year ago likely the project has been abandoned (or it is complete and doesn't require updates...). Also it is very important to check how often the project is updated (or was updated).
Do not underestimate this point. If you use a library which is no longer maintained, you could have problems in the future.

Check if the repository has at least a dev branch. If the project has only a master branch it can be dangerous.
Usually good libraries have a stable version released on master branch, and the changes in development are pushed on dev branches.

Check how many issues are open, and how many issues were closed. If you find 300 issues open and 1 issue closed is not a good evidence.

You should evaluate also what kind of support you can find using it.Popular libraries have a tag (and a lot of posts) on stackoverflow, a G+ community or a very good issues section where to find a lot of comments and posts.

Code quality
You should spend a few hours to browse through the code. In this way you can check how it is written, if the dev uses a clean code, comments, javadoc...

You can't use a library without doc!! That's for sure!
Check if the library provides a good doc. Many libraries have a wiki section, a website or md files.

Demo and examples
Check if the library provides demo sources, examples, an apk or an app available on google play.
Often a demo in google play is the best way to see the features and its capabilities.

Unit tests
The existence of unit tests is a good indicator of a serious project.
I have to admit that there are few libraries with unit tests (I haven't a unit test on my libraries for example).
Unit tests requires time but they are very very important.

Aar on central maven
If you are working with an android library you need an aar format on central maven.
Do not hesitate to open an issue to ask the author to push an aar on maven.

Advance libraries: Travis integration
What is travis?
Travis CI is a hosted continuous integration and deployment system.
Today, some libraries are beginning to have this integration. I think that it is a very nice feature.
I need to find time to integrate my libs with it.

Last but not least, try a basic use test.

Finally,keep in mind that there are exceptions!


Popular posts from this blog

AntiPattern: freezing a UI with Broadcast Receiver

How to centralize the support libraries dependencies in gradle

NotificationListenerService and kitkat