Axoniq Conference 2025 Day 2: First-Ever Event Sourcing on Low-Code Platform (Mendix Live Demo)

Jakob Hützel demonstrates the first-ever integration of Axon Framework with Mendix low-code platform. Watch a live coding demo implementing bike rental return functionality, and learn how event modeling enables 1.5 days per slice development pace.

🎯 Speaker:

Jakob Hützel - Software Developer, Asasis (Swiss med-tech PLM solutions)

💡 The Innovation:

First-Ever: Event sourcing with low-code platform + Axon Framework integration

The Stack:

  • Mendix (low-code platform - Dutch company)

  • Axon Framework & Server

  • Custom integration module (2-3 days to build!)

  • ByteBuddy for dynamic annotations

  • JSON serialization via Mendix mappings

🔑 Integration Architecture:

  • Message Payloads → Non-Persistent Entities

  • Commands, Events, Queries = Mendix non-persistent entities

  • No DB persistence needed (Axon handles event storage)

Message Handlers → Microflows

  • Command handlers = CH_BikeAggregate_ReturnBikeCommand

  • Event sourcing handlers = ESH_BikeAggregate_OnBikeReturned

  • Naming convention for auto-discovery

Magic Sauce:
  • Message handling adapter scans microflows at startup

  • ByteBuddy dynamically creates @CommandHandler annotated classes

  • Hooks into standard Axon Framework configuration

  • No messy hacks required!

🎯 Real-World Project:

  • Domain: Regulatory information system for medical device manufacturers

  • Challenge: Help "Medical Hammer Inc." navigate laws across countries

  • Team: 2 developers

  • Results: 84 slices in 120 working days = 1.5 days per slice!

📊 Mendix Concepts:

  • Modules: Reusable, shareable components

  • Entities: Persistent, Non-persistent, View

  • Microflows: Flowchart-style business logic

  • Nanoflows: Front-end presentation logic

  • Pages: WYSIWYG editor with auto data binding

  • Studio Pro: Dark mode included! ✅

🚀 Benefits:

  • ✅ Event model shines through in low-code representation

  • ✅ Vertical slice encapsulation (folders per slice)

  • ✅ Stable development pace as app complexity grows

  • ✅ Minimal merge conflicts (one slice = one folder)

  • ✅ Team scalability without coordination overhead

  • ✅ Read models = Persistent entities (1:1 mapping)

  • ✅ Commands/Events = Non-persistent (perfect fit!)

🎬 Live Demo Highlights:

Implemented complete "Return Bike" slice in ~30 minutes:

  • Created ReturnBikeCommand entity with location & rental reference

  • Configured JSON import/export mappings

  • Built command handler microflow (check if bike in use)

  • Built event sourcing handler (update aggregate state)

  • Created UI button with nanoflow

  • Extracted snippet for encapsulation

  • Tested live with Axon Server running

💬 Best Quote:

"If you get your requirements right using event modeling, it doesn't matter which tech stack you choose for the remaining 20% implementation effort. Requirements, requirements, requirements!"

🏗️ Technical Details:

Serialization:
  • Mendix export/import mappings (JSON)

  • Wrapped in Axon Serializer interface

  • Manual but straightforward

Custom Actions (Java):
  • sendCommand(CommandGateway)

  • applyEvent(EventStore)

  • Used sparingly to keep low-code benefits

Role-Based Access:
  • Entity-level RBAC built into Mendix

  • Rental agent can create/modify commands