+ All Categories
Home > Technology > Command Box ColdFusion Package Manager, Automation

Command Box ColdFusion Package Manager, Automation

Date post: 22-Jan-2017
Category:
Upload: coldfusionconference
View: 518 times
Download: 1 times
Share this document with a friend
52
Go Commando! Package Manager, Automation, REPL, …
Transcript
Page 1: Command Box ColdFusion Package Manager, Automation

Go Commando!

Package Manager, Automation, REPL, …

Page 2: Command Box ColdFusion Package Manager, Automation

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 ColdFusion Package Manager, Automation

Agenda

How do we work in CF

How we SHOULD work

What is CommandBox

Features

Usage

Roadmap

Page 4: Command Box ColdFusion Package Manager, Automation

PSA

Join CFML Slack!

http://cfml-slack.herokuapp.com/

Sign up for Ortus Developer Week 2015

http://www.ortussolutions.com/odw

Page 5: Command Box ColdFusion Package Manager, Automation

How do we work in CF?

Page 6: Command Box ColdFusion Package Manager, Automation

IT'S ALIVE!

Page 7: Command Box ColdFusion Package Manager, Automation

Cool Kids

Page 8: Command Box ColdFusion Package Manager, Automation

How we should work!

Page 9: Command Box ColdFusion Package Manager, Automation

Introducing…

Page 10: Command Box ColdFusion Package Manager, Automation

What is CommandBox?

CLI Package

Manager

REPL

Read-Eval

Print-LoopIntegrated

Server

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 11: Command Box ColdFusion Package Manager, 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

Custom

Page 12: Command Box ColdFusion Package Manager, Automation

Installation

Java 1.7+

35mb

Installs to:

~/.CommandBox

Page 13: Command Box ColdFusion Package Manager, Automation

It is POSS

GitHub

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

Professional Support

Training

Mentoring

Custom Commands

Support

Page 14: Command Box ColdFusion Package Manager, Automation

What is CommandBox?

CLI Package

Manager

REPL

Read-Eval

Print-LoopIntegrated

Server

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 15: Command Box ColdFusion Package Manager, Automation

Read - Eval - Print - Loop

Executes code

Support CFML or CFScript

History

Multi-line Statements

Declare closures, functions, etc

Keeps state

REPL

Page 16: Command Box ColdFusion Package Manager, Automation

What is CommandBox?

CLI Package

Manager

REPL

Read-Eval

Print-LoopIntegrated

Server

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 17: Command Box ColdFusion Package Manager, Automation

Usage - CLI vs Shell

Commands Shell

Page 18: Command Box ColdFusion Package Manager, Automation

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 19: Command Box ColdFusion Package Manager, Automation

Usage - Parameters

Named

Positional

Boolean Flags

Escaped Input

Required Values

Completion

Page 20: Command Box ColdFusion Package Manager, Automation

Usage - History

Command History

REPL History

Clear History

Page 21: Command Box ColdFusion Package Manager, Automation

Usage - OS Integration

OS Integration Commands

Output Piping

|

File Redirection

> Create

>> Append

Open

Files/Directories

Browser

Run OS Binaries

Page 22: Command Box ColdFusion Package Manager, Automation

What is CommandBox?

CLI Package

Manager

REPL

Read-Eval

Print-LoopIntegrated

Server

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 23: Command Box ColdFusion Package Manager, Automation

Scaffolding

ColdBox Applications

ContentBox Applications

TestBox Integration

Custom For Any Framework or Flow

Page 24: Command Box ColdFusion Package Manager, Automation

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

Page 25: Command Box ColdFusion Package Manager, Automation

What is CommandBox?

CLI Package

Manager

REPL

Read-Eval

Print-LoopIntegrated

Server

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 26: Command Box ColdFusion Package Manager, 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

status

log

open

forget

Page 27: Command Box ColdFusion Package Manager, Automation

What is CommandBox?

CLI Package

Manager

REPL

Read-Eval

Print-LoopIntegrated

Server

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 28: Command Box ColdFusion Package Manager, Automation

Application Architecture

Quick and dirty

Logic and display mixed

together

Monolithic app design

No separation

Difficult to extend/scale

Spaghetti Code (procedural)

Page 29: Command Box ColdFusion Package Manager, Automation

Application Architecture

Logic organized better

Service-oriented

Monolithic app design

Some separation

Difficult to scale

Object Oriented Code (OO) -- with meatballs

Page 30: Command Box ColdFusion Package Manager, Automation

Application Architecture

Separates layers of

concerns

Helps enforce OO

Specialized team

members

Layers are still tightly

coupled

Model View Controller (MVC)

Page 31: Command Box ColdFusion Package Manager, Automation

Application Architecture

Add more layers for

organization

Layers are still tightly

coupled

Still monolithic!

N-Tier

Page 32: Command Box ColdFusion Package Manager, Automation

Application Architecture

Complex real-life apps

Large “surface area”

So...much...code...

No one understands it all

Too big for one plate

Once your app grows...

Page 33: Command Box ColdFusion Package Manager, Automation

Application Architecture

Microservices

Break app into logical

pieces

Drop-in functionality

Re-usable

Multi-team approach

Easier to distribute

Modularity ensues

Page 34: Command Box ColdFusion Package Manager, Automation

Modular Requirements

Standard registry of packages

Standard installation process

Standard API for loading

Ability to update packages

Dependency resolution

Page 35: Command Box ColdFusion Package Manager, Automation

What’s a package?

A folder

Some code

A box.json

Page 36: Command Box ColdFusion Package Manager, Automation

What’s a module?

A “smart” package

Has a ModuleConfig.cfc

Has optional conventions

Auto-registers itself with ColdBox

Page 37: Command Box ColdFusion Package Manager, Automation

box.json

Package Descriptor

Declares package metadata

Name

Slug

Version

Author

Dependencies

DevDependencies

Installation Details

Custom Metadata

Page 38: Command Box ColdFusion Package Manager, Automation

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 39: Command Box ColdFusion Package Manager, Automation

Where do they come from?

ForgeBox

Zip file

Directory

Git

SVN

Github

CFLIb

RiaForge

Page 40: Command Box ColdFusion Package Manager, Automation

What is CommandBox?

CLI Package

Manager

REPL

Read-Eval

Print-LoopIntegrated

Server

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 41: Command Box ColdFusion Package Manager, Automation

ForgeBox

Cloud package repository

Web GUI

REST API

Community-driven

ForgeBox Commands

200+ packages

Help us out!

Forgebox.io

Page 42: Command Box ColdFusion Package Manager, Automation

Package Commands

forgebox

install

uninstall

search

show

artifacts

remove, list, clean

package

show, init, clear, set

Page 43: Command Box ColdFusion Package Manager, Automation

Packaging Features

Choose version to install

Automatically installs dependencies

Development/Production dependencies

Distribute without dependencies

“install” initializes a project

Dependency Inception

Page 44: Command Box ColdFusion Package Manager, Automation

Packaging Features

Page 45: Command Box ColdFusion Package Manager, Automation

What is CommandBox?

CLI Package

Manager

REPL

Read-Eval

Print-LoopIntegrated

Server

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 46: Command Box ColdFusion Package Manager, Automation

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 47: Command Box ColdFusion Package Manager, Automation

# Init a repository

mkdir $1

init $1

run git init

# Create ColdBox App

coldbox create app $1 —installColdBox

coldbox create handler $2 index,save,delete

coldbox create module $3

# Prepare for Testing

install testbox

package set defaultPort=“$4”

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

my-recipe.boxr

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

Page 48: Command Box ColdFusion Package Manager, Automation

What is CommandBox?

CLI Package

Manager

REPL

Read-Eval

Print-LoopIntegrated

Server

ScaffoldingForgeBox

CFML

ColdFusion Automation

Page 49: Command Box ColdFusion Package Manager, Automation

ColdFusion Extensibility

Commands are CFML

Create custom commands

Register in ForgeBox

DI/AOP Capabilities

Favorite Command

CommandBox-Chuck-Norris

CFML

Page 50: Command Box ColdFusion Package Manager, Automation

Roadmap

Task Runners

Adobe CF Engine

ForgeBox 2.0

ForgeBox Enterprise

More Generators

Automation/Async

Page 51: Command Box ColdFusion Package Manager, Automation

Resources

Official Site

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

Documentation

http://commandbox.ortusbooks.com

http://apidocs.ortussolutions.com/commandbox/current

Google Group

https://groups.google.com/a/ortussolutions.com/forum/#!forum/commandbox

Training

http://www.ortussolutions.com/services/training

Professional Support

http://www.ortussolutions.com/services/support

Page 52: Command Box ColdFusion Package Manager, Automation

Thanks!

Q & A


Recommended