28

Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Embed Size (px)

Citation preview

Page 1: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361
Page 2: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Building Azure Web Apps with Node.js and the Spotify Web APIDaniel Larsen M361

Page 3: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

This talk

Node.js in Azure Web AppsNode Tools for Visual StudioNode.js + ExpressSpotify Web API

@DanielLarsenNZ

Page 4: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

I!♥ASP.NET

Page 5: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

I!♥JS?

Page 6: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

I!♥JS?

Page 7: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

What’s not to Love?

Interpreted in real-time

Synchronous scripting language

Performance issues when running in the Browser

Dynamic type system

V8 compiles JS into native machine code before executing

Asynchronous through call-back pattern

Single-threaded Event Loop pattern enables scale to tens of thousands of

connectionsIt’s still there. And makes sense for many

applications. TypeScript can help if you need Static Types.

JavaScript in Web 1.0 JavaScript in Node.js

Page 8: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Tools

Page 9: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

ToolsVisual Studio 2015 Community Editionalso some editions of Visual Studio 2012 and 2013

Azure SDK v2.7

Node.js Tools for Visual Studio 1.1 RC (extension)

Postman

Page 10: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Not too hard, not too soft

Express: Fast, un-opinionated, minimalist web framework for Node.js

http Sails.jsExpress

Page 11: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Hello Node.js + ExpressDemo@DanielLarsenNZ

Page 12: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Azure Web App

IIS

iisnode

Node.js in Azure Web Apps

Node.exe

V8 Engine

JavaScript Modules

Page 13: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

iisnodeProcess managementAuto-updateSide-by-side with other content typeshttps://github.com/tjanczuk/iisnode

<system.webServer> <handlers> <add name="iisnode" path="hello.js" verb="*" modules="iisnode" /> </handlers></system.webServer>

Page 14: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

IIS AwesomeIntegrated debuggingScalability on multi-core serversIntegrated IIS management, config, securityPort-sharing, rewrite, compression, caching, logging over HTTP…

Page 15: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Spotify Web APIDemo

@DanielLarsenNZ

Page 16: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Jukebox-30 demo

bit.ly/ignitenzUn-silent your phoneGet ready to press Un-mute…

Page 17: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Azure Web App

iisnode

What just happened?

Node.js

express

socket.io

azure-storage

Table storage

WebJob(C#)

Queue storag

e

Page 18: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

On the clientAngularJS HTML5socket.ioWebAudio APIBootstrap

Page 19: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

More toolsVisual Studio CodeNode.jsGitHub for Windows (posh-git)Postman

Page 20: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Code walkthrough

@DanielLarsenNZ

Page 21: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

JavaScript on the Server! ♥Node.js + Azure Web AppsJavaScript + PaaS = maximum productivity and valuefrom high-performance teams.

Bounded ContextAPIs, Logic Apps, polygot programming

Performance and ScaleSOA, micro-services

Page 22: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Where to from here?

Insights DockerAPI App

Mobile App AAD

edge.jsWeb slotsAuto-scaleLogic App

Jasmine

daSpec

Newman

WebJob SDK

Page 23: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Related Ignite NZ Sessions

Leveraging TypeScriptM216

Deep Dive API Apps & Logic AppsElliot Friday 9:00am M392

Azure Active DirectoryM338

JavaScript on mobile (Cordova)M334

ASP.NET MVC vNextNZ3 Friday 9:00am M364

Azure Service Bus MessagingMarlborough Friday 11:55am M374 Find me later at…

Hub Happy Hour Thu 5:30-6:30pm Closing drinks Fri 3:00-4:30pm

1234

56

Page 24: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Recapping

Node.js in Azure Web AppsNode Tools for Visual StudioSpotify Web APINode.js + Express

@DanielLarsenNZ

Page 25: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Resources

TechNet & MSDN FlashSubscribe to our fortnightly newsletter

http://aka.ms/technetnz http://aka.ms/msdnnz

http://aka.ms/ch9nz

Microsoft Virtual AcademyFree Online Learning

http://aka.ms/mva

Sessions on Demand

Page 26: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Questions?

@[email protected]://github.com/DanielLarsenNZ/Jukebox-30

Page 27: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

Complete your session evaluation now and win!

Page 28: Building Azure Web Apps with Node.js and the Spotify Web API Daniel Larsen M361

© 2015 Microsoft Corporation. All rights reserved.Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or

other countries.MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.