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 (
.bxfiles)β Components (
.bxfiles)β 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:ClassNameresolution
Quick Navigation
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
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:
Browse all 40+ open-source modules at github.com/ortus-boxlang
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
Choose Your Approach β Decide between pure BoxLang or Java+BoxLang
Understand the Architecture β Learn about module isolation and discovery
Explore Real Examples β Study production modules like bx-ai and bx-compat-cfml
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?
