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)

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

Getting Started

Choose your approach, use templates, create your first module

Architecture

Understand module isolation, class loaders, and discovery

Module Descriptor

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

Lifecycle

Registration β†’ Activation β†’ Running β†’ Deactivation

Capabilities

BIFs, components, interceptors, services, and more

Module mappings, @moduleName notation, and class loading

Configuration

Settings, runtime overrides, dependency management

Advanced Collaboration

System settings providers, custom resolvers, inter-module communication

Packaging & Publishing

Build output, ForgeBox workflow, versioning

Testing

TestBox integration, CI/CD patterns

Troubleshooting

Common issues and solutions

Open Source Module Examples

Learn from production-ready modules in our ecosystem:

Module
Purpose
Complexity

bx-ai

AI integration helpers

🟒 Simple

bx-csrf

CSRF token management

🟒 Simple

bx-jwt

JWT token handling

🟑 Medium

bx-ftp

FTP client operations

🟑 Medium

bx-image

Image manipulation

🟑 Medium

bx-yaml

YAML parsing/generation

🟒 Simple

bx-ini

INI file handling

🟒 Simple

bx-markdown

Markdown rendering

🟑 Medium

bx-wddx

WDDX serialization

🟒 Simple

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?