Skip to main content

Spring Cloud Business Foundation

· 2 min read
TeaQL Code Gen
Core Contributor

Historical note: This article documents an earlier TeaQL generation target. Early versions emitted backend templates, UI pages, mobile clients, and service scaffolding directly into application workspaces. Modern TeaQL has moved to a clearer boundary: generation produces versioned libraries, deterministic business APIs, query DSLs, and runtime capabilities that applications consume as artifacts. This is more friendly to AI-assisted coding and DevOps because AI agents can focus on business workflows, integrations, tests, and product behavior, while generated capabilities are reviewed, tested, published, upgraded, and rolled back through normal dependency and release pipelines.

In 2021 the generator added a new backend target: Spring Cloud style business services.

The code diff shows new template areas under sky/springcloud and sky/WEB-INF/springcloud, plus repeated changes in entity service classes, base service classes, request templates, schema generation, feature graph code, and validation support. This was a move from monolithic generated managers toward service-oriented generated infrastructure.

Business Foundation Templates

The business-foundation templates covered generated service building blocks:

  • base service
  • entity service
  • remote service implementation
  • service adapter
  • base request
  • request DSL output
  • generated POJO imports and members

The generator was extracting common backend behavior into reusable service infrastructure.

Entity Service Layer

The entity service work added generated CRUD and lookup behavior:

  • id and type lookup
  • updater support
  • entity service methods
  • user context resolution
  • criteria parameter preparation
  • enum constants

This stage made generated services more explicit. Instead of all behavior living in manager templates, service templates could expose stable runtime contracts.

Schema and Validation

The Spring Cloud branch also brought table schema generation and validation improvements.

That pairing is important: generated services need generated persistence contracts, and generated persistence contracts need generated validation. Keeping those in the generator reduces mismatch between API, schema, and domain rules.

Why This Stage Mattered

The generator became less tied to a single Java web application shape.

Spring Cloud templates let the same model produce service infrastructure, request objects, remote service contracts, and schema metadata. This set up the later Request DSL and query API work by giving generated backend code a clearer service boundary.