Photo by Daan Mooij on Unsplash

Building software that works is one thing, building software that last is another, especially when the code size increases rapidly together with the number of people involved in its development.

In this article we will go through some maintainability issues and techniques to avoid them, using a nodejs web server built with Fastify (web framework) and Mongodb (database) as example.

Definition of the web service.

This particular service is a simple CRUD store for movies, but for many web services, you can scatter in the same way their various components somewhere along a line:


photo: Tetris by Rob Oo

Designing robust software often involves dividing a complex problem into smaller and flexible bits in order to then compose them into a coherent whole.

In this article, we will go through different aspects of software composition thanks to an example built with a web component which renders a greeting message: the famous “hello world” code sample.

Web components specification offers a low level API and does not hide much complexity behind various layers of abstractions as popular UI frameworks can do (this is why you would use such frameworks after all) an therefore make this technology a perfect fit for…


Some of my thoughts on tooling and testing with Nodejs are available on dev.to

Happy reading


vessel image at https://www.pexels.com

Most of the applications need at some point to persist data. It can be through files, local storage, cloud services or often databases. If you do not have particular requirement relational database systems are usually a good default choice, and particularly PostgreSQL, a very powerful open source SQL server. Moreover, if you develop for the Nodejs platform you will not run short of tools and solutions.

So what would be the ideal library or tool for your next application?

If you are lucky enough to work for a company which has resources to have its own dedicated database team, you…


injection picture found on pexels.com

In the first article, we learnt how to quickly set up an advanced table component in a declarative way using smart-table-ng.

In the second article, we looked at how we could use Angular built-in dependency injection together with smart-table to achieve different data loading patterns without changing our component.

In this article we are going to consider a new use case, where one would need to configure at run time the service in charge of fetching the data.


In the previous part we have succeeded in creating a smart table component in a fully declarative way. In this part we are going to explore how to use the factories together with Angular dependency injection in order to complete different requirements.

Most of the smart-table-ng attribute directives rely on an injected smart table instance. Luckily for us, once provided in our components hierarchy, Angular takes care of injecting the instance for us everywhere needed.

In our previous tutorial the instance was created from a static array and provided in the users table container component thanks to the “of” factory.


Smart Table sample

Smart table for Angularjs has been a reference in Angularjs community in term of table/grid component. It was praised for its declarative approach and its flexibility compared to others popular solutions.

Last year, using the experience I had acquired on this project, I created smart-table-core. The idea was to extract the logic you would need to have a smart collection you could sort, filter, search or create pagination and cursors with it (pretty common use case in many applications). It is not bound to any UI framework neither is bound to table/grid components. …


Async iterations are now officially part of 2018 ECMAScript specification, and as different JavaScript engines have started to support async generators and the for await statement, async iterable/iterator protocol begins to show all his promises (no pun intended).

Laurent Renard

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store