COLA stands for Clean Object-Oriented and Layered Architecture. It is a Java application framework from Alibaba that defines a standard structure for building backend business applications. The README is written primarily in Chinese. The core idea is that large Java applications tend to become messy over time because there are no firm rules about where different types of code should live. COLA addresses this by defining a layered folder and package structure that separates concerns: business logic lives in one place, infrastructure code in another, and the entry points for handling requests in yet another. By following this structure consistently, teams can keep complex applications organized and easier to maintain. Beyond the architectural guidelines, the project ships two parts: the architecture templates and a set of reusable components. The templates are Maven archetypes, which are project scaffolding tools. Running a single Maven command generates a new Java project with the correct folder structure already in place, so developers start with the right layout rather than having to set it up by hand. Two templates are provided: one for a pure backend service and one for a web application that includes an adapter layer for handling HTTP requests. The component library includes small, focused utilities that are commonly needed in business applications: a standard format for data transfer objects used in API responses, a structured exception hierarchy, a state machine for modeling workflows where something transitions between defined states, and utilities for logging and error handling. The current version is COLA 5, which added support for Java 17 and Spring Boot 3.x along with a lighter-weight variant of the architecture for simpler projects.
← alibaba on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.