Here at Hotovo, we are continuously evaluating the most effective technologies in order to better serve our partners. For server side development we have traditionally favoured a Java technology stack, however there’s no such thing as “one size fits all”.
On occasion, our partners have a strong preference for alternative technology stacks. As software experts, we’re happy to oblige. We’ve found there to be a multitude of reasons for technology preferences. More often than not, there’s a historical reason certain businesses favour one stack over another. Of course those are valid points! This is actually what pushes and motivates us to move forward in building professional development teams focused on the technology stack based on preferences.
What do we use?
It is not that much of a surprise that our solution of choice is Typescript language and Node.js as the backend runtime environment. This stack became incredibly popular over the last few years and we had dived deeper into it. Why do we prefer it?
When comparing the number of libraries and modules available in the package repository, their number is several times higher than in any other language and is still growing rapidly.
Node.js achieved significant popularity over the years and according to the StackOverflow survey is the widely used server environment. Source: https://insights.stackoverflow.com/survey/2020#technology-programming-scripting-and-markup-languages)
NestJS is a framework for building well scalable Node.js server-side applications built with TypeScript and fully supporting it. It is based on HTTP Server framework Express or alternatively Fastify. Nest provides a level of abstraction above the common Node.js frameworks and exposes their APIs to the developer. This provides a great deal of freedom when using third party modules. It favors convention over configuration. It offers opinionated guidelines and code conventions. So, instead of having a worry about naming or organizing files and folders, you can focus on building features for your product.
A good reason to choose NestJS over ExpressJS is the fact that when starting a new project in Node.js, it has a clear architecture based on a few simple components (controllers, modules and providers). This is a great baseline for building a microservice architecture.
TypeORM framework is an Object Relational Mapping (ORM) framework. ORM is a type of tool that maps entities with database tables. ORM provides a simplified development process by automating object-to-table and table-to-object conversion. Once you can write your data model in one place, it becomes easier to update, maintain, and reuse the code.
TypeORM is the most mature ORM available in the node.js world. Because it is written in TypeScript, it integrates well with the Nest framework using the integration provided by Nestjs authors.
All pieces together form a well tested base for backend development using Typescript which would suit a proof of concept project, right the way up to an enterprise level solution.
Are you curious to see the backend Nest.js project in practice? Check out our next blog post where we go into details into details and even provide a sample project.