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.

3ab1249be442027903e1180025340b3f?s=128

David Neal

April 19, 2018
Tweet

Transcript

  1. 1.
  2. 3.

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

    be written in JavaScript (search for “jslinux”) Atwood’s Law:
  3. 5.
  4. 6.
  5. 7.
  6. 8.
  7. 9.
  8. 10.
  9. 11.

    Up Ahead • Why Node.js? • Crash course • Tools

    and frameworks • Integration strategies
  10. 12.
  11. 13.
  12. 14.
  13. 15.
  14. 16.
  15. 17.
  16. 18.
  17. 20.

    What’s my story? • ASP.NET MVC, C# • SQL Server

    + NHibernate • JavaScript + JQuery
  18. 21.
  19. 22.
  20. 23.

    What’s my story? • JavaScript • Recruiting • Productive, less

    friction – Testing – Microservices – RabbitMQ, redis – Cross-platform
  21. 24.
  22. 25.

    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
  23. 28.

    • 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
  24. 29.

    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
  25. 30.

    More than just backend • Create Automation Scripts • Internet

    of Things • Create CLI tools using nexe • Create Desktop Apps
  26. 32.

    Fandango • dramatically shorter development cycles • micro-services architecture •

    flexibility in deployment • easily scalable infrastructure “Fandango Goes Live with Node.js” – nearform.com
  27. 33.

    • 2x faster development with fewer developers • 33% fewer

    lines of code • 40% fewer files • 2x improvement requests/sec • 35% decrease in avg response time
  28. 34.

    • Black Friday, 2013 • Mobile platform • 200,000,000+ users

    • 10 CPU cores, 28 GB RAM • < 1% CPU utilization • Deployed updates
  29. 35.

    Who else is using Node.js? • NASA • Netflix •

    Amazon • Medium • GE • Wordpress • CapitalOne • eBay • Target • Airbnb • Samsung • GoPro
  30. 39.

    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
  31. 41.
  32. 67.
  33. 68.
  34. 69.
  35. 70.
  36. 71.
  37. 72.
  38. 73.
  39. 88.

    Deploying • Windows – iisnode for web apps – winser

    for services • Linux – forever • Docker
  40. 89.

    Hosting Node.js on Azure • New Node JS Empty Site

    • Connect to repository • reverentgeek.com/hosting-node-js-on-microsoft-azure/
  41. 90.

    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
  42. 91.

    Node frameworks MVC • Express • hapi • koa •

    Meteor • Sails API • Restify • LoopBack nodeframework.com
  43. 92.

    • 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
  44. 93.

    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
  45. 94.

    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
  46. 95.