The State of mongo-datatable
May 20, 2018
I have published several open source libraries in my career as software engineer. Most of them are not popular and not widely used judging from some statistics. You can find them on my github profile and on organizations that I’m a part of. Anyway I’m gonna talk about a library that I published for the first time ever, that is mongo-datatable. It is a node.js module for dealing with server-side processing for jQuery datatables with MongoDB as the database engine.
This module was the first task assigned to me during my early weeks as back-end developer interns at DyCode. At the time, there was no library for doing server-side processing for jQuery datatables with MongoDB besides mongoose-datatable which also uses MongoDB as database engine but we need to use Mongoose ODM in order to use it. One of our products, Jepret Cloud dashboard needed the library to do server-side processing for jQuery datatables directly with MongoDB native driver because we didn’t use Mongoose (and adding Mongoose to the ranks was not a viable option at that time). We also gave up on client-side processing as the browser need to fetch ALL documents from a MongoDB collection. Clearly, it was not a scalable approach to begin with as the collection grew larger and larger over time. And that’s how the mongo-datatable module was born, it has been used on several of DyCode’s and DycodeX’s products internally since then.
Historically, the first version of this module, 0.1.0 was released at September the 7th 2015 to npm. The initial commit was actually created on July 3rd 2015 and it was completely unrelated to the module. It was just a few set up for the web page to test the module. Then this commit at July 5th 2015 marks the very first version of mongo-datatable module. To date, mongo-datatable has 83 commits and has 13 releases since 2015 with 1.1.1 as the latest version. Along the way, it gained 3 more contributors and among them is my mentor and the rest are people from community.
This module were considered stable after version 0.4.1 was released on June 25th 2016. The version 1.0.0 was introduced a year after the fist release, and there were no significant changes since 0.4.1. The reason is that there are not many issues in the github issue tracker. Another reason is that I was busy with another projects so I thought if it ain’t broke, then don’t fix it.
The Future of mongo-datatable
Just because you don’t see any updates in relatively long time, doesn’t mean that this library is dead. In fact, there are a lot of space for improvement. If you notice, the library still uses old ES5 syntax with callbacks all over the place. That is just one of many parts that can be improved. In summary, here is a short list of things that I want to apply to this library in near future:
- Add unit and integration tests
- Supports modern JavaScript syntax (ES6 and later)
- Use promise(s) for async execution
- Better documentations and code examples
- And many more
Closing Statement
Thank you to all contributors (those who send PRs and those who filed issues) for your help, your contribution means a lot to me. Also to developers who use this library, I hope this library is useful for you and if it’s not, feel free to send me your feedback.