node & express as workflow tools

Post on 06-May-2015

619 Views

Category:

Internet

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Node & Express as Workflow Tools “Enterprise” and “Node.js” are generally two terms which are rarely seen together, but developing on an (what are considered) “enterprise level” stack doesn’t mean you can’t sneak some Node.js into your workflow. This talk will cover using Node.js, Express, Grunt/Gulp, Commander to build custom workflow tools, mock APIs, and test suites to allow you to maintain sanity while working with more traditional environments. We will cover a simple use case for using Node and Express to smooth Front-end development workflow, and how to package your custom tool as an NPM module for others to install. Presented live at FITC's Spotlight: MEAN Stacks event held on March 28th, 2014 More info at FITC.ca

TRANSCRIPT

Building Custom Development Tools With Node.js

Commander.js

Topher BullockSoftware Engineer - Pivotal

@topherbullock

.. and other tools to help along the way.

About● Topher Bullock● Software Engineer - Pivotal;

working on Cloud Foundry Services.

● Full-stack JavaScript

@topherbullock pivotal-topher-bullock

● Faster / Easier Development● Rapid Prototyping● Task Automation● Test Driven Development● Build Systems● Debugging

Case Study : Tomcat Woes

● Large scale JS MVC app ● leveraging APIs served by Spring*● eventually need to deploy everything

together in one big happy .war file● working on everything together meant being

tied to an IDE to deploy web app changes to Tomcat ~> slow development.

* Disclaimer : Spring is totally cool and is a solid framework for Java projects. They are making strides for improving workflows; e.g Spring Boot

Observability

Browser

Tomcat

File System(Workspace)

IDE

Using a traditional stack in production doesn’t mean you can’t

use Node.js for development.

Enterprises will resist deploying Node.js in favor of other

technologies.

Commander.js

JIFASNIFJavaScript is Fun And

So Node.js is Fun“ ”

● CLI tool written in Node.js● Task Automation / Build Tool (mvn-ish)● Simple Config / Pre Built tasks

Grunt

Extending Grunt● Roll your own Grunt tasks● Programmatically run tasks and listen for

events

● The E in MEAN :3● Great for quickly spinning up a mock API

server● Good plumbing to serve front-end app for

development

Express

Awesome colored output for console.

Progress bars, because they’re awesome.

Useful CLI Tools

General purpose CLI lib

Useful command prompt tools; works well alongside CommanderJSCommand.prompt() removed in 2.0.0

Contrary to the belief of many, ‘npm’ is not in fact an abbreviation for ‘Node Package Manager.’ It is a recursive bacronymic

abbreviation for ‘npm is not an acronym.’ (If it was ‘ninaa’, then it would be an acronym, and

thus incorrectly named.)

“”

● Not "Node Package Manager.".. but it is the Package Manager for Node. -_-

● Great for distributing your tools● $ npm link is your friend

NPM

Thanks!Questions?

@topherbullock pivotal-topher-bullock

topher.bullock@pivotallabs.com

top related