command box, package manager, automation, repl

44
Go Commando! Package Manager, Automation, REPL, …

Upload: coldfusionconference

Post on 02-Jul-2015

342 views

Category:

Software


4 download

DESCRIPTION

Command box, Package Manager, Automation, REPL

TRANSCRIPT

Page 1: Command box, Package Manager, Automation, REPL

Go Commando!

Package Manager, Automation, REPL, …

Page 2: Command box, Package Manager, Automation, REPL

Who am I?•ColdFusion Architect (12 years)

•Geek

•Android Lover

•Blogger (codersrevolution.com)

•ColdBox Platform Evangelist

•Musician

•Shade-Tree Mechanic

•Husband (11 years)

•Dad (3 beautiful girls)

Page 3: Command box, Package Manager, Automation, REPL

Agenda

•How do we work in CF

•How we SHOULD work

•What is CommandBox

•Features

•Usage

•Roadmap

Page 4: Command box, Package Manager, Automation, REPL

How do we work in CF?

Page 5: Command box, Package Manager, Automation, REPL

IT'S ALIVE!

Page 6: Command box, Package Manager, Automation, REPL

Cool Kids

Page 7: Command box, Package Manager, Automation, REPL

How we should work!

Page 8: Command box, Package Manager, Automation, REPL

Introducing…

Page 9: Command box, Package Manager, Automation, REPL

What is CommandBox?

CLI PackageManager

REPL

Read-EvalPrint-Loop

IntegratedServer

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 10: Command box, Package Manager, Automation, REPL

Who is this for?

•For any ColdFusion (CFML) Developer

•Commands For:

•Operating System Integration

•Executing CFML Code

•ColdBox Developers

•TestBox BDD/TDD

•ContentBox Developers

•Custom

Page 11: Command box, Package Manager, Automation, REPL

Installation

Java 1.7+

33mb

Installs to:

User/.CommandBox

Page 12: Command box, Package Manager, Automation, REPL

It is POSS

•GitHub

•https://github.com/Ortus-Solutions/commandbox

•Professional Support

•Training

•Mentoring

•Custom Commands

•Support

Page 13: Command box, Package Manager, Automation, REPL

What is CommandBox?

CLI PackageManager

REPL

Read-EvalPrint-Loop

IntegratedServer

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 14: Command box, Package Manager, Automation, REPL

Usage - CLI vs Shell

Commands Shell

Page 15: Command box, Package Manager, Automation, REPL

Usage - Commands

•How you get things done!

•Built-in Help

•API Docs

•Command Namespaces

•Commands

•Aliases

•Parameters/Arguments

•Tab-Completion

•Commands, Parameters, Paths, Custom

Page 16: Command box, Package Manager, Automation, REPL

Usage - Parameters

•Named

•Positional

•Boolean Flags

•Escaped Input

•Required Values

•Completion

Page 17: Command box, Package Manager, Automation, REPL

Usage - History

•Command History

•REPL History

•Clear History

Page 18: Command box, Package Manager, Automation, REPL

Usage - OS Integration

•OS Integration Commands

•Output Piping

•|

•File Redirection

•> Create

•>> Append

•Open

•Files/Directories

•Browser

•Run OS Binaries

Page 19: Command box, Package Manager, Automation, REPL

What is CommandBox?

CLI PackageManager

REPL

Read-EvalPrint-Loop

IntegratedServer

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 20: Command box, Package Manager, Automation, REPL

What’s a package?

•A folder

•Some code

•A box.json

Page 21: Command box, Package Manager, Automation, REPL

What’s a module?

A “smart” package

Has a ModuleConfig.cfc

Has optional conventions

Auto-registers itself with ColdBox

Page 22: Command box, Package Manager, Automation, REPL

box.json•Package Descriptor

•Declares package metadata

•Name

•Slug

•Version

•Author

•Dependencies

•DevDependencies

•Installation Details

•Custom Metadata

Page 23: Command box, Package Manager, Automation, REPL

box.json

{

"name" : "Weather By IP",

"author" : "Brad Wood <[email protected]>",

"version" : "1.0.0",

"slug" : "weather-lookup-by-ip",

"shortDescription" : "Look up local weather.",

"type" : "modules",

"dependencies" : {

"geolocation-lookup-by-ip" : "2.0.0"

}

}

Page 24: Command box, Package Manager, Automation, REPL

Where do they come from?

•ForgeBox

•File zip/tar

•Directory

•Git

•SVN

•Github

•Bitbucket

•Custom

Page 25: Command box, Package Manager, Automation, REPL

What is CommandBox?

CLI PackageManager

REPL

Read-EvalPrint-Loop

IntegratedServer

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 26: Command box, Package Manager, Automation, REPL

ForgeBox

•Cloud package repository

•Web GUI

•Community driven

•ForgeBox Commands

•150+ packages

•Help us out!

•www.forgebox.org coming soon!

Page 27: Command box, Package Manager, Automation, REPL

Package Commands

•forgebox

•install

•uninstall

•search

•show

•artifacts

•remove, list, clean

•package

•show, init, clear, set

Page 28: Command box, Package Manager, Automation, REPL

Packaging Features

•Choose version to install

•Automatically installs dependencies

•Development/Production dependencies

•Distribute without dependencies

• “install” initializes a project

•Dependency Inception

Page 29: Command box, Package Manager, Automation, REPL

Packaging Features

Page 30: Command box, Package Manager, Automation, REPL

What is CommandBox?

CLI PackageManager

REPL

Read-EvalPrint-Loop

IntegratedServer

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 31: Command box, Package Manager, Automation, REPL

Read - Eval - Print - Loop

•Executes code

•Support CFML or CFScript

•History

•Multi-line Statements

•Declare closures, functions, etc

•Keeps state

REPL

Page 32: Command box, Package Manager, Automation, REPL

What is CommandBox?

CLI PackageManager

REPL

Read-EvalPrint-Loop

IntegratedServer

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 33: Command box, Package Manager, Automation, REPL

Integrated Server

•Lightweight servlet container: undertow

•Startup ad-hoc servers in any folder

•Keeps track of servers, no WEB-INF needed

•Server

•start

•stop

•status

•log

•open

•forget

Page 34: Command box, Package Manager, Automation, REPL

What is CommandBox?

CLI PackageManager

REPL

Read-EvalPrint-Loop

IntegratedServer

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 35: Command box, Package Manager, Automation, REPL

Scaffolding

•ColdBox Applications

•ContentBox Applications

•TestBox Integration

•Custom For Any Framework or Flow

Page 36: Command box, Package Manager, Automation, REPL

Scaffolding

init

coldbox create app “MyApp” —installColdBoxBE

coldbox create handler contacts index,save,delete

coldbox create module MyModule

install testbox-be

package set defaultPort=“90001”

package set testbox.runner=“localhost:90001/tests/runner”

start

testbox run

Page 37: Command box, Package Manager, Automation, REPL

What is CommandBox?

CLI PackageManager

REPL

Read-EvalPrint-Loop

IntegratedServer

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 38: Command box, Package Manager, Automation, REPL

Automation

•run

•Any OS binary

•Link to grunt/gulp/ant

•execute

•Execute any CFML template

•recipe

•Like a “Batch” file

•Runs multiple commands

•Can accept parameters

•my-recipe.boxr

Page 39: Command box, Package Manager, Automation, REPL

# Init a repository

mkdir $name

init $name

run git init

# Create ColdBox App

coldbox create app $1 —installColdBoxBE

coldbox create handler $2 index,save,delete

coldbox create module $3

# Prepare for Testing

install testbox-be

package set defaultPort=“$4”

package set testbox.runner=“localhost:$4/tests/runner”

my-recipe.boxr

$> recipe my-recipe.boxr myApp myHandler myModule 8081

Page 40: Command box, Package Manager, Automation, REPL

What is CommandBox?

CLI PackageManager

REPL

Read-EvalPrint-Loop

IntegratedServer

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 41: Command box, Package Manager, Automation, REPL

ColdFusion Extensibility

•Commands are CFML

•Create custom commands

•Register in ForgeBox

•DI/AOP Capabilities

•Favorite Command

•CommandBox-Chuck-Norris

CFML

Page 42: Command box, Package Manager, Automation, REPL

Roadmap

Task Runners

Adobe CF Engine

ForgeBox 2.0

ForgeBox Enterprise

More Generators

Automation/Async

Page 43: Command box, Package Manager, Automation, REPL

Resources

•Official Site

•http://ortussolutions.com/products/commandbox

•Documentation

•http://apidocs.ortussolutions.com/commandbox/1.0.0/

•https://ortussolutions.com/products/commandbox/docs/current

•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

Page 44: Command box, Package Manager, Automation, REPL

Thanks!

Q & A