# 3 Simple Tricks Every Architect Should Know About Twelve-Factor App

[Twelve-factor app](https://12factor.net/), introduced by Heroku, became a popular reference as principles in building cloud-native or software-as-a-service (SaaS) applications. As a software architect, awareness is an important aspect so that you can effectively apply new patterns or methodologies to make successful applications. Use these 3 Tricks / Steps when you are designing or refactoring the applications.

## 1\. Get to the basics

The first step is to ensure that you understand all the 12 principles in detail and also did your homework in finding out the reference applications built using those. Here is a quick snapshot for your reference – you can take the print and put it on your desk for quick reference.

![twelve factor apps](https://vedcraft.com/images/2020/09/image-5-1024x644.png)

Figure 1: _Twelve-factor apps in a glance_ (Reference: [https://12factor.net](https://12factor.net)/)

## 2\. Map the technology choices to each factor

Now that you have covered the basics, you need to map the technology choices with these factors into consideration and use **each factor as an evaluation criteria** to ensure the choice you made will help you realize your vision for the architecture.

For example, **a technology mapping diagram** (also a reference architecture) has been depicted as shown below using:  
– Microservices using **Java and Spring**\-based framework  
– Dependencies management using **Maven** or **Gradle** or **NPM** (if Node.js)  
– Containerization using **Docker** & container orchestration using **Kubernetes**  
– Continuous build & deployment using **Jenkins** or **Bamboo** or **Travis CI**  
– Logs management using **Elastic** with log sync with **Logstash** or **Fluentd**  
– RPEL using **Spring Shell** or **JShell** or use a lightweight Linux container with **Busybox**  

![twelve-factor app with technologies mapped](https://vedcraft.com/images/2020/09/image-6-1024x627.png)

Figure 2 _– Twelve-factor app reference architecture with technology mapping_

## 3\. Measure the effectiveness of twelve-factor principles

Architecture is always evolving, and if there are certain elements of these principles you are not able to meet in the initial phases, don’t worry about it. You can make incremental progress and keep measuring the effectiveness of the architecture on a regular basis.

For simplicity, these principles can be categorized into three specific areas – **development & configuration, runtime** and **management & visibility principles.**  

![](https://vedcraft.com/images/2020/09/image-20.png)

Figure 3 – Classification of Principles

Furthermore, a **simple scoring mechanism** (based on each factor’s checklist) can be used to measure the compliance level of your architecture until you reach your goal.

![](https://vedcraft.com/images/2020/09/image-21-1024x407.png)

Figure 4 – Compliance Level of Architecture

## The Next Factor

While these factors have helped over the years, **Observability** has emerged as a new factor to measure telemetry data (logs, metrics, and tracing) to provide end-to-end visibility.

![twelve-factor app with observability](https://vedcraft.com/images/2021/08/image.png)

Figure 5 – Observability as a new factor

That’s it – you can keep making progress towards your journey on learning these principles and mastering them out as you make more implementations. Only real-world examples can make you perfect. Share your journey of building twelve-factor apps or cloud-native apps to share the experience & knowledge with everyone.
