Table of Contents
We are continuing with our interview series (previously we had interviewed Diego Ojeda – Android Lead at Apiumhub, Serhii Zabolennyi – QA Automation engineer at Apiumhub, Javier Gomez – backend developer at Apiumhub and Cuong Le – Backend developer at Apiumhub. Today we interview Oriol Saludes – Backend developer at Apiumhub and talk about key lessons learned in Backend architecture.
Interview with Oriol Saludes – Fullstack Developer
1. List your TOP 5 backend frameworks and explain why
1.- Symfony – php
Symfony is a framework for PHP with a great evolution over the last few years. It has evolved to a componentization style and now some Symfony components can be used as standalone libraries in any PHP project. With this idea in mind, they even closed the Silex project, a microframework based on Symfony that the same community was maintaining, because since version 4, when building a new application, you can choose to start using the whole framework or a minimal part if you are building a microservice or a simple API.
Besides, by default it uses Doctrine as its ORM, which it’s one of the best in the PHP ecosystem.
And if the project code still follows an old style where the php returns the html, Symfony team has built its own template engine: Twig. It’s very convenient and easy to split the code and the view.
Slim is a micro framework for PHP very handy when the application doesn’t need all the complexity of a full framework as Symfony for example. It has all the basics from a framework: routing, controllers, events… From a simple API to a big website can be done with Slim. As with Symfony, Doctrine and Twig can be used as well.
3-. Spring boot
The most mature framework of the list, in this case for the JVM family, allows applications to be written in Java, Kotlin or Groovy indifferently. Spring boot, as they call themselves, is an opinionated configuration of the Spring platform that can just run the applications from the very beginning. With Spring initializr a new project can be easily built choosing few configurations like the build automation tool (Maven or Gradle), the language, few settings like the package name and also adding the dependencies from the several third-party libraries that are easily configurable. From that point, it’s very straightforward to start coding your own application.
Micronaut is another JVM framework with the idea of microservices or serverless in mind. That means that their startup time is incredibly short (especially if we compare it to spring boot) and the memory consumption is also lower than other frameworks.
2. When and why use NodeJS for Backend development?
Some teams who have more knowledge in some frontend technologies may be more comfortable working with a stack they already know. In this case, choosing NodeJS for backend development may be an excellent choice for them since there is no need to learn a new technology. As an end result, a new product can be delivered faster which can be very important for its success.
Besides, there are some other points to be considered.It can be very convenient for the communication of the client and its API. DTOs can be shared between both parts and once a new variable is added or removed from a DTO from one side, the other part will be affected immediately avoiding some silly mistakes as when the API rename a variable but the client has not realized until the error appears. To share the DTO, but also some other possible components, the project can be built using a monorepo (different parts of the project are kept in the same repository). Some of the monorepos we have been working with are Nx or Lerna
Another important consideration is its excellent performance, using non-blocking I/O calls which can handle several connections at the same time.
And last but not least, because it can be written in Typescript. Although node was written in JS, we should take advantage of the power that Typescript brings us which allows us to write code with fewer bugs.
3. Why use Kotlin and Spring boot?
As we already mentioned, Spring framework has a great maturity and robustness: it has been evolving for years, so plenty of libraries can be found (connectors to all types of databases, caches… ) and it’s ready to be used without too many headaches. There is plenty of documentation and since there is a huge community around the project is continuously improved and updated.
Kotlin tries to solve some of the common issues that Java had (no need for example to include Lombok) and remove a lot of boilerplate that Java needs to build stuff.
It’s completely compatible with Java code, which make the transition from a Java code to Kotlin very smooth (no need to do it all at once, and you can introduce a kotlin file inside your Java project)
If you need help with Backend development, let us know! We are experts in this field!