Skip to content

MetaObjects Documentation

Welcome to the comprehensive documentation for MetaObjects, a sophisticated framework for metadata-driven development that provides unprecedented control over your applications beyond traditional model-driven development techniques.

  • Quick Start


    Get up and running with MetaObjects in minutes with our step-by-step guide

    Getting Started

  • User Guide


    Comprehensive documentation covering all MetaObjects features and modules

    User Guide

  • API Reference


    Complete API documentation for all MetaObjects modules and classes

    API Reference

  • Examples


    Working examples and tutorials for common use cases and integration patterns

    Examples

What is MetaObjects?

MetaObjects is a comprehensive suite of tools designed for metadata-driven development, offering:

Metadata-First Architecture

Define your object structures, validation rules, and relationships through rich metadata definitions rather than scattered annotations or configuration files.

{
  "metadata": {
    "children": [
      {
        "object": {
          "name": "User",
          "type": "pojo",
          "@dbTable": "users",
          "children": [
            {
              "field": {
                "name": "email",
                "type": "string",
                "@required": true,
                "@maxLength": 255,
                "@pattern": "^[\\w._%+-]+@[\\w.-]+\\.[A-Za-z]{2,}$"
              }
            }
          ]
        }
      }
    ]
  }
}

Cross-Language Code Generation

Generate type-safe code for multiple languages from a single metadata definition:

  • Java: POJOs, JPA entities, builders, validators
  • TypeScript: Interfaces, classes, React components
  • C#: Classes, entities, validation attributes
  • SQL: Database schemas, constraints, indexes

:material-spring: Framework Integration

Native support for popular frameworks without forcing dependencies:

<dependency>
    <groupId>com.metaobjects</groupId>
    <artifactId>metaobjects-core-spring</artifactId>
    <version>6.2.5-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>com.metaobjects</groupId>
    <artifactId>metaobjects-core</artifactId>
    <version>6.2.5-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>com.metaobjects</groupId>
    <artifactId>metaobjects-metadata</artifactId>
    <version>6.2.5-SNAPSHOT</version>
</dependency>

Type-Safe Constraints

Comprehensive validation and constraint system that enforces rules at metadata definition time:

  • Naming patterns and identifier validation
  • Required attributes and data type enforcement
  • Uniqueness constraints and relationship validation
  • Custom business rules through extensible constraint providers

Key Features

Performance Optimized

Built on a READ-OPTIMIZED WITH CONTROLLED MUTABILITY pattern analogous to Java's Class/Field reflection system:

  • Load once during application startup (100ms-1s)
  • Read thousands of times with microsecond performance (1-10μs)
  • Thread-safe concurrent access without synchronization overhead
  • Memory efficient with intelligent caching strategies (10-50MB)

Modular Architecture

Independent modules that can be used individually or combined as needed:

Module Purpose Dependencies
metaobjects-metadata Core metadata definitions None
metaobjects-core File loading and parsing metadata
metaobjects-codegen-* Code generation engines metadata, core
metaobjects-*-spring Spring integrations Optional

Extensible Plugin System

Create custom field types, validators, and generators through a clean provider-based registration system:

public class CurrencyField extends PrimitiveField<BigDecimal> {
    public static void registerTypes(MetaDataRegistry registry) {
        registry.registerType(CurrencyField.class, def -> def
            .type("field").subType("currency")
            .inheritsFrom("field", "base")
            .optionalAttribute("precision", "int")
            .optionalAttribute("currencyCode", "string")
        );
    }
}

Architecture Highlights

Memory Model

MetaObjects follows a ClassLoader pattern where metadata is loaded once at startup and remains in memory for the application lifetime, similar to how java.lang.Class objects work.

OSGI Compatible

Full support for OSGi bundle lifecycle with proper cleanup patterns:

  • ServiceLoader discovery for dynamic service registration
  • WeakReference patterns for bundle unloading cleanup
  • Service registry integration for enterprise environments

Concurrent Read Optimization

Designed for high-throughput applications with massive concurrent read access:

  • Immutable after loading - no synchronization needed for reads
  • ConcurrentHashMap for high-frequency lookups
  • Lock-free algorithms in runtime read paths

Getting Started

Ready to experience metadata-driven development? Choose your path:

  • New to MetaObjects?


    Start with our comprehensive getting started guide

    Quick Start Guide

  • :material-spring:{ .lg .middle } Spring Developer?


    Jump into Spring-specific integration patterns

    Spring Integration

  • Code Generation?


    Learn about template-based code generation

    Code Generation

  • Plugin Development?


    Extend MetaObjects with custom types and generators

    Plugin Guide

Community & Support

  • GitHub Repository: metaobjectsdev/metaobjects-core
  • Issue Tracker: Report bugs and request features
  • Discussions: Community support and questions
  • License: Apache License 2.0

MetaObjects is actively developed and maintained with comprehensive modernization completed in 2024-2025, including security hardening, Java 17 LTS migration, and complete code quality modernization.