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

31/07/2019 50 min
095 ColdFusion CommandBox vs Node.js (Dev Feature shootout), with Nolan Erck

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

Episode Synopsis

Nolan Erck talks about "ColdFusion CommandBox vs Node.js (Dev Feature shootout)" in this episode of the CF Alive Podcast, with host Michaela Light. Show notes 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 hub.docker.com/_/node hub.docker.com/r/ortussolutions/commandbox/ Score: CommandBox 10 Node 10 11. Making Games Node Tons of resources Many game engines support JavaScript Can get as simple or advanced as you like CommandBox box snake Vintage gaming at its finest! Minh Vo's preso on React at Gov't Summit draftstudios.com Giancarlo Gomez's preso on WebSockets: "Refreshing Your UI: Modern Uses for WebSockets" Score: CommandBox 11 Node 11 12. Contributing Node Main engine is written in C++, not JavaScript Add-ons can be JavaScript but not the core e.g the Angular CLI, create-react-app CommandBox 90% of the core is CFML Remaining 10% is Java Installing CommandBox also gives you the source code! Score: CommandBox 12 Node 12 But my custom commands have to be ColdBox apps, right? NO! Which to use? Both 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) South of Shasta - onsite and remote training nodejs.org docs.npmjs.com commandbox.ortusbooks.com Ortus Solutions training Brad Wood's Blog Talk to people at the conference! What are you looking forward to at CF Summit? Mentioned in this episode Preso, videos and demos http://sacinteractive.com/ Bio Nolan Erck Chief consultant at South of Shasta Nolan Erck has been developing software for 19 years. Starting in the video game industry working on titles for Maxis and LucasArts, then advancing to web development in 1999, his list of credits includes Grim Fandango, StarWars Rogue Squadron, SimPark, SimSafari as well as high-traffic websites for clients. Nolan manages the SacInteractive User Group, teaches classes on aspects of software development, and regularly gives presentations at conferences and user groups across the country. Links Twitter GitHub Website LinkedIn

More episodes of the podcast ColdFusion Alive