Building Single-Page Applications with ASP.NET Core

Download this episode

Download Video

Description

I had the privilege of spending some time with Steve Sanderson while he was on a brief stint on the Redmond Campus. In this video we took a look at the ASP.NET Core templates for Angular, React, and others. Some of the interesting features of the templates include hot module replacement (HMR), server-side pre-rendering, and production builds.

Some useful links:

Enjoy!

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      malshep

       The second link is returning a yellow screen of death.

    • User profile image
      exim

      So glad that I'm not a web developer nowadays :)

    • User profile image
      spottedmah

      @exim: haha, I feel you!

    • User profile image
      Joe

      why do this. Use angular. MVC is deprecated for SPA or web development. It's great for Web.Api, but angular cli is the way to go nowdays.

    • User profile image
      Fscopel

      @exim @spottedmah what!? are you guys kidding me!? Web development is so exciting!  There are indeed a boat load of options, but pick your poison and build your stuff.  The web is getting better and better. I honestly think it is a great area in CS to be in, both when it comes to the fun of it and as an area of work. :)

    • User profile image
      koo9koo9

      mvc seems unnecessary with Ng or react. with these client side UI frameworks, web api/node.js + UI framework will be way to go.

    • User profile image
      sethjuarez

      @malshep:fixed!

    • User profile image
      idflyfish

      What a great video! Steve is awesome, I always enjoy his stuff. 

      Seth, great questions! It is like you were reading my mind!

       

    • User profile image
      WizarrC

      I was able to use the redux store in Angular 2+ and now get most state restored after an HMR update. Really good stuff there.

      @koo9koo9 & Joe: It depends. node.js is pretty slow for webapi, but it does allow for programming both front and backend in the same language and works nice with the angular cli. Also, the one language to rule them all philosophy is very powerful. If you like or already know C# and asp.net technologies then this is a decent bridge that is better performant for the backend. Unfortunately, types are not universal between the backend (c#) and frontend (Typescript) and often requires copy & paste and then fidgeting the model layer code.

      @sethjuarez Would be nice to have automatic Typescript codegen for simple C# classes to Typescript interfaces. Much needed for webapi calls.

      What I would really be interested in is a new c# like language (c# subset) that compiles down to C# and Typescript instead of just IL/Native. That might be troublesome due to the lack of union types and non-nullability in c# to have a native feel in Typescript. An alternative would be to have Typescript compile down to dotnet IL. A Typescript.NET Language? If that ever happens, I would imagine a Microsoft XAML based SPA would be plausible. Google announced their own language technology for JVM (Java)/JavaScript with Kotlin so I know this stuff is doable.

    • User profile image
      WizarrC

      I would also like to add that for anyone out there using the Node or JavaScript Services packages before, it has gotten a lot better over time. Also want to note that I had an issue during the early stages of the package trying to AOT an angular package and node.js was totally freezing on me. First thing I wanted to do was debug server-side node.js via the JavaScript services package. That seems like quite a niche thing to do and couldn't get it to work. I posted my issue on GitHub and Steve Sanderson was quite responsive and helpful, found the issue I was having and issued a patch the next day with a Nuget package to follow immediately. That man is a rock star in my book.

    • User profile image
      vvilelaj

      Great video... it helps me so much to begin with angular2 in visual studio.

      Thantks from Peru.

    Add Your 2 Cents