Backend

Backend

Techniques

Insight: The main benefit of using Javascript (Typescript) in the backend is that frontend developers that are already used to the language have the ability to switch to backend without having to learn a new language. At Apiumhub we have used Javascript in projects like Agora Images, AXA & Nestlé among others.
 
Insight: The benefit of using a monolithic architecture is the cheaper approach in terms of CI/infrastructure/repository management. This can always be evolved into microservices if the monolithic backend is well done, using DDD for example. Agora Images project is a good example of monolithic architecture.
 
Related Post: Many small Monoliths

Insight: Requests temporarily fail for many reasons, with this pattern we can handle this transient failures, trying to retry the request giving a retry strategy. Currently Retry Pattern is implemented in projects such as EY & Ayoba.

Related Post: Retry Pattern: examples & recommendations

Insight: The Circuit Breaker pattern prevents an application from continuously attempting an operation with high chances of failure, allowing it to continue with its execution without wasting resources as long as the problem isn’t solved. Also, this pattern can detect when the problem has been solved so the compromised operation can be executed again. In a way, we can see this pattern as a proxy between our application and the remote service that’s implemented as if it was a state machine that mimics the behaviour of a switch in an electrical network.

Related Post: The Circuit Breaker

Insight: DSL has two main benefits. The most common benefit is that they make certain kinds of code easier to comprehend, which makes it much easier to modify, thus improving programmer productivity. This is worthwhile all on its own and is relatively easy to achieve. At Apiumhub we used DSL for Allnow Europe project.

Related Post: Creating, Using & Building a DSL

Insight: In Apiumhub we love Hexagonal Architecture.It is an architectural style that moves a programmer’s focus from conceptual layers to a distinction between the software’s inside and outside parts. Hexagonal Architecture promotes the separation of concerns by encapsulating logic in different layers of the application. This enables a higher level of isolation, testability and control over your business specific code.

Related Post: Hexagonal architecture in a Symfony project: Working with Domain Identifiers

Insight: In Apiumhub we use it a lot. Feature flagging enhances continuous delivery by allowing the separation of feature rollout from code deployment. Incomplete features can be merged into the production codebase but hidden behind feature flags. Feature flags allow you to toggle a feature on or off at any point of time. Without this technique the CD is almost impossible. A featured use of Feature Flag is the project we did for Nestlé.

Related Post: Feature Flag pattern in Java

Insight: It is important, when it comes to valuation, to be very clear about the objectives and problems that need to be resolved with a transition to microservices, for example, fast builds at component level, manageability of projects, very clear and rigid boundaries, deployment independence and quality of service, possibility of polyglot programming/persistence.

Related Post: Eventual Consistency Through Message Ordering In A Microservices Architecture

Insight: TDD is in the center of any software project we work on. We believe that writing the tests first requires you to really consider what do you want from the code. It allows you to receive fast feedback. TDD forces you to write small classes focused on one thing and creates SOLID code. TDD makes your project maintainable, flexible & easily extensible. A good example of TDD benefits is Grifols project.

Related Post: TDD example in software development (Part I)TDD First Cycle (Part II)TDD: primitive obsession (Part III)

Insight: Monads provide their own data type, which represents a specific form of computation, along with one procedure to wrap values of any basic type within the monad and another to compose functions that output monadic values. This allows monads to simplify a wide range of problems, like handling potential undefined values, or keeping values within a flexible, well-formed list. With a monad, a programmer can turn a complicated sequence of functions into a succinct pipeline that abstracts away auxiliary data management, control flow, or side-effects.

Insight: Memento is a pattern design with the goal of stacking an object’s state at a given time. Also, memento pattern is used to restore state of an object to a previous state. As your application is progressing, you may want to save checkpoints in your application and restore back to those checkpoints later.

Insight: Vavr was invented with the mission of reducing the code making it more readable and adding robustness with the immutability of the data. Vavr among other things includes immutability in lists and functions to work with them, it also includes some of the monads most used in other languages, more functional, currying and partial application in functions.

Related Post: Be more functional in Java with Vavr

Insight: A good software system has low coupling, which means that changes to one part are less likely to propagate through the rest of the system. A further benefit of low coupling is that components are easy to replace and, potentially, reuse.

Insight: An architectural fitness function checks the architectural quality attribute in an objective manner. An example: the unit test suite tests the software matches the business expectations in terms of features. Another example: a test can be set up to check that no circular dependency exists. This test is atomic, automated, static. Another example: The build cycle time is below twice the average build time. This test is holistic, automated, static. Kipit is a proper project example of implementation of Fitness Functions.

Insight: OAuth is the industry-standard protocol for authorization. OAuth is a way to get access to protected data from an application. It’s safer and more secure than asking users to log in with passwords. It is an open protocol to allow secure authorization in a simple and standard method from web, mobile and desktop applications.

Related Post: Implementing Google OAuth To Use Google API In Cloudflare Workers

Insight: Micronaut is a software framework for the Java virtual machine platform. It is designed to avoid reflection, thus reducing memory consumption and improving start times. Features which would typically be implemented at run-time are instead pre-computed at compile time.

Related Post: Creating A Telegram Bot With Micronaut

Insight: SQL databases play a crucial role in data storage, retrieval, and management. SQL databases have been widely used in various applications, including web development, enterprise systems, data analytics, and more. While they are powerful and flexible, it’s essential to design and maintain the database properly to ensure optimal performance and data integrity.

Related Post: Azure Elastic Jobs for SQL Databases

Insight: Debugging is a crucial aspect of software development that involves identifying and resolving issues in the code to ensure that the program functions correctly.

Related Post: Debugging The Perplexing: Don’t Panic!

Languages & Frameworks

Insight: Scala provided a great integration with Kafka streams as well as all the libraries that could be reused from Java. That and it’s Functional-OOP nature made Scala a good choice for the projects we worked on (for example All-now Europe).
 

Insight: Kotlin provides a perfect interoperability with java, facilitates the immutability, productivity and makes the Functional paradigm easier than Java. Kotlin is our Backend Language recommended as we used for many projects such as PrivaliaBwom & Nestlé among others.
 

Insight: PHP is highly flexible. It was a natural upgrade for Dexeus since their code was ASP. The migration to PHP was easier than it would have been to rewrite to any other language. We also have used PHP for CarnovoPrivaliaBwom & Typeform.
 

Insight: A coroutine is a concurrency design pattern that you can use to simplify code that executes asynchronously. Good examples of using Coroutines in projects are Agora Images, AXA & Fotoraporto.
Insight: ORMs give us a convenient manner to handle databases avoiding some boilerplate. They make the code easier to update, maintain, and reuse as the developer can think of, and manipulate data as objects.
 
Insight: Symfony was conceived from the start to be fast, with a strong emphasis on performance. Symfony is adaptable. Its dependency injector and the Event Dispatcher make it entirely configurable, with each of the bricks being fully independent. At Apiumhub we have used Symfony for Carnovo.
 
Insight: Deno is upgraded newer version of Node.js. And it is based around Security as its first principle.
Insight: Bot Framework Composer is an IDE built on top of Microsoft’s Bot Framework SDK, aiming to provide a powerful, yet intuitive tool to develop and deploy bots at a faster pace. It’s flow-like designer is easy to understand and get started with, while the aspect of customizability does not feel compromised – the source code, be it C# or JavaScript, can be edited and expanded directly. Bot Framework Composer was used for Nestlé.
 

Insight: Azure Elastic Jobs for SQL databases provide a way to execute long-running procedures in a database, invoked by a Logic App, working around the default timeframe limitations. Azure Elastic Jobs was used for Nestlé.
 

Insight: Quarkus is a Java framework tailored for deployment on Kubernetes. Key technology components surrounding it are OpenJDK HotSpot and GraalVM. Amazingly fast boot time, incredibly low RSS memory (not just heap size!) offering near instant scale up and high density memory utilization in container orchestration platforms like Kubernetes. It combines both the familiar imperative code and the reactive style when developing applications. Quarkus provides a cohesive, fun to use, full-stack framework by leveraging a growing list of over fifty best-of-breed libraries.
 

Insight: Apache Camel is an open source framework for message-oriented middleware with a rule-based routing and mediation engine that provides a Java object-based implementation of the Enterprise Integration Patterns using an application programming interface to configure routing and mediation rules. When a project has many integrations, Apache Camel helps a lot, it manages a lot of complexity and unifies the way in which we integrate, since for Camel everything is considered a Message, regardless of the data source. The fact that Camel standardizes all data in the same way simplifies integrations with other systems. Apache Camel was used for MANGO.
 
Related Post: Apache Camel 101

Insight: Spring Native provides support for compiling Spring applications to native executables using the GraalVM native-image compiler. Compared to the Java Virtual Machine, native images can enable cheaper and more sustainable hosting for many types of workloads. These include microservices, function workloads, well suited to containers, and Kubernetes.
 
 

Insight: Spring Boot is a powerful and widely used framework for building Java-based applications, particularly web applications and microservices. It provides a comprehensive ecosystem that simplifies the development process and reduces boilerplate code, allowing developers to focus on business logic.
 

Tools

Insight: Terraform is an open-source, infrastructure as code, software tool created by HashiCorp. While Terraform uses HashiCorp’s own configuration language (HCL), it’s simplicity makes it easy to get up to speed with it quickly, and then writing quite sophisticated infrastructures still can end up in a fairly readable and easy-to-follow format. Terraform’s biggest strength over ARM templates is it’s more concise and readable syntax. Terraform was used for Nestlé.
 

Insight: Submodules allow you to keep a Git repository as a subdirectory of another Git repository. It offers versability to modify main and submodules code in the same (IDE) project and commit/push to each remote repository separately. Enforces the Single Responsibility Principle decoupling specialized code into submodules from parent projects. So, removes duplications. And there is no need to create and publish a Nexus artifact jar file.
 
Related Post: Git submodules

Insight: A perceptual hash is a fingerprint of a multimedia file derived from various features from its content. Unlike cryptographic hash functions which rely on the avalanche effect of small changes in input leading to drastic changes in the output, perceptual hashes are “close” to one another if the features are similar. pHash is an open source software library released under the GPLv3 license that implements several perceptual hashing algorithms, and provides a C-like API to use those functions in your own programs. pHash itself is written in C++. pHashes allows the comparison of two images by looking at the number of different bits between the input and the image it is being compared against. Perceptual hash functions are widely used in finding cases of online copyright infringement as well as in digital forensics because of the ability to have a correlation between hashes so similar data can be found. pHashes was used for Etnia Barcelona.
 

Insight: Liquibase is an open-source database schema versioning and migration tool that allows software developers to manage database changes and deployments in a systematic and automated way. When combined with Kubernetes, Liquibase can be a powerful tool to manage database schema changes in a containerized environment.
 

Insight: Project Loom aims to bring “easy-to-use, high-throughput, lightweight concurrency” to the JRE. One feature introduced by Project Loom is virtual threads. In this blog post, we’ll be exploring what virtual threads mean for web applications using some simple web applications deployed on Apache Tomcat.
 

Secured By miniOrange