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

DDDSouthwest - JavascriptServices: Building Sin...

DDDSouthwest - JavascriptServices: Building Single Page Applications with ASP.NET Core

Sandeep Singh

May 06, 2017
Tweet

More Decks by Sandeep Singh

Other Decks in Technology

Transcript

  1. Modern Front-End 2017 Web Dev < 2009 Server Side JS

    CSS HTML JavaScript: TypeScript, ES2017, CoffeScript Libraries: Angular, React, Auerilia, VueJs, jQuery Architecture: Flux,Redux,MVC Build/Bundling: webpack, gulp/grunt, rollup Module loaders: ES6 imports, System.Js, AMD, CJS Package managers: npm, yarn, bower Challenges : Setup & tooling Database
  2. JavaScriptServices is a set of technologies for ASP.NET Core developers.

    It provides infrastructure that you’ll find useful if you use Angular 2 / React / Knockout / etc. on the client, or if you build your client-side resources using Webpack, or otherwise want to execute JavaScript on the server at runtime. “ ”
  3. > dotnet new --install Microsoft.AspNetCore.SpaTemplates::* > npm install -g yo

    generator-aspnetcore-spa > yo aspnetcore-spa Microsoft.AspNetCore.SpaTemplates
  4. § Slow initial load time § Better SEO § Enable

    content preview on social networks § Fall-back support for older browsers Server-side pre-rendering
  5. Routing helpers § Fall-back route § Handles 404 § Routing

    order matters Static files, MVC route, SPA fall-back § Not a silver bullet if client side routes complex e.g /test.sub
  6. Microsoft.AspNetCore.NodeServices NET Core Process § Fast and robust way to

    execute JS on server at runtime. § SpaServices use’s library to implement features. § Access to vast NPM ecosystem e.g. audio manipulation. § Can be used outside ASP.NET Core.
  7. Summary § SpaTemplates useful for rapid prototyping. § webpack great

    for streamlining DX. § NodeServices allows access to NPM and packages not available in dotnet ecosystem. § Can be used with existing single page application.