4 ms·
You can already do that by running Node with SSR (or any npm/js code) in .NET using Node Services [1] or use ReactJS.NET that packages everything for you [2].
by manigandham 6y ago
You can already do that by running Node with SSR (or any npm/js code) in .NET using Node Services [1] or use ReactJS.NET that packages everything for you [2].
But Microsoft won't officially do any more since they have Blazor which lets you run C#/.NET in the browser with both client-side WASM and server-side SignalR/websocket running modes. It's much more advanced and functional than React already. [3]
1. https://channel9.msdn.com/Events/ASPNET-Events/ASPNET-Fall-Sessions/ASPNET--Spa https://channel9.msdn.com/Events/ASPNET-Events/ASPNET-Fall-S... 2. https://reactjs.net/ https://reactjs.net/ 3. https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor
- dmitryminkovsky 6y agoVery cool, thank you for sharing. > It's much more advanced and functional than React already. I’m sure this is true, but I can’t imagine there’s much of a community around it? The thing is with React you have a huuuuuuge community and ecosystem. You can share code with React Native. It’s so deep...
- manigandham 6y agoWell Blazor is new so React will have a bigger community, however there are millions of C# devs around the world and they can be instantly productive with Blazor so it shouldn't be that far behind, if at all. While React's ecosystem might be huge, the quality trails off quickly and it's pretty messy even with the popular stuff, much of which is to add functionality that every app needs but isn't included in React itself. Blazor already comes with everything included, but can also use the full power of C#, the massive standard library, plenty of 3rd-party packages, and the tight integration with the backend. I suggest looking at some of the Blazor presentations (by Steven Sanderson the original creator) to get a sense of just how quickly you can build: 1. https://www.youtube.com/watch?v=Khn7sDUSEJM https://www.youtube.com/watch?v=Khn7sDUSEJM 2. https://www.youtube.com/watch?v=QnBYmTpugz0 https://www.youtube.com/watch?v=QnBYmTpugz0 3. https://www.youtube.com/watch?v=kLhoRyLxwAE https://www.youtube.com/watch?v=kLhoRyLxwAE
- thdrdt 6y agoI like Blazor, but to be fair, coming from VueJs, it feels not finished. Some things are just more complicated that they should be. But things are changing, so we will see what happens in the next releases.
- mattferderer 6y agoSadly Node Services has gone the way of the Dodo bird. I'm not aware of any replacement. https://github.com/dotnet/aspnetcore/issues/12890 https://github.com/dotnet/aspnetcore/issues/12890
- manigandham 6y agoYea I'm in that thread. It's no longer maintained by Microsoft but the code still exists and runs just fine, and there's not much to maintain other than keeping up with the Node releases and API changes. The closest community project is https://github.com/JeringTech/Javascript.NodeJS https://github.com/JeringTech/Javascript.NodeJS and should be a drop-in replacement for `INodeServices` If you just want V8/JS scripting then there's https://github.com/microsoft/ClearScript https://github.com/microsoft/ClearScript
- mattferderer 6y agoHave you used it by chance with .NET Core 3 or .NET 5? I was considering using it for some tooling during the build process without using Node.
- manigandham 6y ago.NET Core 3 can still use the existing NodeServices package, it'll just show `obsolete` warnings. Haven't tried with .NET 5 yet but will probably switch to that first linked package.
- cutler 6y agoBlazor is currenlty hobbled by having to haul its runtime across the wire and is thus not in a position to compete with React or Vue.
- manigandham 6y agoThe server-side model doesn't have this issue and the client-side WASM model is brand new with the first production release a month ago so it will get better soon. The browser runtime is trimmed down to the APIs actually used, has dynamic async loading now, and it's around the 1.5MB mark which is competitive with the big SPA payloads.
- cutler 6y agoBut those "big SPA payloads" contain the whole app. With Blazor you incur a 1.5Mb overhead before you've written any app code. That's simply unacceptable on many devices so Blazor's current implementation is only relevant for internal apps.
- manigandham 6y agoSame with Blazor. The mon.wasm runtime is around 400kb compressed and the biggest DLL is mscorlib at 600kb. The actual DLLs for the app are just a few kb. Here's a very old build: https://blazor-demo.github.io/ https://blazor-demo.github.io/ And a recent build: https://stevesandersonms.github.io/BlazorOnGitHubPages/ https://stevesandersonms.github.io/BlazorOnGitHubPages/ Yes you can be smaller with JS but not by much these days, and given the amount of functionality you get with Blazor it's hard to compare on file size alone. Also if you're just making internal apps with controlled usage then server-side is better anyway.