BoxLang 1.00

Mike's Notes

"BoxLang is a modern dynamic JVM language that can be deployed on multiple platforms: all operating systems, web servers, Java application servers, AWS Lambda, ios, Android, Web Assembly, and more.

BoxLang combines many features from different programming languages, including Java, ColdFusion, Python, Ruby, Go, and PHP, to provide developers with a modern, fluent and expressive syntax. BoxLang has been designed to be a highly modular and dynamic language to take advantage of all the modern features of the JVM." - Ortus

BoxLang recently emerged from beta as version 1.0, which looks incredible. Since version 3, Pipi has been built using CFML code. Pipi 9 already uses some Ortus products as part of its stack. I have put complete migration to BoxLang on the roadmap for Pipi 10.

This means other languages can then be used in addition to CFML.

BoxLang is completely open-source on GitHub, and Ortus offers paid support. It requires JDK 21 or later.

Initially, Pipi will use the free open-source community-supported plan for BoxLang.

Once Ajabbi generates enough revenue, it will generously sponsor Ortus on an ongoing basis and purchase paid custom enterprise-level support from Ortus, including the development of extra modules, dedicated platform support, etc.

The team led by Luis Majano at Ortus are superb, and outsourcing makes sense.

Resources

References

  • Reference

Repository

  • Home > Ajabbi Research > Library > ColdFusion
  • Home > pipiWiki > 

Last Updated

04/05/2025

Article

By: Ortus
BoxLang: 03/05/2025

BoxLang is a modern dynamic JVM language that can be deployed on multiple platforms: all operating systems, web servers, Java application servers, AWS lambda, iOS, android, web assembly, and more.

BoxLang combines many features from different programming languages, including Java, ColdFusion, Python, Ruby, Go, and PHP, to provide developers with a modern, fluent and expressive syntax. BoxLang has been designed to be a highly modular and dynamic language to take advantage of all the modern features of the JVM.

Dynamic Language

BoxLang is dynamically typed, meaning you don’t need to declare types if you don’t want to. It can do type inference, auto-casting and promotions between different types. The language adapts itself to its deployed runtime. It can add/remove/modify methods and properties at runtime. Making it highly flexible and adaptable.

  • Dynamically typed just like CFML, but we go further…
  • JDK21+ Minimum
  • JSR-223 compatible
  • No reflection, we use InvokeDynamic for everything
  • Type inference, auto-casting, type promotions
  • Interface and superclass default method promotions
  • Use all new JDK features and types

Multi-Runtime Development

BoxLang has been designed to run on multiple platforms. This allows you to write adaptive code for any Operating System JVM, a servlet container web server, cloud lambda functions, iOS, Android, or even the browser via our web assembly package. BoxLang® builds upon its language core so it can be deployed on almost any running platform, present or future.

Coming Soon:

  • Android
  • IOS
  • WebAssembly
  • Microsoft Azure Functions


Established Ecosystem

Even though BoxLang is a new language, it already has an established ecosystem, since every Java and ColdFusion/CFML library works already with BoxLang. This was our priority when designing BoxLang, that it would automatically be able to integrate and run libraries from the Java and ColdFusion/CFML ecosystems. It ships with CommandBox as it's package manager, server manager, task manager and REPL tool. Almost any project in https://central.sonatype.com and https://www.forgebox.io should work with BoxLang.

Java Interoperability

BoxLang is 100% interoperable with Java. You can extend and implement Java objects, use annotations, declare classes, imports, and more. Thanks to InvokeDynamic and our BoxLang DynamicObject core, everything in BoxLang is interoperable with Java.

If you are a Java Developer you will feel right at home, but with tons of more tools, functional programming and less ceremony.

Example Here

import java:ortus.boxlang.runtime.scopes.Key;
import java:java.util.concurrent.ConcurrentHashMap;

myMap = new ConcurrentHashMap();
result = Key.of( "hello" ).getName();

printLn( result );

Low Verbosity Syntax

BOXLANG is a low-verbosity syntax language. It is highly functional, fluent, and human-readable. Our intent with BOXLANG is to make it highly expressive and low ceremony.

Event Driven Language

BoxLang has an event bus internally that can be used to extend the capabilities of the language or even your own applications. You can listen to almost every part of the language, parser and even the runtime or collaborate with your own events.


  • Interceptors for the language
  • The best way to scale the language
  • Listen to the entire language life-cycle
  • Modules can even collaborate events

Example Here

function onScopeCreation( data f
    // Only listen to server scope
    if( data.scopeName.getName() == "server" ){
        // Add coldfusion struct
        data.scope.put
            Key.coldfusion,
            new ImmutableStruct i
                "InstallKit": ""
                "appserver": "JEE",
                "expiration": "",
                "productlevel" : "Enterprise",
                "productname" : "ColdFusion Server",
                "productversion": "2023,0,06,330617",
                "rootdir": "",
                "updatelevel" : "0"
            })
        );
    }
}

Enterprise Caching

Powers internal caching, with custom providers, object stores, listeners, and stats. Inspired by CacheBox.


IDE + Tools

We provide not only the core language but also several tools to help developers do their job with ease and power. We provide a Visual Studio Code extension for the language to provide syntax highlighting, code debugging, code insight, code documentation, formatting, LSP integration, and much more. Our + subscribers get even more tools like enhanced debuggers, ColdFusion/CFML transformers, and much more.

BoxLang VSCode package:

  • Language Debugger
  • LSP
  • Executable scripts within the IDE
  • Converters: AST, CFML -> BoxLang, Bytecode and more
  • Visual Studio Image

CLI Tools

  • REPL
  • Runners
  • Converters: CFML to BoxLang, BoxLang to Bytecode

Scheduling & Task Framework

BoxLang's Scheduled Tasks Framework provides a centralized and portable way to define and manage scheduled tasks on your servers and applications. Source control your tasking with our scheduling DSL.

  • Inspired by ColdBox Tasks
  • Schedulers are portable, fluent and human
  • Task framework
  • Write them in Java or BoxLang
  • Access to any executor in Java
  • Run schedules as cron jobs, no server needed

Example Here

//* Declare the tasks for this scheduler */

@Override
public void configure() {
    task ("PeriodicalTask" )
	       .call () > System.out.println("++++++>>>>>> Hello from MyModuleTask" ) )
   	    .everySecond)
	       .onFailure( (task, exception) -> System.out.printin("MyModuleTask failed:" + exception.getMessage) ) )
	       .onSuccess( (task, result) -> System.out.printin( "MyModuleTask succeeded:" + result ) );

    task ( "OneOffTask" )
	       .call( ( System.out.printIn("++++++>>>>>> Hello from OneOffTask" ) );

    xtask( "A Disabled Task" )
	       .call( () -> System.out.printin( "Hello from A Disabled Task" ) )
	       .everySecond;
}

Functional Programming

BoxLang goes beyond traditional paradigms. Explore functional concepts like immutability and higher-order functions to write elegant and robust code.

BoxLang fosters code that's easier to maintain and less error-prone thanks to its support for functional programming principles. This translates to a more reliable and cost-effective development process.

Modular Extensibilty

BoxLang has been designed internally to support the concept of BoxLang modules that can enhance every aspect of the language or your applications built with BoxLang. BoxLang is one of the very first languages you can build upon using modules. You can add new built-in functions, templating components, new/modify functions on existing classes, functionality, Runtime Debugger, AOP aspects, or listen to events within the language itself.

Multi Parsers: CFML & BoxLang

BoxLang supports a dual parser and transpiler to execute ColdFusion/CFML code natively (maybe more languages later). This means that you can run all your ColdFusion applications within BoxLang natively. We also provide tooling to automatically transpile your ColdFusion code to BoxLang® as well if you have a + Subscription.

  • Our way to split with the old and bring in the new
  • Transpile CFML into BoxLang
  • BoxLang is a NEW clean slate
  • Future: Groovy to BoxLang

Professional Open Source

BoxLang is a professional open-source project based on the Apache 2 license. Ortus Solutions supports every aspect of the language, and you can get a BoxLang+ subscription to not only professional support but also extended features and modular capabilities.

BoxLang Community (Free & OS)

  • Apache

Two Commercial Subscriptions

  • BoxLang+
  • BoxLang++
  • Custom

Serverless Development

BoxLang empowers serverless development. Write code in functions that trigger based on events, and leave server management to the cloud provider. This means faster development cycles, effortless scaling, and cost-effective applications.

Meta-Programming

Metaprogramming in BoxLang is a powerful technique that allows developers to modify the behavior of BoxLang classes and objects at runtime. It involves manipulating the way classes and objects respond to method calls, property access, and more.

Quick Installer

You can also run this script to install BoxLang in your Windows, Mac or *nix.

Bash/ZSH

        /bin/bash -c "$(curl -fsSL
        https://downloads.ortussolutions.com/ortussolutions/boxlang/install-boxlang.sh)"
      

SH

        /bin/sh -c "$(curl -fsSL
        https://downloads.ortussolutions.com/ortussolutions/boxlang/install-boxlang.sh)"
      

Windows PowerShell

        iex ((New-Object
        System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/ortus-boxlang/boxlang-quick-installer/main/src/install-boxlang.ps1'))
      

Downloads

CommandBox

You can easily start up a server with CommandBox.

server start cfengine=boxlang javaVersion=openjdk21

No comments:

Post a Comment