The latest expert opinions, articles, and guides for the Java professional.

Microlibraries: the next small thing in software development!


The Microlibraries Architecture

In computing, microlibraries is a software architecture style in which complex applications are composed of small, independent libraries communicating with each other using language-specific APIs. These libraries are small building blocks, that are tightly coupled and focused on doing a small task well, facilitating a modular approach to system-building.

How did we get here?

The world is becoming more and more modular every day. With the pressure of existing systems to be modularised under the hype of microservices, architects want to compose their system architecture of bite sized modules with well defined edges. The microservices architecture is the first software architecture style that has begun to make use of microlibraries.

Microlibraries Philosophy

The philosophy of the microlibraries architecture is similar to the Unix philosophy of “Do one thing and do it well”. It is described as follows

The libraries are small – fine-grained to perform a single function, literally.
The organization culture should blindly embrace automation of deployment and testing. This eases the burden on management and operations.

The culture and design principles should embrace failure and faults, similar to anti-fragile systems.
Each library is elastic, resilient, composable, minimal, and complete.


Microlibraries have particularly taken off in the JavaScript space with some hugely popular microlibraries that have even been hosted on the popular NPM website.

  • isArray — With 18M downloads last month this is the most popular microlibrary on NPM. It provides one function and it really delivers on it. More information at

  • Left pad — With over 2M downloads last month this is another great example how a single function has been packaged into a microlibrary. See the examples at

  • isPositiveInteger — This is a new, up and coming library with only 86 downloads last month but shows great potential. The author has succeeded in packaging a very important necessity of checking whether a integer (almost every number will do!) is positive. See for examples

  • Is-thirteen — This microlibrary is still on github and hasn’t quite made it to yet, but sources say it is going through the review process. Already with hundreds of stars, tens of forks this project enables developer to check if the number is equal to 13.

However until now, this was other people’s problem, mostly affecting JavaScript developers.
But now even the slowly moving world of Java is finally onto this microgoodness. One fantastic microlibrary that anyone should check out is isJRebel.

isJRebela microlibrary available on Github, that is looking for a permanent home in your code. It has the simple task of determining whether or not a String is equal to the String “JRebel”.

It’s extremely simple to make use of microlibraries from your code. Here’s an example in which I invoke my isJRebel microlibrary from a simple microapp that runs on the JVM.

@GrabResolver(name='jitpack', root='')
import org.zeroturnaround.isjrebel.IsJRebel
println "Hello ${IsJRebel.isJRebel('JRebel') ? 'mad-mad' : ''} world"

If you tend to support the myth that Java is verbose, you might think this is a revolution! Well, in fact, the code above is actually a Groovy example. However, it is a working app, and you can save this snippet into a file, say, isJRebelTest.groovy and execute: groovy isJRebelTest.groovy to check if the world has truly gone mad.


Even now isJRebel has fairly advanced functional capabilities! It is aware of the common practices of including typos, l33t slang, and even can perform a case insensitive comparison. On top of that, isJRebel follows the best trends of microlibraries and pulls some wonderful dependencies into your code like the Apache commons library. Less advanced developers would consider it a massive overkill for such a simplistic task. However, it allows isJRebel to perform the task at hands in a very flexible manner and expands its capabilities to previously unimaginable depth.

Note isJRebel is a microlibrary in active development and the team are accepting contributions to some of the future features enhancements planned. If you want to help, fork the project and send the team a pull request!


The microlibraries architecture has been subject to criticism for a number of issues:

  • libraries form information barriers as they are highly coupled
  • the architecture introduces additional complexity and new problems to deal with, such as dependency management with deep transitive dependency version hell, load balancing and fault tolerance
  • testing and deployment are more complicated
  • the complexity of a monolithic application is only shifted into the dependencies, so persists.


Too-fine-grained microlibraries have been criticized as an anti-pattern, dubbed a nanoservice by Samoot Remor Nomis:

A nanolibrary is an anti-pattern where a library is too fine grained. A nanolibrary is a library whose overhead (project README, logo etc.) outweighs its utility.

Problems include the code overhead (constants being in separate projects), compilation overhead (pulling in the dependencies, network traffic), and fragmented logic (useful functionality not implemented in one place, instead requiring combining many libraries). Many call for the functionality in a nanolibrary to be packaged as part of a microlibrary.

More information

If you’d like to learn more about microlibraries and nanolibraries you can read all the documentation in microbook format, available on Amazon. Whereas traditional books tend to write too much fluff on a topic, bloating out concepts with information on edge cases, microbooks focus on being concise, only talking about key aspects of the subject matter. They achieve this by restricting their physical form to a post-it pad. This ensures authors cannot write too much, forcing them into documenting the key points only. As post-it note pads work well as flipbooks, they can also be used to produce off-line how-to videos, showing you microlibraries in action.

Responses (9)

  1. Avatar  

    Lukas Eder

    April 1, 2016 @ 10:24 am

    Damnit you beat me to this insightful analysis. I had the same impression when I read about leftPad and isArray – this must be a new trend in IT.

    I have to be faster in order to be the first to coin new terms in the future!

  2. Avatar  

    Abhijith T N

    April 1, 2016 @ 12:13 pm

    Guys, you are just too good on normal days and when it is April 1st you are even good than ever. Still remember the ZipRebel of last year reducing everything to 1 bit.

    You beat every satire websites in the world on April 1st. Luckily today is Friday, so can stay relaxed. Good trend in IT with even google joining the fool’s day

  3. Avatar  

    Toomas Römer

    April 1, 2016 @ 1:24 pm

    Any similar trends happening in SQL world? I’m sure there is more useful stuff in the JavaScript land that one can borrow!

  4. Avatar  

    Lukas Eder

    April 1, 2016 @ 1:33 pm

    Yes, there are a couple of free PL/SQL functions, like the IS_NULL function:

    END is_null;

    I’ve found this very useful every now and then, when I didn’t know how to check for NULL

  5. Avatar  

    Toomas Römer

    April 1, 2016 @ 1:58 pm

    This is a SQL microlibrary right there! Now if you could only dynamically load it from your disqus comment to make it really easy to distribute!

  6. Avatar  

    Lukas Eder

    April 1, 2016 @ 2:03 pm

    Heck, excellent idea right there! I could use the PL/SQL HTTP package to download the scriptlet from the internet (, install and compile it with EXECUTE IMMEDIATE, and I’m all set!

  7. Avatar  

    Oleg Šelajev

    April 1, 2016 @ 2:58 pm

    You really want your microlibrary repository to be immutable-ish at least. That’s why disqus comments are a poor choice. Twitter on the other hand doesn’t allow to edit tweets, so it’s a much safer choice. Require from Twitter is already a thing in JavaScript and it can be a thing ins the SQL world.

    * Require from Twitter:

  8. Avatar  

    Lukas Eder

    April 1, 2016 @ 3:03 pm

    Hey, excellent idea! The 140 character limit also enforces the micro paradigm

  9. Avatar  


    May 25, 2016 @ 9:16 am

    We specialize in Clarity Enhanced and Non Enhanced diamonds as well. We provide Large diamonds at HALF the price of Non Enhanced diamonds. Family owned and operated over 40 years. Please contact us for details.
    Xender Download Free
    xender apk download

RSS feed for comments on this post.

Leave a comment