TheFutureIsDynamic-BoxLang-CFCamp2024.pdf

ortussolutions 91 views 73 slides Jun 21, 2024
Slide 1
Slide 1 of 73
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73

About This Presentation

Just like life, our code must adapt to the ever changing world we live in. From one day coding for the web, to the next for our tablets or APIs or for running serverless applications. Multi-runtime development is the future of coding, the future is to be dynamic. Let us introduce you to BoxLang.


Slide Content

The Future is
Dynamic
LED BY
Luis F. Majano

LUIS F. MAJANO
Your Host
•CEO Ortus Solutions
•Computer Engineer
•Creator of all things box!
•Documentation Weirdo!
@lmajano @ortussolutions

We had a secret!!

BoxLang is a modular dynamic language for the JVM, aiming
to make your development more productive, expressive,
functional, and available everywhere. 
DYNAMIC : MODULAR : PRODUCTIVE

WHY?

Why not just fork or collaborate?
Why build a new language?
Why now?

State of BoxLang
•Started on July 2023
•Open Beta on May 16 (< 1 Month)
•Pull Requests: 55
•Downloads: 3000+
•Repositories: 30
•Modules Completed: 20
•Modules in Development: 4
•Modules in Planning: 15
•Commits: 500+
•Contributors: 15+

•Modules in Development
•bx-encryption
•bx-orm
•bx-pdf
•bx-zip
•Modules in Planning
•bx-charts
•bx-legacy-ui
•bx-login
•bx-feeds
•bx-forms
•BoxLang +/++ Modules in Dev/Plannnig
•bx-couchbase
•bx-exchange
•bx-ftp
•bx-ldap
•bx-mongodb
•bx-redis
•bx-search
•bx-spreadsheet
•bx-elasticsearch
•bx-websockets
✓Modules Completed
✓bx-compat
✓bx-derby
✓bx-esapi
✓bx-hypersql
✓bx-image
✓bx-mail
✓bx-mariadb
✓bx-mssql
✓bx-mysql
✓bx-oracle
✓bx-postgresql
✓bx-unsafe-evaluate
✓bx-wddx
State of BoxLang

CFML Compatibility
•Dual Parser: 98%
•Core BIFS: 96% (404/420)
•Core Tags: 100% (60/60)
•Target Core Completion: July 2024
BIFS Tags

1.0.0 Release -> Fall 2024
DYNAMIC : MODULAR : PRODUCTIVE

Goals & Vision

Goals & Vision
•Be dynamic, modular, lightweight, and fast
•Be 100% interoperable with Java
•Be modern, functional, and fluent
(Think mixing CFML, Node, Kotlin, Java, and
Clojure)
•Modularity at its core
•Take advantage of the modern JVM
•TDD: Fully tested source code
•Be able to support multiple runtimes
•Have multiple transpilers
CFML -> BoxLang,
Groovy -> BoxLang
X -> BoxLang
•IDE and Tools
•All of our libraries needed to run
•Compete in today’s language environments

Key Features

Multi-Runtime Architecture

Multi-Runtime Architecture
Any OS
Docker MiniServerCommandBox Servlet Lambda Azure Android WebAssembly
Coming Soon Coming Soon Coming Soon
6 MB
9 MB 6 MB15 MB15 MB160 MB

AWS Lambda Runtime

try.boxlang.io

Wanna play?
•try.boxlang.io
•Internet playground for BoxLang
•First Production BoxLang application
•Powered by our AWS Lambda Runtime
•Skinnable
•Embeddable on any Site (Soon)

AWS Lambda Runtime
•Every Try.BoxLang.io request can fire up its very own Lambda request
•That means:
•We never have to worry about how many instances we have
•We never have to worry about queueing
•We never have to worry about bad actors accessing other people’s files
•We can easily update our Lambda runtime and all instances will be
running new code
•Lambdas have tiers too (staging, production, development)
•Scale up as big or as small as we want

Coming Soon!
•You will be able to see the Abstract Syntax Tree (AST) for your code
•You will be able to see the console/system output
•Ability to load code from GIST links
•+/++ Features
•Ability to Save to ForgeBox
•Create Projects like repli.it
•Install Modules

Strict Dependency Graph

Strict Dependency Graph
•Core to be small and focused
•Only add third-party libs if extremely necessary
•Rely on the JDK as much as possible
•Lower surface attack area
•Extremely small distribution (6MB)
•Extend via Modules with their dependencies
commons-io
Antlr
javaparser/asm
commons-lang
jackson-jr
slf4j
logback
Hikari

BoxLang Framework

BoxLang Framework
RUNTIME
Application
Service
Async
Service
Cache
Service
Component
Service
Datasource
Service
Function
Service
Interceptor
Service
Module
Service
Scheduler
Service

Enterprise Caching Engine & Aggregator

Enterprise Caching Engine & Aggregator
•Inspired by CacheBox
•Enterprise Caching Engine
•Extensible
•Custom providers
•Custom object stores
•Listeners
•Stats
•Powers all internal caching

Scheduling & Task Framework

Scheduling & Task Framework
•Inspired by ColdBox Async
•Schedulers are portable, fluent, and human
•Write them in BoxLang or Java
•Task & Completable Futures framework from the JDK
•Access to any executor in Java
•Run schedules at the OS
•Importer from Adobe/Lucee (Soon)
•Task Visualizer (BoxLang Admin, BoxLang Debugger)

BoxLang Admin

BoxLang Admin (In Development)
•Quasar Administrator
•Progressive Web App
•Desktop Version
•Android/iOS
•Works locally or can be deployed on a server
•Manages your OS install
•Manages your Multi-Site via CommandBox
•Tons of features coming…

BoxLang Tooling

Tooling Overview

Tooling Overview
•BoxLang IDE
•Language Debugger & LSP
•Run classes with a main()
•Run Scripts
•Run / Manage Servers
•Code Converters, Code Formatters
•Code Quality
•Visualizers

Tooling Overview
•CLI Tools
•REPL: CLI code execution
•Shebang Scripts: #!/usr/bin/env boxlang
•File Runner: Run files
•Schedule Runner: Run schedulers
•Transpiler: Convert CFML to BoxLang
•Compiler: BoxLang to Bytecode
•Feature Audit: BIF and Tag report usage
•Packager: Compile and package your modules or BoxLang apps

Tooling - BoxLang IDE
•Modern development flow
•Inline documentation
•Webservers panel
•Works for BL and CFML
•Run BL/CF code directly within VSCode
•Debugger & Language Server
•Committed to ongoing support and development -
new features are on the way!

Tooling - BoxLang Debugger
•Purpose built
•Integrates with VSCode via Microsoft’s DAP
•Can debug both the CLI runtime and web
server
•You’ll never use  writeDump()  again!

Tooling - BoxLang Language Server
•Built with BoxLang!
•The BoxLang runtime was built with the LSP in mind
•Full access to the BoxLang syntax parser/compiler
•Access to all BoxLang configuration, datasources,
mappings, etc…
•Extensible via BoxLang modules
•Foundational for modern language toolchains
•Intellisense
•Static analysis
•More coming soon…

Demo Time
!
Tooling

Tooling - Roadmap
•v0.9.17 = Current Release
•Near future
•Communication between the debugger and language server
•Static code analysis/type hinting (Experimental)
•BoxLang Server management (Experimental)
•Incorporate CommandBox VSCode extension
•+,++ version of debugger
•Language server plugins

ARCHITECTURE
With Brad Wood

Modern Dynamic Language

Modern Dynamic Language
•Dynamically typed just like CFML, but we go further…
•JDK21+ Minimum
•Fully JSR-223 Compliant
•Clojure + BoxLang in development by Sean Corfield
•No reflection, we use InvokeDynamic for everything
•DynamicObject: Any Object can be Dynamic!
•All OO Constructs
•Interfaces, superinterfaces and default method implementations
•Abstract classes and methods
•Static scope and methods on classes and interfaces
•Use all-new JDK features and types
•Collection of Dynamic Casters and Helpers

Java Interop

Java Interop
•Interact with Java naturally
•It’s just part of the language; no more
separation
•Type inference, auto-casting, type
promotions and coercion
•Long -> Doubles, Doubles ->Longs, etc
•BoxLang Function -> Java Lambdas
•You can import, extend, implement, annotate
from Java
Java Interop

Java Interop
•Concept of object resolvers: java, bx, custom
•New BoxLang Scripting: MyScript.bxs
•Components become Classes: MyClass.bx
•All bx/bxm/bxs are runnable via the OS
•Classes can have a main() runnable
convention
•BoxLang annotations
Runnable Classes

Pure Functions + Immutable Classes
•Support not only closures (=>) but pure functions (->)
•No side effects, no carry-over contexts, pure speed
•Especially for asynchronous programming
•New Immutable classes:
•Arrays, Structs, and Queries
•Great for async safety, read-only snapshots, speed and
more.

Multi-Parsers

Multi-Parsers : BoxLang + CFML + ???
•Our way to split with the old and bring in the new
•Transpile CFML into BoxLang
•BoxLang is a NEW clean slate
•Compat module for Adobe/Lucee
•Multi-Step Compiler
•Bx -> Java Source -> ByteCode (DebugMode)
•Bx -> Bytecode (Almost done)
•In Planning
•Groovy to BoxLang
•??? To BoxLang
Choose your path wisely!
.cfc, .cfm
.bx, bxs, bxm

BL-AST

BL-AST
•AST Visitors for custom tooling
•Feature Audits
•Transpiler
•Pretty Printer
•Code Quality
•getClassMetadata()

Event-Driven Language

Event-Driven Language
•Interceptors for the language, application, and request
•The best way to scale the language
•Listen to the entire or specific language life-cycles
•Modules can listen/collaborate events
•boxAnnounce(), boxAnnounceAsync() : CompletableFuture
Event Channels
Event Producers
Event
Event
Event
Event Consumers
Event
Event
Event

Tested & Documented

Tested & Documented
•TDD/BDD at the core of the language
•3500+ Tests Already
•Test not only Java but BoxLang
•Native BoxLang Assert constructs built-in
•Fully Documented
•Generated API Docs
•boxlang.ortusbooks.com

Modular Since Birth

Modular Needs
Modern Runtimes Have Various Needs!

( and CFML/PHP/Python/Ruby/Etc paradigms are outdated )
•Web Applications - HTTP Request/Response Data
•Tasks and Queues - Watchers, Event Handling, Async
•Lambda and CLI - fast start and blazing speeds!
•iOS/Android - Low resource footprint, event handling
•Web Assembly – Transpilation and Sandboxing

BoxLang Modules
•Inspired by ColdBox modules, NOT OSGI
•Core Runtime with lightest possible footprint
•Taps into the language life-cycle
•Write them in Java or BoxLang or Both!
•Executable as CLI packages
•Integrates with Maven/Gradle

BoxLang Modular By Design!
•Modular ecosystem, delivered by FORGEBOX
•Core modules for DBMS’, Alternate Runtimes ( e.g. Lambda ), Mail,
Encryption, CFML compatibility and more!
•Write your own functions, components ( tags ), schedulers, JDBC
Drivers, interceptions and more!
•Module has an isolated class loading machinery
•Boundless potential for community contribution and engagement!
•Foment third-party vendors
•FORGEBOX eCommerce Marketplace later this year

BoxLang Extends BoxLang
Influence core runtime behavior with BIFs, 

Member Functions, Tags, Interceptors, and More!

BoxLang Modules
Take control of your own runtime,
in your own language!

PROJET JERICHO
AKA BOXLANG
With Jorge Reyes

•July 2023 - We started Project Jericho
•4 Team Members
•Part-time development
•4 on-site workshops
•Less than a year later BoxLang Beta
•We did not want to do something halfway; we went all in
A Story of Focus

The BoxLang Engineering Team
Luis Majano Gavin Pickin Brad Wood Alan Quinlan Dan Card Daniel GarciaEric PetersonEsme Acevedo
Grant CopleyJavier QuinteroMichael BornJon Clausen Jaime Ramirez Jacob Beers

The BoxLang Marketing + Business Team
Cristobal Escobar
Spain
Maria Jose Herrera
El Salvador
Jorge Reyes
Switzerland
Edgardo Cabezas
El Salvador
Veronica Monedero
USA
Jonathan Lainez
El Salvador

•Because it’s hard and we love the challenge!
•Because our customers needed it
•Because we needed it
•We wanted to go places that we could not go
•No bug we can’t fix
•No feature we can’t deliver
•No performance we can’t tune
•THE FUTURE IS OURS
Why BoxLang?

•BoxLang Community (Free & Open Source) Apache 2
•Two Commercial Subscriptions
•BoxLang +
•Professional Support (SLA)
•Enterprise Modules & Features
•BoxLang + +
•Everything in +
•Premium Support
•Custom Builds
Professional Open Source
boxlang.io/plans

BoxLang Roadmap

Visionary Licenses
[email protected]
•One-time purchase -> Unlimited Licenses -> 10 years
•Support for 10 years included
•Long-term peace of mind
•Invest in the future
•Limited number available

A Revolution is Coming…Join us now!
[email protected]
Backdrop
AI-generated
by DALL-E
“Mad scientist in lab
experiencing Eureka
moment”

THANK YOU