Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Node.js Crash Course - Indy.Code() 2018

Node.js Crash Course - Indy.Code() 2018

Node.js is a compelling platform that is quickly spreading from startups to the enterprise. Node.js strategically unites developers of all backgrounds through the common language of JavaScript. Why should you learn Node.js and where do you start? You will come away from this talk with the evidence to support Node.js, and tools you need to be productive. We will walk through a typical workflow of creating and debugging a web application. You will learn how easy it is to deploy, including Microsoft Azure. We'll also look at popular frameworks and modules, and other learning resources to give you the best start.

David Neal

April 19, 2018
Tweet

More Decks by David Neal

Other Decks in Programming

Transcript

  1. Any application that can be written in JavaScript… …will eventually

    be written in JavaScript (search for “jslinux”) Atwood’s Law:
  2. Up Ahead • Why Node.js? • Crash course • Tools

    and frameworks • Integration strategies
  3. What’s my story? • ASP.NET MVC, C# • SQL Server

    + NHibernate • JavaScript + JQuery
  4. What’s my story? • JavaScript • Recruiting • Productive, less

    friction – Testing – Microservices – RabbitMQ, redis – Cross-platform
  5. 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
  6. • Backend API for SPAs, Mobile apps, etc. • “Serverless”

    computing • Real-time, streaming • WebSockets, push notifications • Chat, IM, social media • DevOps • Microservices Node.js Use Cases
  7. Node.js Use Cases • Backend API for SPAs, Mobile apps,

    etc. • “Serverless” computing • Real-time, streaming • WebSockets, push notifications • Chat, IM, social media • DevOps • Microservices
  8. More than just backend • Create Automation Scripts • Internet

    of Things • Create CLI tools using nexe • Create Desktop Apps
  9. Fandango • dramatically shorter development cycles • micro-services architecture •

    flexibility in deployment • easily scalable infrastructure “Fandango Goes Live with Node.js” – nearform.com
  10. • 2x faster development with fewer developers • 33% fewer

    lines of code • 40% fewer files • 2x improvement requests/sec • 35% decrease in avg response time
  11. • Black Friday, 2013 • Mobile platform • 200,000,000+ users

    • 10 CPU cores, 28 GB RAM • < 1% CPU utilization • Deployed updates
  12. Who else is using Node.js? • NASA • Netflix •

    Amazon • Medium • GE • Wordpress • CapitalOne • eBay • Target • Airbnb • Samsung • GoPro
  13. Installing Node.js Mac or Linux? Use nvm! https://github.com/creationix/nvm Windows? Use

    Chocolatey! https://chocolatey.org/ C:\> choco install nodejs.install > nvm install 8
  14. Deploying • Windows – iisnode for web apps – winser

    for services • Linux – forever • Docker
  15. Hosting Node.js on Azure • New Node JS Empty Site

    • Connect to repository • reverentgeek.com/hosting-node-js-on-microsoft-azure/
  16. Recommended toolbox Package What it do, yo lodash JavaScript utilities

    async async/parallel execution request, axios, or wreck http clients socket.io sockets, real-time jest, mocha, or lab test frameworks testdouble spies, stubs, mocks
  17. Node frameworks MVC • Express • hapi • koa •

    Meteor • Sails API • Restify • LoopBack nodeframework.com
  18. • 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
  19. 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
  20. Node.js Integration Strategies • Node.js as proxy or nginx •

    request module to call APIs • Messaging (e.g. RabbitMQ, ZeroMQ Azure Service Bus) • Edge.js for .NET