For the complete documentation index, see llms.txt. This page is also available as Markdown.

Module Development

Complete guide to creating, configuring, and publishing BoxLang modules using pure BoxLang or Java

Build extensible plugins for the BoxLang runtime through an isolated, convention-based module system. Choose between pure BoxLang for rapid development or Java + BoxLang for performance-critical integrations.

All examples in this guide reference real, open-source modules from the ortus-boxlang GitHub organization. The modules listed under Modules focus on using existing modules — this section focuses on building them.

Choose Your Approach

No compilation required. Perfect for utilities, configurations, and simple BIFs/components.

Best for: Rapid prototyping, simple logic, no external dependencies

  • ✅ BIFs (.bx files)

  • ✅ Components (.bx files)

  • ✅ Interceptors (via configure())

  • ✅ Custom interception points

  • ✅ Settings & configuration

  • ✅ Public web folders

  • ✅ Libs/JARs

  • ❌ Services (Java only)

  • ❌ Schedulers (Java only)

  • ❌ Cache Providers (Java only)

  • ❌ JDBC Drivers (Java only)

Gradle-based with shadow JAR support. For complex logic and advanced integrations.

Best for: Performance-critical code, external libraries, services, JDBC drivers

  • ✅ Everything from Pure BoxLang

  • ✅ Services (IService)

  • ✅ Schedulers (IScheduler)

  • ✅ Cache Providers (ICacheProvider)

  • ✅ JDBC Drivers (java.sql.Driver)

  • ✅ Advanced Java library integration

  • ✅ ServiceLoader discovery

What Modules Can Provide

BoxLang or Java

  • ✅ BIFs — Custom built-in functions

  • ✅ Components — XML-style tags (bx:mytag)

  • ✅ Interceptors — Event listeners

  • ✅ Settings — Module configuration

  • ✅ Mappings — URL routing & class resolution

  • ✅ Public Folders — Static web assets

  • ✅ Libs — JAR dependencies

Java Only

  • ✅ Services — Global runtime services

  • ✅ Schedulers — Cron-like scheduled tasks

  • ✅ Cache Providers — Custom caching backends

  • ✅ JDBC Drivers — Database connectivity

  • ✅ System Setting Providers — Custom getSystemSetting() sources

  • ✅ Class Resolvers — Custom prefix:ClassName resolution

Quick Navigation

Topic
Description

Choose your approach, use templates, create your first module

Understand module isolation, class loaders, and discovery

Configure box.json, ModuleConfig.bx, and Java IModuleConfig

Registration → Activation → Running → Deactivation

BIFs, components, interceptors, services, and more

Bundle modules inside your module, and ship modules as a single JAR

Module mappings, @moduleName notation, and class loading

Settings, runtime overrides, dependency management

System settings providers, custom resolvers, inter-module communication

Build output, ForgeBox workflow, versioning

TestBox integration, CI/CD patterns

Common issues and solutions

Open Source Module Examples

Learn from production-ready modules in our ecosystem:

Module
Purpose
Complexity

AI integration helpers

🟢 Simple

CSRF token management

🟢 Simple

JWT token handling

🟡 Medium

FTP client operations

🟡 Medium

Image manipulation

🟡 Medium

YAML parsing/generation

🟢 Simple

INI file handling

🟢 Simple

Markdown rendering

🟡 Medium

WDDX serialization

🟢 Simple

Module
Purpose
Complexity

CFML compatibility layer

🔴 Complex

Email sending service

🟡 Medium

Security/encryption

🟡 Medium

Password hashing

🟡 Medium

HTML form generation

🟡 Medium

Groovy language support

🟡 Medium

Module
Database
Type

MySQL/MariaDB

Java

PostgreSQL

Java

Microsoft SQL Server

Java

Oracle Database

Java

SQLite

Java

Apache Derby

Java

HyperSQL

Java

Module
Purpose
Type

Hibernate/JPA ORM

Java

Observability/monitoring (freeware, not open source)

Java

UI compatibility

JavaScript

Module Templates

Start with official templates to bootstrap your module. Both templates are available on GitHub:

Pure BoxLang Template:

Java + BoxLang Template:

The templates include placeholder files and configuration you can customize. See Getting Started for a detailed walkthrough.

Next Steps

  1. Choose Your Approach — Decide between pure BoxLang or Java+BoxLang

  2. Understand the Architecture — Learn about module isolation and discovery

  3. Explore Real Examples — Study production modules like bx-ai and bx-compat-cfml

  4. Start Building — Create your first module with our templates


Need help? Check out the Troubleshooting Guide for common issues and solutions.

Last updated

Was this helpful?