Guess what?! A new CF engine has emerged from the Shire to join Adobe and Lucee's 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. The CF wizards at Ortus Solutions forged it in secrecy. For ten months, they toiled in the shadows, crafting a powerful tool that would surprise and delight us all.
Contents
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 flexibility and power to developers.
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>
Still, in the realm of Middleware-earth, where ColdFusion reigns supreme, BoxLang emerges as a worthy ally. Much like the Fellowship’s quest, BoxLang is here to help you modernize, maintain, and elevate your ColdFusion applications or even migrate from other development platforms.
Key Features of BoxLang
So… what’s all the fuss about? 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?
BoxLang: Getting Started and usage overview by Brad Wood at CFCamp 2024
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.
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 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!
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.
Michaela Light is the host of the CF Alive Podcast and has interviewed more than 100 ColdFusion experts. In each interview, she asks "What Would It Take to make CF more alive this year?" The answers still inspire her to continue to write and interview new speakers.
Michaela has been programming in ColdFusion for more than 20 years. She founded TeraTech in 1989. The company specializes in ColdFusion application development, security and optimization. She has also founded the CFUnited Conference and runs the annual State of the CF Union Survey.
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.