docbox docbox
  • About Mateu
  • Java
  • Kotlin
  • C#
  • Python
  • Design systems
  • Native
  • AI
GitHub repo
to navigate to select ESC to close
  • Create your project

    • Prerequisites
    • Springboot MVC
    • Springboot Webflux
    • Micronaut
    • Quarkus
    • Helidon MP
  • Components

    • Overview
    • Layouts
    • Forms
    • Grids
    • Actions
    • The component tree
    • Supported components
    • Client-side logic
  • Java

    • Getting started
    • Your first Mateu app with Spring Boot
    • Build a real CRUD with relationships
    • Apps and pages
    • Compose a shell with multiple services
    • Declarative vs fluent
    • State, actions and fields
    • Field stereotypes
    • Routing and parameters
    • Examples
    • Foreign keys and options
    • Best practices
    • Triggers and events
    • Microservices example
    • Validation
    • Advanced
    • Rules
    • A real CRUD example
    • Action behavior
    • Navigation and menus
    • Layout and composition
    • UI effects (messages and commands)
    • End-to-end example
  • Java
  • Java
  • Declarative vs fluent

On This Page
  1. Declarative vs fluent
    1. Declarative
      1. Best for
    2. Fluent
      1. Best for
    3. Recommendation

Declarative vs fluent

Mateu supports two main ways of building UIs in Java.

Declarative

In the declarative style, you describe the UI with:

  • classes
  • fields
  • methods
  • annotations

Best for

  • forms
  • CRUD screens
  • fast development
  • simple UIs

Fluent

In the fluent style, you build the UI with Mateu’s Java API.

Best for

  • custom layouts
  • advanced composition
  • fine-grained control

Recommendation

Start with the declarative style.

Use the fluent style when you need more control.

Table of Contents

  1. Declarative vs fluent
    1. Declarative
      1. Best for
    2. Fluent
      1. Best for
    3. Recommendation