Go
Commando!
WHO AM I?
• Luis Majano - Computer Engineer
• Born in El Salvador ------------------>
• Architecture + Software Design
• CEO of Ortus Solutions
• Adobe Community Professional
• Creator of all things Box: 

ColdBox, ContentBox,WireBox....
AGENDA
• How do we work in CF
• A better way to work in CF
• What is CommandBox
• Features
• Usage
• Roadmap
HOW DO WE WORK IN CF?
Code% App%
Code
Code
Code
Code
Code
Code
Code
IT’S ALIVE!
Cool Kids
How we should work!
App#Package#
Manager#
CLI#
REPL#
Automa6on#
OS#
We need to learn, study, and apply!
Introducing…
What is CommandBox?
CLI Package

Manager
REPL
Read-Eval

Print-Loop
Integrated

Server
ScaffoldingForgeBox
CFML
ColdFusion Automation
Who is this for?
• For any ColdFusion (CFML) Developer
• Commands For:
• Operating System Integration
• Executing CFML Code
• ColdBox Developers
• TestBox BDD/TDD
• ContentBox Developers
• Any framework/app developer
Installation
Java 1.7+
33mb
v1.1.1
v2.0.0 Alpha
We are POSS
• GitHub
• https://github.com/Ortus-Solutions/commandbox
• Professional Support
• Training + Mentoring
• Development
• Support
• Salsa Lessons are Optional
Brad Wood

Salsa King
What is CommandBox?
CLI Package

Manager
REPL
Read-Eval

Print-Loop
Integrated

Server
ScaffoldingForgeBox
CFML
ColdFusion Automation
Usage - CLI vs Shell
box myapp.cfm Shell
Usage - OS Execution
OS 

+

CFML
Execute CFML Files
box myapp.cfm &
Box Scripting: *Unix
#!/usr/bin/env box
Usage - Commands
• How you get things done!
• Built-in Help
• command help
• Command Namespaces
• Commands
• Aliases
• Parameters/Arguments
• Tab-Completion
• Commands, Parameters, Paths, ForgeBox, Custom
Usage - Parameters
Named Params
box execute file=test.cfm
Positional
box install coldbox
Boolean Flags
box coldbox create app —installColdBox
Boolean Flags
box coldbox create controller —!script
Escape Input
t,n, ”, ’
Usage - History
Command History
box history
REPL History
box history type=scriptrepl
box history type=tagrepl
Clear History
box history —clear
Usage - OS Integration
• Editing
• sed
• Output Manip
• |, more, tail, grep
• File Redirection
• > Create
• >> Append
• Open
• Files/Directories
• Browser
• Run OS Binaries
• Grunt, Node, Git, Gulp, Etc.
What is CommandBox?
CLI Package

Manager
REPL
Read-Eval

Print-Loop
Integrated

Server
ScaffoldingForgeBox
CFML
ColdFusion Automation
What’s a package?
• A folder or zip/tar file that must contain:
• box.json
• It must be in the root!
box.json
• Package Descriptor
• Declares package metadata
• Name
• Slug
• Version
• Author
• Dependencies
• DevDependencies
• Installation Details
• Custom Metadata
box.json
Where do they come
from?
• ForgeBox
• File zip/tar
• Directory
• Git
• SVN
• Github
• Bitbucket
• Custom
What is CommandBox?
CLI Package

Manager
REPL
Read-Eval

Print-Loop
Integrated

Server
ScaffoldingForgeBox
CFML
ColdFusion Automation
ForgeBox
• Cloud package repository
• Web GUI
• Community driven
• 180+ packages
• Help us out!
• www.forgebox.io
Package Commands
• forgebox
• install
• uninstall
• update
• search
• show
• types
• slugcheck
• artifacts
• remove, list, clean
• package
• show, init, clear, set
Packaging Features
• Can distribute without dependencies
• Can have development dependencies
• Dependencies Inception
• “install” to initialize a project
• “update” to update dependencies
• “outdated” to check for versions
• “list” to visualize dependencies
What is CommandBox?
CLI Package

Manager
REPL
Read-Eval

Print-Loop
Integrated

Server
ScaffoldingForgeBox
CFML
ColdFusion Automation
Read - Eval - Print - Loop
• Executes code
• SupportTags or CFScript
• History
• Multi-line Statements
• Declare closures, functions, etc
• Keeps state
REPL
What is CommandBox?
CLI Package

Manager
REPL
Read-Eval

Print-Loop
Integrated

Server
ScaffoldingForgeBox
CFML
ColdFusion Automation
Integrated Server
• Lightweight servlet container: undertow
• Startup ad-hoc servers in any folder
• Keeps track of servers, no WEB-INF needed
• Server
• start
• stop
• restart
• status
• log
• open
• forget
• Lucee + Railo + Adobe CF
What is CommandBox?
CLI Package

Manager
REPL
Read-Eval

Print-Loop
Integrated

Server
ScaffoldingForgeBox
CFML
ColdFusion Automation
Scaffolding
• ColdBox Applications
• ContentBox Applications
• TestBox Integration
• Available For Any Framework or Application
• Preside CMS
Scaffolding
init
coldbox create app “MyApp” —-installColdBox
coldbox create handler contacts index,save,delete
coldbox create module MyModule
install testbox
package set defaultPort=“90001”
package set testbox.runner=“localhost:90001/tests/runner”
testbox run
What is CommandBox?
CLI Package

Manager
REPL
Read-Eval

Print-Loop
Integrated

Server
ScaffoldingForgeBox
CFML
ColdFusion Automation
Automation Commands
• run
• Execute any OS binary
• Integrate with grunt/gulp/ant
• execute
• Enhanced execution
• Can accept parameters
• recipe
• Like a “Batch” file: !#/usr/bin/box
• Runs multiple commands
• Can accept parameters
• my-recipe.boxr
# Init a repository
mkdir $name
init $name
run git init
# Create ColdBox App
coldbox create app $name —installColdBox
coldbox create handler $controller index,save,delete
coldbox create module $module
# Prepare for Testing
install testbox
package set defaultPort=“$port”
package set testbox.runner=“localhost:$port/tests/runner”
my-recipe.boxr
recipe my-recipe.boxr MyApp
What is CommandBox?
CLI Package

Manager
REPL
Read-Eval

Print-Loop
Integrated

Server
ScaffoldingForgeBox
CFML
ColdFusion Automation
ColdFusion Extensibility
• Commands are CFML
• Create custom commands
• Register in ForgeBox
• DI/AOP Capabilities
• Favorite Commands
• CommandBox-Chuck-Norris
• cfdocs
CFML
Roadmap
Task Runners
Adobe CF Engine
ForgeBox 2.0
ForgeBox Enterprise
Package Endpoints
More Automations
OS Execution Params
Resources
• Official Site
• http://ortussolutions.com/products/commandbox
• Documentation
• http://apidocs.ortussolutions.com/commandbox/current
• http://commandbox.ortusbooks.com
• Google Group
• https://groups.google.com/a/ortussolutions.com/forum/#!forum/commandbox
• Training
• http://ortussolutions.com/services/training
• Professional Support
• http://ortussolutions.com/services/support
Thanks!
Q & A

Command box

  • 1.
  • 2.
    WHO AM I? •Luis Majano - Computer Engineer • Born in El Salvador ------------------> • Architecture + Software Design • CEO of Ortus Solutions • Adobe Community Professional • Creator of all things Box: 
 ColdBox, ContentBox,WireBox....
  • 3.
    AGENDA • How dowe work in CF • A better way to work in CF • What is CommandBox • Features • Usage • Roadmap
  • 4.
    HOW DO WEWORK IN CF? Code% App% Code Code Code Code Code Code Code
  • 5.
  • 6.
  • 7.
    How we shouldwork! App#Package# Manager# CLI# REPL# Automa6on# OS#
  • 8.
    We need tolearn, study, and apply!
  • 9.
  • 10.
    What is CommandBox? CLIPackage
 Manager REPL Read-Eval
 Print-Loop Integrated
 Server ScaffoldingForgeBox CFML ColdFusion Automation
  • 11.
    Who is thisfor? • For any ColdFusion (CFML) Developer • Commands For: • Operating System Integration • Executing CFML Code • ColdBox Developers • TestBox BDD/TDD • ContentBox Developers • Any framework/app developer
  • 12.
  • 13.
    We are POSS •GitHub • https://github.com/Ortus-Solutions/commandbox • Professional Support • Training + Mentoring • Development • Support • Salsa Lessons are Optional Brad Wood
 Salsa King
  • 14.
    What is CommandBox? CLIPackage
 Manager REPL Read-Eval
 Print-Loop Integrated
 Server ScaffoldingForgeBox CFML ColdFusion Automation
  • 15.
    Usage - CLIvs Shell box myapp.cfm Shell
  • 16.
    Usage - OSExecution OS 
 +
 CFML Execute CFML Files box myapp.cfm & Box Scripting: *Unix #!/usr/bin/env box
  • 17.
    Usage - Commands •How you get things done! • Built-in Help • command help • Command Namespaces • Commands • Aliases • Parameters/Arguments • Tab-Completion • Commands, Parameters, Paths, ForgeBox, Custom
  • 18.
    Usage - Parameters NamedParams box execute file=test.cfm Positional box install coldbox Boolean Flags box coldbox create app —installColdBox Boolean Flags box coldbox create controller —!script Escape Input t,n, ”, ’
  • 19.
    Usage - History CommandHistory box history REPL History box history type=scriptrepl box history type=tagrepl Clear History box history —clear
  • 20.
    Usage - OSIntegration • Editing • sed • Output Manip • |, more, tail, grep • File Redirection • > Create • >> Append • Open • Files/Directories • Browser • Run OS Binaries • Grunt, Node, Git, Gulp, Etc.
  • 21.
    What is CommandBox? CLIPackage
 Manager REPL Read-Eval
 Print-Loop Integrated
 Server ScaffoldingForgeBox CFML ColdFusion Automation
  • 22.
    What’s a package? •A folder or zip/tar file that must contain: • box.json • It must be in the root!
  • 23.
    box.json • Package Descriptor •Declares package metadata • Name • Slug • Version • Author • Dependencies • DevDependencies • Installation Details • Custom Metadata
  • 24.
  • 25.
    Where do theycome from? • ForgeBox • File zip/tar • Directory • Git • SVN • Github • Bitbucket • Custom
  • 26.
    What is CommandBox? CLIPackage
 Manager REPL Read-Eval
 Print-Loop Integrated
 Server ScaffoldingForgeBox CFML ColdFusion Automation
  • 27.
    ForgeBox • Cloud packagerepository • Web GUI • Community driven • 180+ packages • Help us out! • www.forgebox.io
  • 28.
    Package Commands • forgebox •install • uninstall • update • search • show • types • slugcheck • artifacts • remove, list, clean • package • show, init, clear, set
  • 29.
    Packaging Features • Candistribute without dependencies • Can have development dependencies • Dependencies Inception • “install” to initialize a project • “update” to update dependencies • “outdated” to check for versions • “list” to visualize dependencies
  • 30.
    What is CommandBox? CLIPackage
 Manager REPL Read-Eval
 Print-Loop Integrated
 Server ScaffoldingForgeBox CFML ColdFusion Automation
  • 31.
    Read - Eval- Print - Loop • Executes code • SupportTags or CFScript • History • Multi-line Statements • Declare closures, functions, etc • Keeps state REPL
  • 32.
    What is CommandBox? CLIPackage
 Manager REPL Read-Eval
 Print-Loop Integrated
 Server ScaffoldingForgeBox CFML ColdFusion Automation
  • 33.
    Integrated Server • Lightweightservlet container: undertow • Startup ad-hoc servers in any folder • Keeps track of servers, no WEB-INF needed • Server • start • stop • restart • status • log • open • forget • Lucee + Railo + Adobe CF
  • 34.
    What is CommandBox? CLIPackage
 Manager REPL Read-Eval
 Print-Loop Integrated
 Server ScaffoldingForgeBox CFML ColdFusion Automation
  • 35.
    Scaffolding • ColdBox Applications •ContentBox Applications • TestBox Integration • Available For Any Framework or Application • Preside CMS
  • 36.
    Scaffolding init coldbox create app“MyApp” —-installColdBox coldbox create handler contacts index,save,delete coldbox create module MyModule install testbox package set defaultPort=“90001” package set testbox.runner=“localhost:90001/tests/runner” testbox run
  • 37.
    What is CommandBox? CLIPackage
 Manager REPL Read-Eval
 Print-Loop Integrated
 Server ScaffoldingForgeBox CFML ColdFusion Automation
  • 38.
    Automation Commands • run •Execute any OS binary • Integrate with grunt/gulp/ant • execute • Enhanced execution • Can accept parameters • recipe • Like a “Batch” file: !#/usr/bin/box • Runs multiple commands • Can accept parameters • my-recipe.boxr
  • 39.
    # Init arepository mkdir $name init $name run git init # Create ColdBox App coldbox create app $name —installColdBox coldbox create handler $controller index,save,delete coldbox create module $module # Prepare for Testing install testbox package set defaultPort=“$port” package set testbox.runner=“localhost:$port/tests/runner” my-recipe.boxr recipe my-recipe.boxr MyApp
  • 40.
    What is CommandBox? CLIPackage
 Manager REPL Read-Eval
 Print-Loop Integrated
 Server ScaffoldingForgeBox CFML ColdFusion Automation
  • 41.
    ColdFusion Extensibility • Commandsare CFML • Create custom commands • Register in ForgeBox • DI/AOP Capabilities • Favorite Commands • CommandBox-Chuck-Norris • cfdocs CFML
  • 42.
    Roadmap Task Runners Adobe CFEngine ForgeBox 2.0 ForgeBox Enterprise Package Endpoints More Automations OS Execution Params
  • 43.
    Resources • Official Site •http://ortussolutions.com/products/commandbox • Documentation • http://apidocs.ortussolutions.com/commandbox/current • http://commandbox.ortusbooks.com • Google Group • https://groups.google.com/a/ortussolutions.com/forum/#!forum/commandbox • Training • http://ortussolutions.com/services/training • Professional Support • http://ortussolutions.com/services/support
  • 44.