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.
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
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 Templates
Start with official templates to bootstrap your module. Both templates are available on GitHub:
Pure BoxLang Template:
Java + BoxLang Template:
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
Last updated
Was this helpful?
