Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

let trustMe = { has: ["Beard", "Motorcycle"], consumes: ["Bacon", "Caffeine"] };

Slide 4

Slide 4 text

JavaScript… …has won the Web. Scott Hanselman

Slide 5

Slide 5 text

Any application that can be written in JavaScript… …will eventually be written in JavaScript (search for “jslinux”) Atwood’s Law:

Slide 6

Slide 6 text

JavaScript… …is tragically important. Douglas Crockford

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Up Ahead • Why Node.js? • Crash course • Tools and frameworks • Integration strategies

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

ES 2016 (ES6) Support http://node.green

Slide 17

Slide 17 text

What’s our story? • ASP.NET MVC, C# • SQL Server + NHibernate • JavaScript + JQuery

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

What’s our story? • JavaScript • Recruiting • Productive, less friction – Testing – Microservices – RabbitMQ, riak, redis – Cross-platform

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

Why Node.js? • Rapid innovation & delivery • Developer happiness • Attract & retain talent • Performance “Why Node.js is Becoming the Go-To Technology in the Enterprise” – nearform.com

Slide 24

Slide 24 text

Node.js exemplifies… • Start with the simplest solution that works • Do one thing, and do it well

Slide 25

Slide 25 text

• Single-page apps • API server (REST, Hypermedia, etc.) • Real-time, streaming • WebSockets, push notifications • Chat, IM, social media • Dashboards • Proxy service Node.js Use Cases

Slide 26

Slide 26 text

Node.js Use Cases • Single-page apps • API server (REST, Hypermedia, etc.) • Real-time, streaming • WebSockets, push notifications • Chat, IM, social media • Dashboards • Proxy service

Slide 27

Slide 27 text

More than just backend • Create Automation Scripts • Create CLI tools using nexe • Create Desktop Apps

Slide 28

Slide 28 text

Atom Atom Slack Visual Studio Code

Slide 29

Slide 29 text

Fandango • dramatically shorter development cycles • micro-services architecture • flexibility in deployment • easily scalable infrastructure “Fandango Goes Live with Node.js” – nearform.com

Slide 30

Slide 30 text

• 2x faster development with fewer developers • 33% fewer lines of code • 40% fewer files • 2x improvement requests/sec • 35% decrease in avg response time

Slide 31

Slide 31 text

• Black Friday, 2013 • Mobile platform • 200,000,000+ users • 10 CPU cores, 28 GB RAM • < 1% CPU utilization • Deployed updates

Slide 32

Slide 32 text

Who else is using Node.js? • Dow Jones (WSJ) • eBay • Groupon • LinkedIn • IBM • Redhat • The New York Times • Uber • Yammer • GoDaddy

Slide 33

Slide 33 text

DevOps • Small footprint • Cross-platform • Event-driven • OSS tools

Slide 34

Slide 34 text

“What is Node.js used for: The 2015 Node.js Overview Report” – blog.risingstack.com

Slide 35

Slide 35 text

Installing Node.js 1. https://nodejs.org 2. Click a download link 3. Run installer – OR – Install using Chocolatey (https://chocolatey.org) C:\> choco install nodejs.install

Slide 36

Slide 36 text

Installing Node.js C:\> node –v v6.3.1 C:\> npm –v 3.10.5

Slide 37

Slide 37 text

Dependencies – OR – Python 2.x (https://python.org/downloads/ C:\> choco install python2

Slide 38

Slide 38 text

Dependencies – OR – Visual C++ Build Tools 2015 – OR – Visual Studio Community 2015 C:\> choco install microsoft-build-tools

Slide 39

Slide 39 text

Node.js Tools for Visual Studio https://github.com/Microsoft/nodejstools Minimum requirements: • VS 2012 Pro or VS Community 2013/2015 • Latest VS updates • VS + Node.js Tools Azure VM

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

Visual Studio Code https://code.visualstudio.com/ • Linux, Mac OSX, and Windows • code assistance • debugging

Slide 42

Slide 42 text

C:\projects\myapp> npm init C:\projects\myapp> npm install --save lodash

Slide 43

Slide 43 text

module-examples.js

Slide 44

Slide 44 text

module-examples.js

Slide 45

Slide 45 text

module-examples.js

Slide 46

Slide 46 text

module-examples.js

Slide 47

Slide 47 text

module-examples.js

Slide 48

Slide 48 text

module-examples.js

Slide 49

Slide 49 text

module-examples.js

Slide 50

Slide 50 text

temperature.js

Slide 51

Slide 51 text

temperature.js

Slide 52

Slide 52 text

temperature.js

Slide 53

Slide 53 text

temperature.js

Slide 54

Slide 54 text

temperature.js temp-example.js

Slide 55

Slide 55 text

temperature.js temp-example.js

Slide 56

Slide 56 text

temperature.js temp-example.js

Slide 57

Slide 57 text

temperature.js temp-example.js

Slide 58

Slide 58 text

temperature.js temp-example.js

Slide 59

Slide 59 text

config.js

Slide 60

Slide 60 text

config.js

Slide 61

Slide 61 text

config.js

Slide 62

Slide 62 text

config.js

Slide 63

Slide 63 text

config.js

Slide 64

Slide 64 text

config.js

Slide 65

Slide 65 text

config.js

Slide 66

Slide 66 text

config.js cfg-example.js

Slide 67

Slide 67 text

config.js cfg-example.js

Slide 68

Slide 68 text

config.js cfg-example.js

Slide 69

Slide 69 text

config.js cfg-example.js

Slide 70

Slide 70 text

config.js cfg-example.js

Slide 71

Slide 71 text

config.js cfg-example.js app.json

Slide 72

Slide 72 text

sql-example.js

Slide 73

Slide 73 text

sql-example.js

Slide 74

Slide 74 text

sql-example.js

Slide 75

Slide 75 text

sql-example.js

Slide 76

Slide 76 text

sql-example.js

Slide 77

Slide 77 text

Deploying • Windows – iisnode for web apps – winser for services • Linux – forever

Slide 78

Slide 78 text

Hosting Node.js on Azure • New Node JS Empty Site • Connect to repository • reverentgeek.com/hosting-node-js-on-microsoft-azure/

Slide 79

Slide 79 text

Recommended toolbox Package What it do, yo lodash JavaScript utilities when JavaScript promise library async async/parallel execution request (or rest) http client gulp build engine, test runner socket.io sockets, real-time node-inspector Debugging mocha test framework chai TDD/BDD assertion library sinon spies, stubs, mocks

Slide 80

Slide 80 text

Node frameworks MVC • Express • hapi • Meteor • Sails API • Restify • LoopBack • Autohost + Hyped nodeframework.com nodewebmodules.com

Slide 81

Slide 81 text

• Run .NET in-process • …including F#, ADO.NET, Python, and Powershell • Execute inline code, files, or assemblies • Alternative to writing native modules in C • .NET 4.5 or Mono 3.1

Slide 82

Slide 82 text

What can Edge.js do? • Leverage existing .NET investment • TFS, SharePoint, Exchange, etc. • Active Directory • Hardware (e.g. camera, microphone, printer, win32) • Video encoding, or other CPU-intensive work • Powershell

Slide 83

Slide 83 text

Node.js Integration Strategies • Node.js as proxy • Edge.js for .NET • request module to call APIs • Messaging (e.g. RabbitMQ, Azure Service Bus)

Slide 84

Slide 84 text

No content

Slide 85

Slide 85 text

No content

Slide 86

Slide 86 text

Demos + LOTS of Resources bit.ly/node-demos