Declarative: You describe the desired outcome: "give me all users where active = true". The system (SQL engine, React runtime) decides how to execute it. Declarative code describes the result you want, not the steps to get there. SQL is the classic example: SELECT * FROM users WHERE active = true says which rows you want, and the database decides how to find them.
HTML, CSS, React components, Kubernetes manifests and Terraform files are all declarative. You describe the desired state, and an engine works out how to reach it.
What should you keep in mind with Declarative?
The benefit is that the code is shorter and closer to the intent, and the engine can optimise behind the scenes. The trade-off is less control. When performance matters, you sometimes need to understand what the engine does, for example by reading a query plan. Declarative tools work best when you trust the engine for routine work and know how to look underneath when needed.
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or when debugging dependency cycles between application layers.