Wednesday, 27 October 2021

Concise Guide to Twelve-Factor App Methodology

Evolving technology has brought many changes in the ways of developing web and mobile apps. However, the fundamental guidelines or methodologies never get changed. One such example is the twelve-factor methodology. 

It has been around us for over a decade now and is still relevant for building enterprise-level apps. In this article, we are going to discuss the twelve-factor app methodology and its importance in the development process. 

Introduced around 2011, the Twelve-Factor App is a set of guidelines used to build SaaS (Software as a Service) for modern enterprises. 

It is designed to support discipline in the software development domain while addressing architectural, operational, and deployment-related concerns effectively. 

12-factor app methodology is suitable for cloud-native applications and software of a similar nature with on-premise hosting. 

Here are all 12 factors of this proven methodology. 

Top 12 Factors of App Methodology Explained

We will start with the first and foremost factor- codebase or base code.

Codebase for Uniformity

A twelve-factor app needs the code to be stored in source control like Git and defines the one-to-many relationship between a codebase and deployment of the resultant instances of the app. It is quite typical to have different versions of the application that can be run in a different environment. 

These days, we know the advantages of source control. Storage of a source code and its history enables us to get rid of issues related to code loss. It also facilitates many operations like branching, reverting changes, merging, and the like.

Dependency Isolation

When dependencies are hidden or conflicting between apps, they remain difficult to handle. Here, the Twelve-Factor App recommends declaring dependencies with the help of the package manager of the relevant programming language. 

It also recommends that developers can package dependencies with the application instead of relying on system-wide tools. 

If applications are run on the same host but need different dependencies, it is better to declare and isolate dependencies to avoid conflicts.

Configuration Differences

Even if the same code is deployed across different environments, every environment has a different configuration. 

The Twelve-Factor App recognizes this fact. Therefore, it is necessary to separate configuration from the code and store the same in environment variables. It means that only one application needs to be created that can be tested, deployed, and run in different environments. 

The Twelve-Factor App, however, does not say how to store secrets like passwords or API tokens.

 Originally Source: twelve factor app methodology

No comments:

Post a Comment