Skip to content

BoxLang Compatibility Module for Lucee/Adobe CFML Engines

Notifications You must be signed in to change notification settings

ortus-boxlang/bx-compat-cfml

Repository files navigation

⚡︎ BoxLang Module: BoxLang Compat Module For CFML

|:------------------------------------------------------:|
| ⚡︎ B o x L a n g ⚡︎
| Dynamic : Modular : Productive
|:------------------------------------------------------:|
Copyright Since 2023 by Ortus Solutions, Corp
www.boxlang.io | www.ortussolutions.com

 

Welcome to the BoxLang Compat Module For CFML

This module will allow your ColdFusion (CFML) applications under Adobe or Lucee to run under BoxLang. This module will provide the necessary compatibility layer to run your applications under BoxLang.

If there are any issues, please report them to the BoxLang JIRA or the Module Issues repository.

Settings

Here are the available settings for the compat module:

settings = {
	// The engine to mimick: adobe or lucee
    engine = "lucee",
	// JSON control character auto-escaping flag
	// IF you turn to true, be aware that the entire JSON serialization will be escaped and be slower.
	jsonEscapeControlCharacters = true,
	// This simulates the query to empty value that Adobe/Lucee do when NOT in full null support
	// We default it to true to simulate Adobe/Lucee behavior
	queryNullToEmpty = true,
	// The CF -> BL AST transpiler settings
	// The transpiler is in the core, but will eventually live in this module, so the settings are here.
	transpiler = {
		// Turn foo.bar into foo.BAR
		upperCaseKeys = true,
		// Add output=true to functions and classes
		forceOutputTrue = true,
		// Merged doc comments into actual function, class, and property annotations
		mergeDocsIntoAnnotations = true
	}
}

The valid engines are adobe or lucee. By default the engine is lucee. All module settings can be changed via the boxlang.json in your configuration.

"modules" : {
    "compat-cfml" : {
        "disabled" : false,
        "settings" : {
            "engine" : "adobe",
			// JSON control character auto-escaping flag
			// IF you turn to true, be aware that the entire JSON serialization will be escaped and be slower.
			jsonEscapeControlCharacters = true,
			// This simulates the query to empty value that Adobe/Lucee do when NOT in full null support
			// We default it to true to simulate Adobe/Lucee behavior
			queryNullToEmpty = true,
			// The CF -> BL AST transpiler settings
			// The transpiler is in the core, but will eventually live in this module, so the settings are here.
            transpiler = {
				// Turn foo.bar into foo.BAR
				upperCaseKeys = true,
				// Add output=true to functions and classes
				forceOutputTrue = true,
				// Merged doc comments into actual function, class, and property annotations
				mergeDocsIntoAnnotations = true
            }
        }
    }
}

Server Scope Mimic

Depending on which engine you select an interceptor will be loaded that will seed the server scope with the appropriate engine details.

Contributed BIFs

The compat module will contribute the following built-in functions globally:

Ortus Sponsors

BoxLang is a professional open-source project and it is completely funded by the community and Ortus Solutions, Corp. Ortus Patreons get many benefits like a cfcasts account, a FORGEBOX Pro account and so much more. If you are interested in becoming a sponsor, please visits our patronage page: https://patreon.com/ortussolutions

THE DAILY BREAD

"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" Jn 14:1-12