Compose

A document organizing declarative UI frameworks centered on Jetpack Compose and other 'Compose'-family technologies such as Docker Compose.

Compose (컴 포즈)

Overview

Compose (컴 포즈) is an umbrella name for a family of technologies in software development that declaratively compose multiple components into a single result. The most widely used example is Jetpack Compose, Android's native UI toolkit, while the container orchestration tool Docker Compose shares the same name. The two technologies are deeply related conceptually in that both share the declarative paradigm of "declaring and composing a desired final state rather than controlling each element imperatively."

Main Content

Jetpack Compose

Jetpack Compose is a declarative UI framework for Android first unveiled by Google at Google I/O 2019 and released in its official 1.0 version in 2021. Unlike the conventional XML layout + findViewById approach, it describes the UI directly in code by attaching the @Composable annotation to Kotlin functions.

kotlin

@Composable

fun Greeting(name: String) {

Text(text = "Hello, $name!")

}

Its key characteristics are as follows.

  • Declarative UI: When state changes, the framework redraws the screen on its own. Developers describe only "what to show."
  • Recomposition: Only the composable functions whose state changed are selectively re-executed to optimize performance.
  • State Hoisting: A recommended pattern that lifts state up to a parent composable to implement a one-way data flow.
  • Material Design 3 support: Colors, typography, and shapes are managed consistently through MaterialTheme.
  • Preview and tooling: Real-time preview is available via the @Preview annotation in Android Studio.

Docker Compose

Docker Compose is a tool that defines multiple containers in a single YAML file (docker-compose.yml) and runs and manages them together. It is widely used for setting up local development environments that bring up a web server, database, cache, and more all at once.

yaml

services:

web:

image: nginx:latest

ports:

- "8080:80"

db:

image: postgres:16

environment:

POSTGRES_PASSWORD: example

Other Compose-family Technologies

  • Compose Multiplatform: Led by JetBrains, it supports Android, iOS, desktop, and web together with the same Kotlin UI code.
  • Docker Compose Specification: Split off as an open standard in 2021 and adopted by various runtimes.

Latest Trends

As of 2024–2025, Jetpack Compose has established itself as the de facto standard for new Android projects. Google continues its form-factor expansion based on Compose with Compose for Wear OS, Compose for TV, Compose for Auto, and others, and has simplified library version management through the Compose BOM (Bill of Materials).

A particularly notable change is the stabilization of Compose Multiplatform. With iOS support reaching the stable stage in 2024, attempts to share Android, iOS, and desktop UI with a single Kotlin codebase are increasing. In addition, architectures that share even business logic through combination with Kotlin Multiplatform (KMP) are spreading.

Meanwhile, Docker Compose has made Compose V2 (rewritten in the Go language) the default since 2023 and integrated it under the docker compose (no hyphen) command. In 2024, along with changes to Docker Desktop's licensing policy, use of alternative runtimes such as Podman Compose and Colima also increased. Cases of combining with generative AI to automatically generate UI code or automate container configuration are also on the rise.

Related Topics

  • [[Jetpack Compose]]
  • [[Docker]]
  • [[Kotlin]]
  • [[Compose Multiplatform]]
  • [[Declarative UI]]
  • [[Android]]
  • [[Container]]