Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
MILAN november 28th/29th 2014 - @imperugo 
Ugo Lattanzi 
NodeJs for .NET Web developers and vice versa: 
Meet the Dark Sid...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
What is node? 
Node.js® is a platform built on Chrome's JavaScript runtime f...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
What can I do with 
Node? 
Http, networking, Websockets but also it is an in...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
Why is it so cool? 
it’s javascript 
it’s fast 
optimised (low resources) 
r...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
but it’s also for nerd!
MILAN november 28th/29th 2014 – Ugo Lattanzi 
everybody loves it … 
except Ted Dziuba, he defined “Node Js a cancer” 
http...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
Node vs .NET 
IIS => Node.exe 
C# / VB => Javascript 
NuGet => npm 
ASP.NET ...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
Visual Studio 
addicted? 
don’t worry, there is a free and open source plugi...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
Async
MILAN november 28th/29th 2014 – Ugo Lattanzi 
Async 
http://www.toptal.com/nodejs/why-the-hell-would-i-use-node-js
MILAN november 28th/29th 2014 – Ugo Lattanzi 
Async 
http://www.toptal.com/nodejs/why-the-hell-would-i-use-node-js
MILAN november 28th/29th 2014 – Ugo Lattanzi 
Async
MILAN november 28th/29th 2014 – Ugo Lattanzi 
Let’s start
MILAN november 28th/29th 2014 – Ugo Lattanzi 
express.js 
npm init 
npm install express —save 
npm install vash —save
MILAN november 28th/29th 2014 – Ugo Lattanzi 
express.js 
package.json is the same thing of packages.config in nuget and n...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
express.js
MILAN november 28th/29th 2014 – Ugo Lattanzi 
express.js
MILAN november 28th/29th 2014 – Ugo Lattanzi 
express.js / aspnet 
Controllers 
Model 
Views 
public ??
MILAN november 28th/29th 2014 – Ugo Lattanzi 
express.js
MILAN november 28th/29th 2014 – Ugo Lattanzi 
vash (@razor) 
Vash is a template engine that offers a swift flow between co...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
vash (@razor)
MILAN november 28th/29th 2014 – Ugo Lattanzi 
vash (@razor) 
partials are simple html files in the view folder 
to include...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
vash (@razor)
MILAN november 28th/29th 2014 – Ugo Lattanzi 
express.js 
How to manage 404 and 500? 
add your view to the end of routing ...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
express.js
MILAN november 28th/29th 2014 – Ugo Lattanzi 
express.js (API) 
It’s very similar to render view but without the render co...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
express.js (API)
MILAN november 28th/29th 2014 – Ugo Lattanzi 
express.js 
(validation) 
there isn't data annotation so validation is more ...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
express.js 
(validation)
MILAN november 28th/29th 2014 – Ugo Lattanzi 
express middleware 
npm install body-parser —save 
npm install compression —...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
database 
of course you can use MS Sql Server (npm install mssql —save) 
but...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
database
MILAN november 28th/29th 2014 – Ugo Lattanzi 
database
MILAN november 28th/29th 2014 – Ugo Lattanzi 
edge.js 
An edge connects two nodes. This edge connects Node.js and .NET. V8...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
edge.js
MILAN november 28th/29th 2014 – Ugo Lattanzi 
edge.js
MILAN november 28th/29th 2014 – Ugo Lattanzi 
Node vs .NET 
C# => NodeJs 
F# => NodeJs 
Python => NodeJs 
TSQL => NodeJs 
...
MILAN november 28th/29th 2014 – Ugo Lattanzi 
slide and demo 
http://tostring.it (next days)
MILAN november 28th/29th 2014 – Ugo Lattanzi 
Q/A
MILAN november 28th/29th 2014 – Ugo Lattanzi
Upcoming SlideShare
Loading in …5
×

Nodejs for .NET web developers

5,473 views

Published on

The slides used during the talk "NodeJS for .NET Web Developers" from the Codemotion Conference (http://www.codemotionworld.com/) on the 28 November in Milan.

Published in: Technology

Nodejs for .NET web developers

  1. 1. MILAN november 28th/29th 2014 - @imperugo Ugo Lattanzi NodeJs for .NET Web developers and vice versa: Meet the Dark Side of development Head of Technologies at Gaia (http://gaia.is.it) @imperugo imperugo@gmail.com http://tostring.it
  2. 2. MILAN november 28th/29th 2014 – Ugo Lattanzi What is node? Node.js® is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
  3. 3. MILAN november 28th/29th 2014 – Ugo Lattanzi What can I do with Node? Http, networking, Websockets but also it is an invaluable tool for developers
  4. 4. MILAN november 28th/29th 2014 – Ugo Lattanzi Why is it so cool? it’s javascript it’s fast optimised (low resources) runs everywhere
  5. 5. MILAN november 28th/29th 2014 – Ugo Lattanzi but it’s also for nerd!
  6. 6. MILAN november 28th/29th 2014 – Ugo Lattanzi everybody loves it … except Ted Dziuba, he defined “Node Js a cancer” http://teddziuba.com/2011/10/node-js-is-cancer.html (post removed)
  7. 7. MILAN november 28th/29th 2014 – Ugo Lattanzi Node vs .NET IIS => Node.exe C# / VB => Javascript NuGet => npm ASP.NET WebForm => Express + EJS ASP.NET MVC => Express + Vash ASP.NET WebAPI => Express SignalR => Socket.io
  8. 8. MILAN november 28th/29th 2014 – Ugo Lattanzi Visual Studio addicted? don’t worry, there is a free and open source plugin (NTVS) that turns Visual Studio into a Node.js IDE http://nodejstools.codeplex.com/ NTVS supports Editing, Intellisense, Profiling, npm, TypeScript, Debugging locally and remotely (Windows/MacOS/Linux), as well as Azure Web Sites and Cloud Service.
  9. 9. MILAN november 28th/29th 2014 – Ugo Lattanzi Async
  10. 10. MILAN november 28th/29th 2014 – Ugo Lattanzi Async http://www.toptal.com/nodejs/why-the-hell-would-i-use-node-js
  11. 11. MILAN november 28th/29th 2014 – Ugo Lattanzi Async http://www.toptal.com/nodejs/why-the-hell-would-i-use-node-js
  12. 12. MILAN november 28th/29th 2014 – Ugo Lattanzi Async
  13. 13. MILAN november 28th/29th 2014 – Ugo Lattanzi Let’s start
  14. 14. MILAN november 28th/29th 2014 – Ugo Lattanzi express.js npm init npm install express —save npm install vash —save
  15. 15. MILAN november 28th/29th 2014 – Ugo Lattanzi express.js package.json is the same thing of packages.config in nuget and npm install restore the missing packages
  16. 16. MILAN november 28th/29th 2014 – Ugo Lattanzi express.js
  17. 17. MILAN november 28th/29th 2014 – Ugo Lattanzi express.js
  18. 18. MILAN november 28th/29th 2014 – Ugo Lattanzi express.js / aspnet Controllers Model Views public ??
  19. 19. MILAN november 28th/29th 2014 – Ugo Lattanzi express.js
  20. 20. MILAN november 28th/29th 2014 – Ugo Lattanzi vash (@razor) Vash is a template engine that offers a swift flow between code and content using Razor Syntax it supports master pages, partial, helpers and so on it isn’t a porting of Razor View Engine but is very similar the file extension for the views is .vash
  21. 21. MILAN november 28th/29th 2014 – Ugo Lattanzi vash (@razor)
  22. 22. MILAN november 28th/29th 2014 – Ugo Lattanzi vash (@razor) partials are simple html files in the view folder to include a partial in your view all you have to do is @html.include(‘name_of_the_partial’)
  23. 23. MILAN november 28th/29th 2014 – Ugo Lattanzi vash (@razor)
  24. 24. MILAN november 28th/29th 2014 – Ugo Lattanzi express.js How to manage 404 and 500? add your view to the end of routing :-)
  25. 25. MILAN november 28th/29th 2014 – Ugo Lattanzi express.js
  26. 26. MILAN november 28th/29th 2014 – Ugo Lattanzi express.js (API) It’s very similar to render view but without the render command :)
  27. 27. MILAN november 28th/29th 2014 – Ugo Lattanzi express.js (API)
  28. 28. MILAN november 28th/29th 2014 – Ugo Lattanzi express.js (validation) there isn't data annotation so validation is more "challenging" than .net express-validator is a cool middleware for Express.Js that helps you to validate input data npm install express-validator —save
  29. 29. MILAN november 28th/29th 2014 – Ugo Lattanzi express.js (validation)
  30. 30. MILAN november 28th/29th 2014 – Ugo Lattanzi express middleware npm install body-parser —save npm install compression —save npm install cookie-parser —save npm install express-mailer —save npm install express-session —save
  31. 31. MILAN november 28th/29th 2014 – Ugo Lattanzi database of course you can use MS Sql Server (npm install mssql —save) but MongoDb “could be better” with Node (npm install mongodb —save)
  32. 32. MILAN november 28th/29th 2014 – Ugo Lattanzi database
  33. 33. MILAN november 28th/29th 2014 – Ugo Lattanzi database
  34. 34. MILAN november 28th/29th 2014 – Ugo Lattanzi edge.js An edge connects two nodes. This edge connects Node.js and .NET. V8 and CLR/Mono - in process. On Windows, MacOS, and Linux.
  35. 35. MILAN november 28th/29th 2014 – Ugo Lattanzi edge.js
  36. 36. MILAN november 28th/29th 2014 – Ugo Lattanzi edge.js
  37. 37. MILAN november 28th/29th 2014 – Ugo Lattanzi Node vs .NET C# => NodeJs F# => NodeJs Python => NodeJs TSQL => NodeJs Powershell => NodeJs
  38. 38. MILAN november 28th/29th 2014 – Ugo Lattanzi slide and demo http://tostring.it (next days)
  39. 39. MILAN november 28th/29th 2014 – Ugo Lattanzi Q/A
  40. 40. MILAN november 28th/29th 2014 – Ugo Lattanzi

×