Blog

BoxLang 1.0.0 Beta 23 Launched

Luis Majano November 23, 2024

Spread the word

Luis Majano

November 23, 2024

Spread the word


Share your thoughts

The latest release of BoxLang, Beta 23, marks a significant step forward in our journey to create the ultimate dynamic language for the JVM. Packed with powerful new features, important bug fixes, and thoughtful optimizations, this update is designed to make your development experience smoother, faster, and more reliable, especially after now starting to take 100s of comments and bug reports from our community.

Modularity takes center stage in this release with the ability to define BoxLang components (aka Tags) within modules and a new version-checking mechanism that ensures module compatibility. Database interactions are now more intuitive with enhancements to the Generic JDBC Driver, and the introduction of the getSemver() function brings a robust tool for managing semantic versioning with precision and ease.

Debugging and performance have also seen major improvements. The dump function now outputs directly to the console in scripting contexts, simplifying debugging workflows, while significant optimizations in functions like len() and the DateTimeCaster improve execution speed and efficiency. We've also addressed critical issues around argument handling, JDBC URL creation, and logging performance, ensuring a more stable and predictable environment for your applications.

Please continue to test your applications as we continue to push forwards towards stable release this winter.

What is BoxLang?

BoxLang is a modern dynamic JVM language that can be deployed on multiple runtimes: operating system (Windows/Mac/*nix/Embedded), web server, lambda, iOS, android, web assembly, and more. BoxLang combines many features from different programming languages, including Java, CFML, Python, Ruby, Go, and PHP, to provide developers with a modern and expressive syntax.

It is also a drop-in replacement for Adobe ColdFusion and Lucee Engines.

How to get started?

Visit our docs at https://boxlang.ortusbooks.com and get coding today. If you want to try it out on the web then go to our online REPL at https://try.boxlang.io. You can also checkout our YouTube playlist: https://www.youtube.com/playlist?list=PLNE-ZbNnndB-40LvAbeSeT2Oi3V2gm_B8

Release Notes

Here are the latest release notes: https://boxlang.ortusbooks.com/readme/release-history/1.0.0-beta23

🚀 New Features

  1. Component in BX for Modules (BL-750)
    Modules in BoxLang just got a serious upgrade! You can now build components for BoxLang using BoxLang. No more Java ma!
/**
 * This is a BoxLang only Component
 *
 * Annotations you can use on a component:
 * <pre>
 * // The alias of the Component, defaults to the name of the Class
 * @BoxComponent 'myComponentAlias'
 * @BoxComponent [ 'myComponentAlias', 'anotherAlias' ]
 * @AllowsBody [boolean=false]
 * @RequiresBody [boolean=false]
 * </pre>
 *
 * The runtime injects the following into the variables	scope:
 * - boxRuntime : BoxLangRuntime
 * - log : A logger
 * - functionService : The BoxLang FunctionService
 * - interceptorService : The BoxLang InterceptorService
 * - moduleRecord : The ModuleRecord instance
 *
 * The runtime also injects the following helpers into the variables scope:
 * - newBuffer() : Create and return a new StringBuffer
 * - newBuilder() : Create and return a new StringBuilder
 * - processBody( context, body, [buffer] ) : Process the body of a component
 * - getName() : Get the name of the component
 */
@BoxComponent 'HolaComponent'
@AllowsBody true
@RequiresBody false
class{

	/**
	 * The execution of this Component
	 *
	 * <pre>
	 * <bx:holaComponent>This is my output</bx:holaComponent>
	 * </pre>
	 *
	 * @param context The context of the execution (IBoxContext)
	 * @param attributes The attributes of the component that were passed in
	 * @param body The body of the component that you can pass to `processBody(context, body, [buffer])` for execution and buffer retreival
	 * @param executionState The execution state of the component. Each component get's one as an isolated state.
	 *
	 * @return A BodyResult instance or null for a default result return.
	 */
	function invoke( required context, Struct attributes, any body, Struct executionState ){
		// A buffer to capture the body output
		var	buffer		= newBuffer();
		var	bodyResult	= processBody( context, body, buffer );

		// // If there was a return statement inside our body, we early exit now
		if ( bodyResult.isEarlyExit() ) {
			return bodyResult;
		}
		// // reverse the buffer contents and place into a string
		var newContent	= buffer.reverse().toString();
		// // output it to the page buffer
		context.writeToBuffer( newContent );
	}

}
  1. Module Compatibility Check (BL-768)
    The ModuleService now includes a powerful compatibility check for the "boxlang" version in your box.json. This ensures that your modules are running on a supported version of BoxLang, avoiding unexpected runtime issues. Just add the minimumVersion to the box.json under the boxlang section and it will tell the Module Service which supported minimum version your module will work on.
"boxlang": {
    "minimumVersion": "1.0.0",
    "moduleName": "test",
}
  1. Generic JDBC Driver Enhancement (BL-771)
    We've added a default URL delimiter to the Generic JDBC Driver. This improvement makes BoxLang more adaptable to various database configurations, simplifying JDBC URL handling for databases with unique delimiter requirements.
  2. New getSemver() BIF (BL-777)
    Introducing the getSemver() built-in function! You can now quickly parse or construct semantic versioning (semver) strings and work with them as Semver objects for enhanced version management. The new BIF will parse and give you a Semver object to work with. You can also use it to build fluent semantic version strings.
var version = GetSemver( "1.2.3-alpha+20151212" )
var version = GetSemver( "1.2.3-alpha" )
var version = GetSemver( "1.2.3" )
var version = GetSemver( "1.2.3+20151212" )
var version = GetSemver( "1.2.3-alpha.1" )
var version = GetSemver( "1.2.3-alpha.beta" )

var version1 = GetSemver( "1.2.3" )
var version2 = GetSemver( "1.2.4" )
var version3 = GetSemver( "1.3.0" )

version1.compare( version2 ); // -1
version1.compare( version3 ); // -1
version2.compare( version3 ); // -1

var version = GetSemver().withMajor( 1 ).withMinor( 2 ).withPatch( 3 ).withPreRelease( "alpha" ).toSemver()
var versionString = GetSemver().withMajor( 1 ).withMinor( 2 ).withPatch( 3 ).withPreRelease( "alpha" ).toString()

🔧 Improvements

  • Console Output for dump in Scripting Contexts (BL-769)
    Debugging just got easier! By default, the dump function now outputs to the console when running in scripting contexts, making it seamless to debug CLI scripts.
  • Optimized len() Function (BL-770)
    The len() function is now smarter and faster! We've removed unnecessary date parsing, resulting in better performance.

🛠 Tasks

  • Query Options Completion (BL-116)
    We've implemented unfinished query options, giving you more control and flexibility when working with data queries.

🐛 Bug Fixes

  1. abort in cfdump Tag (BL-761)
    Resolved an issue where using abort in conjunction with the cfdump tag caused unexpected errors.
  2. Whitespace Handling in HTTP Responses (BL-763)
    Improved handling of whitespace in responses where the Content-Type header was not yet set, ensuring better compatibility with various HTTP clients.
  3. Positional vs Named Arguments (BL-765)
    Fixed inconsistent behavior when handling arguments passed by position versus named.
  4. Invalid JDBC URLs (BL-772)
    Corrected the handling of the dsn key for JDBC drivers, ensuring compatibility with cfconfig replacements and producing valid JDBC URLs.
  5. Improved DateTime Performance (BL-774)
    Enhanced the performance of the DateTimeCaster and DateTime object instantiation when working with strings.
  6. Endless Recursion in onSessionStart() (BL-775)
    Addressed an issue where the onSessionStart() event could cause infinite recursion under certain conditions.
  7. debugmode in boxlang.json (BL-776)
    Fixed a problem where the debugmode flag was not being utilized as expected.
  8. Servlet Debug Mode Reconfiguration (BL-778)
    Resolved issues with reconfiguring debug mode in servlet-based environments.
  9. Logging Performance (BL-779)
    Overhauled the LoggingInterceptor to prevent inefficient recreation of appenders and loggers, especially under heavy stress.
  10. Missing application Argument in Logging (BL-780)
    The writelog and log components now properly support the application boolean argument.

Why Upgrade?

This release has powerful new features, performance enhancements, and critical bug fixes. Whether you're a developer building complex applications or managing modular systems, Beta 23 makes your BoxLang experience smoother and more efficient.

Ready to dive in? 🚀 Update to Beta 23 now and take your BoxLang projects to the next level!

Add Your Comment

Recent Entries

Partner with BoxLang and Ortus at Into the Box 2025: Empowering the Future of Modern Software Development!

Partner with BoxLang and Ortus at Into the Box 2025: Empowering the Future of Modern Software Development!

At Ortus Solutions, we’ve always been at the forefront of innovation in the ColdFusion ecosystem. From pioneering modern ColdFusion practices to developing cutting-edge tools and frameworks, we’ve been passionate to help and sup[port the community into shaping the future of web development.That’s why we decided to build BoxLang, our new JVM programming language that not only builds on the strengths of ColdFusion but takes modern software development to the next level.

Maria Jose Herrera
Maria Jose Herrera
December 23, 2024
Why BoxLang When You Have Kotlin, Groovy, Scala, and more…

Why BoxLang When You Have Kotlin, Groovy, Scala, and more…

As we approach a stable release of BoxLang and our continued marketing reaches more folks, many have asked about its purpose. Why create a new language when the JVM ecosystem already includes established languages like Kotlin, Groovy, and Scala, to name a few.

Luis Majano
Luis Majano
December 18, 2024