Comprehensive Feature Set

Enterprise-grade capabilities that make MetaObjects the complete solution for metadata-driven development

🌐 Universal Metadata Architecture

Define Once, Deploy Everywhere

Create a single metadata definition that automatically generates consistent implementations across all programming languages in your stack.

  • Support for Java, C#, TypeScript, Python, Rust
  • Automatic code generation
  • Perfect consistency guaranteed
  • No manual synchronization needed

⚙️ Intelligent Code Generation

From Metadata to Production Code

Advanced code generators create production-ready implementations with validation, serialization, and documentation.

  • Maven plugin integration
  • Multiple generator types (Java, TypeScript, API docs)
  • Customizable templates
  • Validation and business logic included

✅ Cross-Language Validation

Consistent Validation Everywhere

Define validation rules once and have them enforced consistently across all services and languages.

  • Field-level validation
  • Object-level validation
  • Custom validation rules
  • Same rules in frontend and backend

🔄 Metadata Overlay System

Extend Without Modifying

Layer additional metadata for specific contexts without changing base definitions.

  • Database-specific attributes
  • UI presentation layers
  • Environment-specific configs
  • Clean separation of concerns

🚀 Dynamic Object Manipulation

Runtime Flexibility Without Code Changes

Manipulate objects at runtime using metadata, enabling dynamic field access and modification without recompilation.

  • Runtime field access and modification
  • Dynamic object creation
  • Metadata-driven processing
  • No recompilation required

📄 Automatic Serialization

Built-in JSON/XML Handling

Automatic serialization and deserialization support generated from metadata definitions.

  • JSON serialization/deserialization
  • XML marshalling/unmarshalling
  • Protocol Buffer support
  • Custom format extensibility

🏗️ DAO, UI & Schema Generation

Generate Complete Application Layers

Generate Data Access Objects, UI components, and database schemas directly from metadata definitions.

  • JPA/Hibernate DAO generation
  • React/Angular component generation
  • Database schema scripts
  • API documentation

🔗 API Generation

Generate REST APIs from Metadata

Automatically generate REST APIs, OpenAPI specifications, and client SDKs from metadata definitions.

  • REST endpoint generation
  • OpenAPI/Swagger specifications
  • Client SDK generation
  • GraphQL schema support

Code Examples

See how MetaObjects works in practice

Metadata Definition

{
  "metadata": {
    "package": "com.example",
    "children": [
      {
        "object": {
          "name": "Product",
          "type": "pojo",
          "children": [
            {"field": {"name": "id", "type": "long"}},
            {"field": {"name": "name", "type": "string"}},
            {"field": {"name": "price", "type": "double"}},
            {"field": {"name": "inStock", "type": "boolean"}}
          ]
        }
      }
    ]
  }
}

Generated Java Code

package com.example;

import org.draagon.metaobjects.*;
import javax.validation.constraints.*;

public class Product implements MetaDataAware {
    private final MetaObject metaObject;
    private Long id;
    private String name;
    private Double price;
    private Boolean inStock;
    
    // Constructor requires MetaObject
    public Product(MetaObject metaObject) {
        this.metaObject = metaObject;
    }
    
    // Static MetaObject reference (loaded once)
    private static MetaObject PRODUCT_META;
    
    // Factory method
    public static Product newInstance() {
        if (PRODUCT_META == null) {
            // Initialize once - in real apps this comes from DI/Spring context
            PRODUCT_META = MetaDataRegistry.getInstance().getMetaObject("Product");
        }
        return (Product) PRODUCT_META.newInstance();
    }
    
    // Getters and Setters
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    
    public Double getPrice() { return price; }
    public void setPrice(Double price) { this.price = price; }
    
    public Boolean getInStock() { return inStock; }
    public void setInStock(Boolean inStock) { this.inStock = inStock; }
    
    public MetaObject getMetaObject() { return metaObject; }
}

// Usage with factory method
Product product = Product.newInstance();
product.setName("Widget");
product.setPrice(29.99);

// Access MetaObject through MetaDataAware interface
MetaDataAware aware = (MetaDataAware) product;
MetaObject meta = aware.getMetaObject();
System.out.println("Object type: " + meta.getName());

Generated TypeScript Code

import { MetaObject, MetaDataLoader, MetaDataAware } from '@draagon/metaobjects';

export interface Product {
  id: number;
  name: string;
  price: number;
  inStock: boolean;
}

export class ProductImpl implements Product, MetaDataAware {
  private readonly metaObject: MetaObject;
  id: number;
  name: string;
  price: number;
  inStock: boolean;
  
  constructor(metaObject: MetaObject) {
    this.metaObject = metaObject;
  }
  
  // Static MetaObject reference (loaded once)
  private static productMeta: MetaObject;
  
  // Factory method
  static newInstance(): ProductImpl {
    if (!ProductImpl.productMeta) {
      // Initialize once - in real apps this comes from DI context
      ProductImpl.productMeta = MetaDataRegistry.getInstance().getMetaObject('Product');
    }
    return ProductImpl.productMeta.newInstance() as ProductImpl;
  }
  
  setName(name: string): void { this.name = name; }
  setPrice(price: number): void { this.price = price; }
  
  getMetaObject(): MetaObject { return this.metaObject; }
}

export const ProductValidator = {
  validate(product: Product): ValidationResult {
    // Auto-generated validation logic
  }
};

// Usage with factory method
const product = ProductImpl.newInstance();
product.setName("Widget");
product.setPrice(29.99);

// Access MetaObject through MetaDataAware interface
const aware: MetaDataAware = product;
const meta = aware.getMetaObject();
console.log(`Object type: ${meta.getName()}`);

Generated C# Code

using System.ComponentModel.DataAnnotations;
using MetaObjects;

namespace Com.Example
{
    public class Product : IMetaDataAware
    {
        private readonly MetaObject metaObject;
        
        public long? Id { get; set; }
        public string Name { get; set; }
        public double? Price { get; set; }
        public bool? InStock { get; set; }
        
        // Constructor requires MetaObject
        public Product(MetaObject metaObject) 
        {
            this.metaObject = metaObject;
        }
        
        // Static MetaObject reference (loaded once)
        private static MetaObject ProductMeta;
        
        // Factory method
        public static Product NewInstance() 
        {
            if (ProductMeta == null) 
            {
                // Initialize once - in real apps this comes from DI container
                ProductMeta = MetaDataRegistry.Instance.GetMetaObject("Product");
            }
            return (Product)ProductMeta.NewInstance();
        }
        
        // Fluent setters
        public Product SetName(string name) 
        { 
            Name = name; 
            return this; 
        }
        
        public Product SetPrice(double price) 
        { 
            Price = price; 
            return this; 
        }
        
        public MetaObject GetMetaObject() { return metaObject; }
    }
}

// Usage with factory method
var product = Product.NewInstance()
    .SetName("Widget")
    .SetPrice(29.99);

// Access MetaObject through IMetaDataAware interface
IMetaDataAware aware = product;
MetaObject meta = aware.GetMetaObject();
Console.WriteLine($"Object type: {meta.GetName()}");

Manipulation through MetaData

// Load metadata with proper configuration
FileMetaDataLoader loader = new FileMetaDataLoader(
    new FileLoaderOptions()
        .addParser("*.json", JsonMetaDataParser.class)
        .addSources(new LocalFileMetaDataSources(
            Arrays.asList(
                "com/draagon/meta/loader/xml/metaobjects.types.json",
                "metadata/ecommerce/product.metadata.json"
            )
        )),
    "ecommerce-example"
).init();

MetaObject productMeta = loader.getMetaObject("Product");

// Create instance without generated classes
Object product = productMeta.newInstance();
productMeta.setFieldValue(product, "name", "Widget");
productMeta.setFieldValue(product, "price", 29.99);
productMeta.setFieldValue(product, "inStock", true);

// Validate using metadata
ValidationResult result = productMeta.performValidation(product);

// Access any field dynamically
String name = (String) productMeta.getFieldValue(product, "name");
Double price = (Double) productMeta.getFieldValue(product, "price");

Dynamic Field Extension

// product.overlay.json - Add new fields without code changes
{
  "metadata": {
    "package": "com.example",
    "children": [{
      "object": {
        "name": "Product",
        "overlay": true,
        "children": [
          {"field": {"name": "description", "type": "string"}}
        ]
      }
    }]
  }
}

Using Extended Fields

Note: This functionality requires generated objects to extend from ValueObject rather than being standard POJOs. The ValueObject base class provides the metadata manipulation capabilities shown below.

// Load base metadata + overlay with proper configuration
FileMetaDataLoader loader = new FileMetaDataLoader(
    new FileLoaderOptions()
        .addParser("*.json", JsonMetaDataParser.class)
        .addSources(new LocalFileMetaDataSources(
            Arrays.asList(
                "com/draagon/meta/loader/xml/metaobjects.types.json",
                "metadata/ecommerce/product.metadata.json",
                "metadata/ecommerce/product.overlay.json"
            )
        )),
    "ecommerce-with-overlay"
).init();

MetaObject productMeta = loader.getMetaObject("Product");

// Create Product using MetaObject and cast to generated class
Product product = (Product) productMeta.newInstance();

// Use generated setters for standard fields
product.setName("Advanced Widget");
product.setPrice(49.99);

// Use metadata manipulation for dynamic overlay fields
productMeta.setFieldValue(product, "description", 
    "High-quality widget with advanced features");

// Access the new field through metadata
String desc = (String) productMeta.getFieldValue(product, "description");
System.out.println("Description: " + desc);

// Validate with new field constraints
ValidationResult result = productMeta.performValidation(product);

Working with MetaDataAware Interface

// Generic method that works with any MetaDataAware object
public void processMetaDataAware(MetaDataAware obj) {
    MetaObject meta = obj.getMetaObject();
    System.out.println("Processing object of type: " + meta.getName());
    
    // Access fields generically
    for (MetaField field : meta.getMetaFields()) {
        Object value = meta.getFieldValue(obj, field.getName());
        System.out.println("  " + field.getName() + " = " + value);
    }
    
    // Perform validation
    ValidationResult result = meta.performValidation(obj);
    if (!result.isValid()) {
        System.out.println("  Validation errors: " + result.getErrors());
    }
}

// Usage with multiple different objects
Product product = Product.newInstance();
User user = User.newInstance();  // Another generated class
Order order = Order.newInstance(); // Yet another generated class

// All can be processed generically through MetaDataAware
processMetaDataAware(product);
processMetaDataAware(user);
processMetaDataAware(order);

// Or in collections
List<MetaDataAware> objects = Arrays.asList(product, user, order);
objects.forEach(this::processMetaDataAware);

Technical Capabilities

Built for enterprise performance and developer productivity

Performance Features

  • Intelligent caching
  • Lazy loading
  • Minimal memory footprint
  • Optimized serialization

Developer Experience

  • Clear error messages
  • Comprehensive logging
  • IDE integration
  • Debugging support

Integration Options

  • REST API generation
  • GraphQL schema support
  • Message queue integration
  • Database abstraction

Maven Integration

  • Full lifecycle integration
  • Build-time code generation
  • Custom generator support
  • Multi-module projects

Technical Architecture

Deep dive into the platform architecture and technical specifications

Core Components

MetaData Registry
Generation Engine
Runtime Validation
Java Code
TypeScript

Performance Benchmarks

Metadata Lookup (Cached) 0.001ms
Field Validation 0.002ms
Object Instantiation 0.1ms
Code Generation 15ms

Production measurements: 8-core Intel Xeon, 32GB RAM

System Requirements

Minimum Production

  • Java 11+, Node.js 16+
  • 2GB RAM (8GB recommended)
  • 2 CPU cores (4+ recommended)
  • PostgreSQL 12+ or MySQL 8+

Enterprise Scale

  • Horizontal scaling support
  • Redis cache clustering
  • Multi-tier caching strategy
  • Event-driven propagation

Supported Technologies

Languages & Frameworks

Java/Spring Boot TypeScript/React Python/Django C#/.NET Core

Validation Libraries

Bean Validation Zod Pydantic Joi

Build Integration

Maven Gradle npm Docker

Enterprise Features

  • High Availability: Active-passive clustering with automatic failover
  • Security: RBAC, audit logging, encryption at rest and in transit
  • Monitoring: JMX metrics, Prometheus integration, custom dashboards
  • Backup & Recovery: Point-in-time recovery, metadata versioning
  • Deployment: Kubernetes ready, Helm charts, CI/CD integration
View Full Technical Architecture →

AI Integration Ready

Designed for the AI-driven development era:

  • AI Context: Metadata provides perfect context for AI code generation
  • Consistency Engine: Prevents AI drift across services and languages
  • Structured Output: AI generates metadata, not inconsistent code
  • Enterprise Scale: Architecture designed for unlimited service and language scaling

🤖 Ready for AI-optimized development workflows

Use Case Scenarios

Perfect for modern enterprise architecture challenges

Microservices Architecture

Perfect for maintaining consistency across distributed services. Define your data models once and ensure every microservice uses the same structures and validation rules.

Legacy Modernization

Wrap legacy systems with metadata layer for gradual migration. Incrementally modernize your architecture while maintaining compatibility.

Multi-Team Development

Keep teams synchronized without constant coordination. When one team updates a data model, all dependent services automatically stay in sync.

Rapid Prototyping

Quickly iterate on data models and business logic. Change your metadata definition and see the effects across your entire stack instantly.

Enterprise Integration

Connect disparate systems with consistent data models. Create integration layers that automatically adapt to changes in your core business objects.

API Development

Generate consistent DTOs and validation across services. Ensure your REST APIs, GraphQL schemas, and client SDKs all stay perfectly aligned.

Traditional vs MetaObjects

See the difference metadata-driven development makes

Challenge Traditional Approach MetaObjects Solution
Schema changes Rebuild & redeploy all services Runtime adaptation
Cross-language consistency Manual synchronization Automatic generation
Validation rules Duplicated across services Single definition
Documentation Manually maintained Auto-generated
Integration testing Complex setup Metadata-driven

Upcoming Open Source Features

Expanding language support and capabilities for the open source community

🔷

C# MetaObjects SDK

Full .NET support with NuGet packages, bringing metadata-driven development to the Microsoft ecosystem.

  • Native .NET integration
  • NuGet package distribution
  • C# code generation
  • Entity Framework compatibility
📦

TypeScript MetaObjects SDK

Native TypeScript support with npm packages for modern web and Node.js development.

  • TypeScript-first design
  • npm package distribution
  • React/Angular integration
  • Type-safe API generation
🏢

Enterprise Features

Advanced capabilities like Runtime System Adaptation and Enterprise Governance are available in the Enterprise Edition.

  • Zero-downtime system changes
  • Advanced governance workflows
  • Enterprise security & compliance
  • Professional support
Learn More

Ready to Experience MetaObjects?

Start building with metadata-driven architecture today