One of my blog readers reminded me recently that it has been a while since he saw a tech piece from me. In parallel, I have been immersed in containerization work and it gave me the nudge to reflect on how we design and build modern, cloud-ready applications. This post marks the beginning of a blog series where I will walk through the journey of building a versatile application: from principles to deployment.
We will start with the foundations – The 12-Factor App Principles. From there, we will move into a hands-on Spring Boot app (Java is still home turf for me), then look at containerizing it with Docker, and finally deploying on Kubernetes. I believe that writing software today is no longer just about what the app does, but how it runs anywhere—with consistency, reliability, and scalability.
Why 12-Factor Still Matters
Introduced in 2011 by Heroku, the 12-Factor methodology offers a pragmatic blueprint for building SaaS applications that are portable and resilient. For those of us who grew up in the world of monoliths and app servers, this feels like the architectural decluttering we always needed but did not know how to articulate.
Let’s briefly explore each of the 12 principles as a set of operating philosophies that guide how we write, organize, and deploy our code in a modern landscape.
- Codebase – One codebase per app that serves many deploys from configurations.
- Dependencies – Explicitly declare and isolate dependencies.
- Config – Store config in the environment and not the code.
- Backing Services – Treat backing services as attached resources.
- Build, Release, Run – Strictly differentiate build, release and run stages.
- Processes – Execute app as one or more stateless processes.
- Port Binding – Expose services through port binding.
- Concurrency – Scale out by running more instances. This principle will come alive when we get to Kubernetes.
- Disposability – Fast startup and graceful shutdown to maximise robustness.
- Dev / Prod Parity – Keep development, staging and production as similar as possible.
- Logs – Treat logs as event streams.
- Admin Processes – Run admin / management processes as one-off tasks independently.
The 12-Factor methodology lays the foundation for building applications that are portable, resilient, and scalable. In the next post, we will bring these principles to life with a Spring Boot project designed with the cloud in mind.