Draft:BoxLang
Draft article not currently submitted for review.
This is a draft Articles for creation (AfC) submission. It is not currently pending review. While there are no deadlines, abandoned drafts may be deleted after six months. To edit the draft click on the "Edit" tab at the top of the window. To be accepted, a draft should:
It is strongly discouraged to write about yourself, your business or employer. If you do so, you must declare it. Where to get help
How to improve a draft
You can also browse Wikipedia:Featured articles and Wikipedia:Good articles to find examples of Wikipedia's best writing on topics similar to your proposed article. Improving your odds of a speedy review To improve your odds of a faster review, tag your draft with relevant WikiProject tags using the button below. This will let reviewers know a new draft has been submitted in their area of interest. For instance, if you wrote about a female astronomer, you would want to add the Biography, Astronomy, and Women scientists tags. Editor resources
Last edited by Cris.Escobar (talk | contribs) 5 months ago. (Update) |
The topic of this draft may not meet Wikipedia's notability guidelines for products and services. (June 2024) |
Paradigm | Multi-paradigm: object-oriented, imperative, functional, aspect-oriented, scripting |
---|---|
Designed by | Ortus Solutions, Corp |
Developers | Luis Majano Brad Wood |
First appeared | 16 May 2024 |
Preview release | Beta 1.0/16 May 2024
|
Typing discipline | Dynamic, static, strong, duck |
Platform | Android, JVM, |
OS | Cross-platform |
License | Apache License 2.0 |
Filename extensions | .bx, .bxm, .bxs |
Website | boxlang |
Influenced by | |
Java, Python, Ruby, Smalltalk, Groovy, Php |
BoxLang is a modern, dynamic, and loosely typed scripting language for multiple runtimes, Java Virtual Machine (JVM) provides Object-Oriented (OO) and Functional Programming (FP) constructs, as well as dynamic Metadata Programming (MP). It is a professional open-source project based on the Apache 2 license. There are two subscription options for a professional license for the language and its runtime (web, IOS, android, web assembly, etc.), each offering different support levels, customizable SLAs (Service Level Agreements), custom patches, security notifications, enhanced features, and modules.
Overview
[edit]BoxLang was created by Ortus Solutions Corp.[1] It is maintained by the company and a growing number of contributors.
It integrates key features from programming languages, including Java, ColdFusion, Python, Ruby, Go, and PHP, to equip developers with a modern, fluent, and expressive syntax.
Key features
[edit]- Dynamic Language
BoxLang is dynamically typed, which means there´s no need to declare types. It can perform type inference, auto-casting, and promotions between different types. The language adjusts to its deployed runtime and can add, remove, or modify methods and properties at runtime, making it highly flexible and adaptable.
- Multi-Runtime Development
BoxLang can be used to write adaptive code for any operating system, JVM, servlet container web server, cloud lambda functions, iOS, Android, or even the browser using our web assembly package. BoxLang is built on a versatile language core, making it deployable on almost any current or future platform.
- Established Ecosystem
BoxLang has a well-established ecosystem. Every Java and ColdFusion/CFML library is compatible with BoxLang. It comes with CommandBox, which serves as its package manager, server manager, task manager, and REPL tool.
- Java Interoperability
BoxLang offers 100% interoperability with Java. It can extend and implement Java objects, use annotations, declare classes, imports, and more. Thanks to InvokeDynamic and the BoxLang Dynamic Object core, everything in BoxLang is fully interoperable with Java.
- Low Verbosity Syntax
It is highly functional, fluent, and human-readable. It is highly expressive and has low ceremony.
- Event Driven Language
BoxLang comes with an internal event bus that can be used to enhance the language's capabilities or those of any application. It´s able to listen to almost every aspect of the language, parser, and even the runtime, or collaborate using the user own events.
- Enterprise Caching
The system has internal caching capabilities, which can be customized with providers, object stores, listeners, and statistics.
- IDE + Tools
It comes with various tools to assist developers in their work. It includes a Visual Studio Code extension for the language, providing features such as syntax highlighting, code debugging, code insight, code documentation, formatting, LSP integration, and more. Subscribers to the premium version receive additional tools, including enhanced debuggers, ColdFusion/CFML transformers.
- Scheduling & Task Framework
It provides a centralized and portable way to define and manage scheduled tasks for user servers and applications.
- Functional Programming
It enables users to explore functional concepts such as immutability and higher-order functions to write robust code. BoxLang promotes code that is easier to maintain and less error-prone, thanks to its support for functional programming principles.
- Modular Extensibilty
It's possible to add new built-in functions, template components, or modify existing functions on classes. This language also supports a Runtime Debugger, AOP aspects, and event listening within the language itself.
- Multi Parsers: CFML & BoxLang
BoxLang supports a dual parser and transpiler for executing ColdFusion/CFML code natively. It is possible to run all ColdFusion applications within BoxLang natively. Additionally, it provides tooling that automatically transpiles ColdFusion code to BoxLang for Subscription users.
- Professional Open Source
Professional open source project based on the Apache 2 license. Core features and Community Support.
- Serverless Development
Allows developers to write code in functions that trigger based on events and leave server management to the cloud provider.
- Meta-Programming
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.
Examples
[edit]Tag Syntax
[edit]//myprogram.bxm
<bx:set s = new Sample()>
<bx:output>#s.hello()#</bx:output>
Script Syntax
[edit]//myprogram.bxm
<bx:script>
s = new Sample();
writeOutput( s.hello() );
</bx:script>
To write in script in a tag-based file, the developer must use an opening and closing <bx:script> tag.
//Sample.bx
class{
function hello(){
return "Hello, World!";
}
}
No types or visibility scopes are present. BoxLang can also infer variable types on more distinct variables like dates, booleans, or numbers. However, types can be used for this:
//Sample.bx
class{
public string function hello(){
return "Hello, World!";
}
}
By default, the return type of every function and/or argument is any. Thus, it can be determined at runtime as a dynamic variable.
Semi-Colons
[edit]Semi-colons are used to demarcate line endings in BoxLang ;
. They can be optional, however. Also, the CommandBox REPL does not require semi-colons.
Tags In Script
[edit]BoxLang allows tags to be written in script syntax. The developer basically eliminates the starting <
and ending >
enclosures and create a block by using the {
and }
mustaches.
Note: BoxLang uses Lucee's generic tag-in-script syntax
http method="GET" charset="utf-8" url="https://www.google.com/" result="result" {
httpparam name="q" type="formfield" value="test";
}
Playground
[edit]Boxlang offers an interactive playground at Try Boxlang, where users can experiment with the language directly in their web browser.
References
[edit]- ^ "BoxLang: A revolution led by rebels - An interview with Luis Majano, CEO of Ortus Solutions". S. D. Times. May 30, 2024.
External links
[edit]- Ortus Solutions
- Try Boxlang
- BoxLang
- BoxLang on GitHub
- Introduction | 1.x | BoxLang : A Modern Dynamic JVM Language, Ortus Books
- BoxLang vs The World at CFCamp 2024
- CFML programming language
- Articles with example code
- Dynamically typed programming languages
- Java programming language family
- Java specification requests
- JVM programming languages
- Object-oriented programming languages
- Scripting languages
- Software using the Apache license
- Programming languages
- Dynamic programming languages
- Cross-platform free software
- Cross-platform software
- High-level programming languages