095 ColdFusion CommandBox vs Node.js (Dev Feature shootout), with Nolan Erck



095 ColdFusion CommandBox vs Node.js (Dev Feature shootout), with Nolan Erck

095 ColdFusion CommandBox vs Node.js (Dev Feature shootout), with Nolan Erck

Nolan Erck talks about “ColdFusion CommandBox vs Node.js (Dev Feature shootout)” in this episode of the CF Alive Podcast, with host Michaela Light.
https://teratech.com/podcast-coldfusion-commandbox-vs-node-js-dev-feature-shootout-with-nolan-erck/
Episode Highlights 
The myth that JS has all the cool tools and CF is dying
Node.js has lots of cool dev tools
CommandBox
What is Node.js
JavaScript based webserver and dev tools, CLI
Very popular and lots of updates
What is CommandBox?
CFML based webserver and dev tools, CLI
Installing Node
Installing CommandBox
1. Ease of install
Both Easy to install
Both Open source and free
Score: CommandBox 1 Node 1
2. Command Line 
Both have REPL –  read–eval–print loop
Both Run Batch files
CommandBox BulletTrain add on – more colors and more informative prompt
Score: CommandBox 2 Node 2
3. Running files
Both Easy from the command line
Replaces other script languages such as BASH with one you already know (JS or CFScript
Eg file processing, production deployment, photo file processing
Score: CommandBox 3 Node 3
4. Built-in Help
Node –help
Box help
Help name spaces
Score: CommandBox 4 Node 4
5. How they work
Node
Running a JavaScript application engine on your computer (or
server)
Code is processed thru the engine
Spins up different services as needed
Customizable per project via “.json” con
CommandBox
Running a CFML application engine on your computer (or
server)
Code is processed thru the engine
Spins up different services as needed (modules, packages)
Customizable per project via “.json” con
Score: CommandBox 5 Node 5
6. Ease to set up a new project
npm init
Wizard interface asks questions
Node json file
NPM = Node Package Manager www.npmjs.com 
box init
Same with box json file
Score: CommandBox 6 Node 6
7. Dealing with dependencies (frameworks and libraries required for production)
Node
In package.json, “dependencies” section
Things your app needs to run
jquery, lodash, Angular, libaries from your team, etc
“npm install”
Node goes out to “the registry” and grabs those assets
Puts them in “node_modules” folder
CommandBox
In box.json, “dependencies” section
Things your app needs to run
jquery, lodash, Angular, libraries from your team, etc
“box install”
CommandBox goes out to “the cloud” and grabs those assets
Puts them in “installPaths” folders
Score: CommandBox 7 Node 7
8. Dev dependencies (dev tools)
Tools and libraries you want on dev machines but not production
Eg Testing frameworks 
Node
In package.json, “devDependencies” section
Things your app needs to build
CLI Tools, Typescript transpiler, Code Analyzer, Linter,etc
Angular CLI, TypeScript, Webpack, etc
“npm install –dev [thing]”
Node goes out to “the registry” and grabs those assets
Puts them in “node_modules” folder
CommandBox
In box.json, “devDependencies” section
Things your app needs to build
jquery, lodash, Angular, libaries from your team, etc
“box install –saveDev [thing]”
CommandBox goes out to “the cloud” and grabs those assets
Puts them in “installPaths” folders
Score: CommandBox 8 Node 8
9. Package management
Node
npm Registry
Magic place in “the cloud” where reusable JavaScript lives
“npm install [some library]”
Node talks to “the registry”, downloads the lib
These dependencies live in the “node_modules” folder of your project
Adding My Project to npm
Create a package.json le
Follow a few basic guidlines
README, semantic version, Author,
etc
More details
CommandBox
ForgeBox
CommandBox has a Registry: ForgeBox
The “npm” of the CF world
Not just *Box stuff!
Can install CFWheels, Mura, FW/1, etc
Any general CFML project can live here
ForgeBox replaces
CFLib, (RIAForge), GetMura etc
How do I add my project to ForgeBox?
Create a box.json 
Follow a few basic guidlines
README, semantic version, Author,
etc
More details
Score: CommandBox 9 Node 9
10. Docker containers
They serve different purposes
CommandBox is…
Free, open source, well
supported
Supports all CFML engines
Lucee and Railo
Adobe CF as far back as version 9
CommandBox Really is a Game-Changer
You can do all the cool things that Node/JavaScript developers do
Uses for Node.js
It’s ubiquitous with modern front-end development
Front-end tooling requires Node
Angular, Vue, React, PhoneGap, Grunt, Gulp, Stylus, SASS,
SCSS, LESS, WebPack, Babel, TypeScript, etc
This is a “given” nowadays
Uses for CommandBox
This is the way to tell modern CFML developers from legacy programmers
Spinning up Dev environments, testing everything,
containerization, onboarding new team members
Managing production web servers
Building CLI tools for development AND production servers!
How to learn (Resources)

Comments are closed.