Backend Interview With Oriol Saludes
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
Question #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. This is 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, the 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 microframework for PHP very handy when the application doesn’t need all the complexity of a full framework like Symfony, for example. It has all the basics from a framework: routing, controllers, events, etc. Anything 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 by choosing a few configurations like the build automation tool (Maven or Gradle), the language, a 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.
Question #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. This choice can be very convenient for the communication of the client and its API. DTOs can be shared between both parts. Once a new variable is added or removed from a DTO from one side, the other part will be affected immediately. Some silly mistakes can be avoided, as when the API renames a variable but the client has not realized it 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 of using NodeJS is its excellent performance using non-blocking I/O calls, which can handle several connections at the same time.
For the handling of the database, there are some great ORMs like TypeORM or Sequelize.
Last but not least, NodeJS 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.
Question #3: Why Use Kotlin and Spring Boot?
As we already mentioned, the 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, etc.), 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, it 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 makes 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).
Credit: Source link