Node.js is a compelling platform that is quickly spreading from startups to the enterprise. As a .NET developer, why should you learn Node.js and where do you start? You will come away from this talk with the evidence and tools you need to be a productive Node.js developer. We'll walk through creating, debugging, and deploying a Node.js project to Microsoft Azure using the Node.js Tools for Visual Studio. We'll also look at popular frameworks and modules, and other learning resources.
7. Anything that can be
written in JavaScript…
…will eventually be written in JavaScript
– Somebody with incredible powers of observation
(e.g., search for“jslinux”)
17. Node.js is…
• blazing fast
• highly concurrent
• low-friction
• cross-platform
• modern web server
18. 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
19. • 2x faster development with fewer developers
• 33% fewer lines of code
• 40% fewer files
• 2x improvement requests/sec
• 35% decrease in avg response time
20. “We are seeing big scale gains, performance
boosts and big developer productivity.”
21. • Black Friday, 2013
• Mobile platform
• < 1% CPU utilization
• 200,000+ concurrent users
22. NBC Universal
• ASP.NET to Node.js
• 300 million page views/month
• Start render time: 8.8 to 1.3 seconds
• Page speed: 100+ to <10 seconds
NBC News, Today.com, CNN…
23. Who else is using Node.js?
• Dow Jones (WSJ)
• eBay
• Groupon
• LinkedIn
• Rdio
• Shutterstock
• The New York Times
• Uber
• Yammer
• Zendesk
nodjs.org/industry
24. Node.js Use Cases
• Single-page apps
• API server (REST, Hypermedia, etc.)
• Real-time, streaming, WebSockets
• Chat, IM, social media
• Dashboards
• Proxy service
In other words… the INTERNET
25. io.js
• Fork of node.js
• Latest Chrome V8, ES6
• Open governance
26. What’s our story?
• ASP.NET MVC, C#
• SQL Server + NHibernate
• JavaScript + JQuery
41. Deploying
• Don’t include node_modules folder
• …unless you create builds for specific targets
• Azure is super-easy
• Windows
– iisnode for web apps
– winser for services
• Linux – forever
42.
43.
44.
45.
46.
47. Hosting Node.js on Azure
reverentgeek.com/hosting-node-js-on-microsoft-azure/
48. 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
51. Edge.js
• 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
52. What can Edge.js do?
• Leverage existing .NET investment
• SQL Server (or other DBs)
• TFS, SharePoint, Exchange, etc.
• Active Directory
• Hardware (e.g. camera, microphone,
printer, win32)
• Video encoding, or other CPU-intensive
work
• Powershell