Guess what?! A new CF engine has emerged from the Shire to join the Adobe ColdFusion and Lucee CF engines. It’s name: BoxLang!
Where did it come from (when we knew nothing until last month)? What does it do? And how will it help CF developers and keep ColdFusion more alive and modern? Time for an adventure to uncover BoxLang’s secrets and its impact on Middleware-earth.
BoxLang offers a new, CFML-compatible JVM language with solutions for all your development needs. It was forged in secrecy by the wizards at Ortus Solutions. For ten months, they toiled in shadows, crafting a powerful tool that would surprise and delight us all. The result is BoxLang — inspired by CFML but is not a direct CFML engine. It supports CFML syntax but allows for innovation and modernization beyond CFML’s constraints. BoxLang was built from scratch to implement modern best practices and break away from legacy constraints.
Now, the time has come to embark on an epic journey into the world of BoxLang, exploring its myriad features, capabilities, and the revolutionary changes it brings to the CF landscape.
What is BoxLang?
BoxLang is a dynamic language forged in the fires of Mount Doom, blending features from various programming languages like Java, ColdFusion, Python, Ruby, Go, and PHP, creating a modern syntax that is both fluent and expressive. Built to leverage the full capabilities of the JVM, BoxLang is a highly modular language that adapts to different runtime environments, providing developers with flexibility and power.
We were fortunate enough to have BoxLang’s powerful wizards, Luis Majano and Brad Wood of Ortus Solutions, join us on the CF Alive Podcast to showcase all the new wonders they’ve conjured.
“We spent months just thinking about what a new language would look like in 2024. From day one, our focus was to make it as lightweight and extensible as possible,” Majano said during the episode. “We wanted to design something for 2024 and beyond, not just replicate what CFML engines have done in the past.”
You can watch the full episode below:
It does, however, look an awful lot like someone had cast a “bx box” spell on CFscript. Take a look yourselves:
<bx:script> s = new Sample(); writeOutput( s.hello() ); </bx:script>
Your Journey to ColdFusion Mastery Begins Here. Get in Touch!
Key Features of BoxLang
So… what’s all the fuss about? Like Groovy and Scala, BoxLang compiles to Java bytecode and runs on the Java Virtual Machine (JVM), enabling full interoperability with Java. (It is built using modern JVM features such as InvokeDynamic, improving performance and enabling advanced dynamic language capabilities.)
“Java has come so far. We wanted to stay modern and use everything Java offers today, not be held back by old practices,” Brad wood said during the podcast episode.
It’s also faster than Shadowfax! BoxLang’s core runtime is only ~7 MB, making it far smaller than Adobe ColdFusion (~169 MB) or Lucee (~70-80 MB). Weekly beta releases means quick fixes and new features will roll out faster than a Hobbit headed to second breakfast.
“We designed the language to be hardware-first, and that’s why the language core for BoxLang is around seven megabytes in size—extremely tiny, extremely lightweight,” Majano said in the CF Alive podcast.
Its modular architecture allows developers to extend functionality with over 30 modules, including runtimes for web servers, serverless platforms (AWS Lambda), Android, and future platforms like iOS and WebAssembly.
“People have been asking for features for 15 years in ColdFusion. We couldn’t wait any longer, so we built them ourselves,” Wood said in the podcast.
Is Your ColdFusion Setup the One to Rule Them All?
Whether you've made the jump to BoxLang or not, your legacy ColdFusion app might harbor untapped potential—or hidden vulnerabilities. Are you prepared to wield it wisely? Our free assessment is your ‘Palantír,’ offering a clear vision of your current environment. We’ll help you uncover strengths to build upon and weaknesses that need fortifying, much like reforging the shards of Narsil into Andúril. Don’t let unseen issues be your undoing, like the hidden passage to Mordor. Request your Free ColdFusion Modernization and Maintenance Assessment today, and let’s forge a stronger future together.
BoxLang offers some worthwhile improvements to the development experience, as magical as Gandalf’s staff (we’ll take a deep dive into each later on).
- Dynamic Typing
- Multi-Runtime Development
- Established Ecosystem
- Java Interoperability
- Low Verbosity Syntax
- Event-Driven Architecture
- Enterprise Caching
- Powerful IDE Tools
- Functional Programming
- Modular Extensibility
Licensing and Support
BoxLang is a professional open-source project supported by the wise and mighty Ortus Solutions. The community version is free and open-source—a key to forming a worthwhile fellowship of developers, ready to take on any coding adventure. For those seeking even greater power, BoxLang+ offers commercial support and extended features. Ortus Solutions also provides professional support, ensuring that developers have the resources and guidance they need to triumph in their quests.
BoxLang Containers Licensing
BoxLang allows you to deploy an unlimited number of containers for free. If you need support for container deployments, BoxLang+ offers licensing on a per-orchestrator-node basis, providing flexibility regardless of the number of containers you deploy on each node. Development nodes are always free, and non-production nodes are available at a reduced price, ensuring cost-effective scalability.
Detailed Features and Capabilities
Who better to delve into the magic of BoxLang than Ortus’s own Brad Wood, who gave the new platform an overview, highlighting key features and tools at CF Camp 2024 in Berlin?
Dynamic Language
BoxLang’s dynamic typing system eliminates the need for explicit type declarations. The language supports type inference, auto-casting, and promotions between different types, making it highly flexible and adaptable. Additionally, BoxLang uses InvokeDynamic for method invocations, ensuring high performance without the need for reflection.
Multi-Runtime Development
BoxLang’s multi-runtime capability allows you to write adaptive code for any environment. Whether you’re targeting a native OS binary, a servlet container, a cloud lambda function, iOS, Android, or a web assembly, BoxLang adapts to the runtime, providing seamless deployment across various platforms.
Established Ecosystem
One of BoxLang’s key strengths is its compatibility with Java and ColdFusion/CFML libraries. This extensive ecosystem means that developers can leverage existing libraries and tools, significantly reducing the learning curve and enhancing productivity. BoxLang’s integration with CommandBox as its package manager, server manager, and task manager ensures that almost any project from central repositories works seamlessly with BoxLang.
Java Interoperability
BoxLang’s full interoperability with Java allows developers to extend and implement Java objects, use annotations, and declare classes and imports. This makes it an ideal choice for Java developers looking for additional tools and functionalities without leaving the Java ecosystem.
Low Verbosity Syntax
BoxLang’s syntax is designed to be low-verbosity, making it highly readable and expressive. This reduces boilerplate code and enhances productivity, allowing developers to focus on writing clean and efficient code.
Event-Driven Architecture
BoxLang features an internal event bus that enables developers to extend the language’s capabilities or their applications. You can listen to almost every part of the language, parser, and runtime, making BoxLang highly extensible and customizable.
Enterprise Caching
Inspired by CacheBox, BoxLang includes an enterprise-level caching engine with custom providers, object stores, listeners, and stats. This robust caching solution ensures that your applications perform efficiently and reliably.
IDE Tools
BoxLang offers extensive tools to enhance the development experience. A Visual Studio Code extension provides syntax highlighting, code debugging, code insight, documentation, formatting, LSP integration, and more. For BoxLang+ subscribers, additional tools like enhanced debuggers and ColdFusion/CFML transformers are available, making development more efficient and enjoyable.
Functional Programming
BoxLang supports functional programming principles, including immutability and higher-order functions. This enables developers to write elegant and robust code that is easier to maintain and less error-prone, translating to a more reliable and cost-effective development process.
Modular Extensibility
BoxLang is designed to support modules that can enhance every aspect of the language or your applications. You can add new built-in functions, templating components, modify existing classes, and much more. This modular architecture ensures that BoxLang is one of the most extensible languages available.
Real-World Applications
Serverless Development
BoxLang empowers serverless development, allowing you to write code in functions that trigger based on events, leaving server management to the cloud provider. This results in faster development cycles, effortless scaling, and cost-effective applications.
Meta-Programming
BoxLang supports meta-programming, allowing developers to modify the behavior of BoxLang classes and objects at runtime. This involves manipulating the way classes and objects respond to method calls, property access, and more, providing powerful capabilities for dynamic and flexible code.
Other features
The wizards at Ortus didn’t settle for just the changes listed above. For the true CF wizards out there, new features include:
- A robust VS Code extension includes syntax highlighting, linting, debugging, and live introspection capabilities.
- Built-in debugger supports step-by-step execution across runtimes.
- Transpilation tools allow ColdFusion code to run on BoxLang and convert CFML syntax into BoxLang syntax.
- Fixes for longstanding quirks of CFML by introducing logical improvements like renaming functions (e.g., serializeJSON becomes JSONSerialize).
- It incorporates features like real annotations, functional programming constructs, and direct Java class imports.
- An Abstract Syntax Tree (or AST) enables advanced tooling such as code quality checks, linting, and extensibility. Developers can build custom tools leveraging the AST, such as static analyzers or code quality metrics.
Community and Support
BoxLang is a professional open-source project supported by Ortus Solutions. The community version is free and open source — a key to forming a worthwhile fellowship of developers. BoxLang+ offers commercial support and extended features. Ortus Solutions also provides professional support, ensuring that developers have the resources and assistance they need to succeed.
Join the CF Council of Elrond and Gain Insights from the Wise
Imagine sitting among CF legends like Elrond, Gandalf, and Galadriel, absorbing their wisdom. The CF Alive Podcast brings you the CF Equivalent: interviews and discussions with the foremost experts across the ColdFusion realm. Including BoxLang’s creators, Luis Majano and Brad Wood. These podcasts are your ‘CF Council of Elrond,’ where strategies are forged, and insights are shared to help you navigate your epic CF modernization journey. Stay ahead of emerging trends, learn from the triumphs and mistakes of others, and become part of a community as tight-knit as the Fellowship itself. Don’t miss out—check out the CF Alive Podcast now and let the adventure unfold.
Join the BoxLang Community
Much like the alliances formed in the great tales of old, BoxLang encourages community contributions and offers several support channels, including forums, Slack, and GitHub. Developers can report bugs, contribute to the project, and participate in discussions to help improve and extend BoxLang. Together, we can forge a brighter future for all.
Welcome, BoxLang!
For those worried about a bumpy transition, relax. BoxLang supports existing CFML code with an optional transpilation process to convert CFML to BoxLang syntax. ColdFusion code can also run directly in BoxLang without modification and is backward combatible with Legacy CFML.
BoxLang is more than just a programming language; it’s a quest toward a more dynamic, modular, and productive future. By combining the best features of multiple programming languages and leveraging the full capabilities of the JVM, BoxLang offers developers a powerful and flexible tool for modern CFML development. It's a tool to rule them all, in the land of code where the shadows lie.
So, gird your loins, fellow developers, and set forth on this grand adventure. Explore BoxLang’s features, documentation, and community, and start building the future with this innovative language. Let us know how it has changed your life as a CFer! And remember, even the smallest hobbit can change the course of the future.
And to continue learning how to make your ColdFusion apps more modern and alive, I encourage you to download our free ColdFusion Alive Best Practices Checklist.
Because… perhaps you are responsible for a mission-critical or revenue-generating CF application that you don’t trust 100%, where implementing new features is a painful ad-hoc process with slow turnaround even for simple requests.
What if you have no contingency plan for a sudden developer departure or a server outage? Perhaps every time a new freelancer works on your site, something breaks. Or your application availability, security, and reliability are poor.
And if you are depending on ColdFusion for your job, then you can’t afford to let your CF development methods die on the vine.
You’re making a high-stakes bet that everything is going to be OK using the same old app creation ways in that one language — forever.
All it would take is for your fellow CF developer to quit or for your CIO to decide to leave the (falsely) perceived sinking ship of CFML and you could lose everything—your project, your hard-won CF skills, and possibly even your job.
Luckily, there are a number of simple, logical steps you can take now to protect yourself from these obvious risks.
No Brainer ColdFusion Best Practices to Ensure You Thrive No Matter What Happens Next
ColdFusion Alive Best Practices Checklist
Modern ColdFusion development best practices that reduce stress, inefficiency, project lifecycle costs while simultaneously increasing project velocity and innovation.
√ Easily create a consistent server architecture across development, testing, and production
√ A modern test environment to prevent bugs from spreading
√ Automated continuous integration tools that work well with CF
√ A portable development environment baked into your codebase… for free!
Learn about these and many more strategies in our free ColdFusion Alive Best Practices Checklist.