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

Preview:

Citation preview

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

This talk

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

@DanielLarsenNZ

I!♥ASP.NET

I!♥JS?

I!♥JS?

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

Tools

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

Not too hard, not too soft

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

http Sails.jsExpress

Hello Node.js + ExpressDemo@DanielLarsenNZ

Azure Web App

IIS

iisnode

Node.js in Azure Web Apps

Node.exe

V8 Engine

JavaScript Modules

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>

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

Spotify Web APIDemo

@DanielLarsenNZ

Jukebox-30 demo

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

Azure Web App

iisnode

What just happened?

Node.js

express

socket.io

azure-storage

Table storage

WebJob(C#)

Queue storag

e

On the clientAngularJS HTML5socket.ioWebAudio APIBootstrap

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

Code walkthrough

@DanielLarsenNZ

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

Where to from here?

Insights DockerAPI App

Mobile App AAD

edge.jsWeb slotsAuto-scaleLogic App

Jasmine

daSpec

Newman

WebJob SDK

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

Recapping

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

@DanielLarsenNZ

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

Questions?

@DanielLarsenNZdaniel.larsen@serato.comhttps://github.com/DanielLarsenNZ/Jukebox-30

Complete your session evaluation now and win!

© 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.