News for hackers. Stuff that matters.
Re:.NET Orleans by manigandham on Monday October 05, 2020 @08:47PM (#24693739)
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-S... 2. https://reactjs.net/ 3. https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor

Re:.NET Orleans by cutler on Monday October 05, 2020 @11:42PM (#24694512)
Blazor 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.
Re:.NET Orleans by manigandham on Tuesday October 06, 2020 @12:48AM (#24694780)
The 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.

Re:.NET Orleans by cutler on Tuesday October 06, 2020 @01:19AM (#24694930)
But 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.
Re:.NET Orleans by manigandham on Tuesday October 06, 2020 @01:24AM (#24694955)
Same 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/

And a recent build: 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.

Re:.NET Orleans by dmitryminkovsky on Monday October 05, 2020 @08:55PM (#24693780)
Very 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...

Re:.NET Orleans by manigandham on Monday October 05, 2020 @09:28PM (#24693937)
Well 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 2. https://www.youtube.com/watch?v=QnBYmTpugz0 3. https://www.youtube.com/watch?v=kLhoRyLxwAE

Re:.NET Orleans by thdrdt on Tuesday October 06, 2020 @01:24AM (#24694957)
I 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.
Re:.NET Orleans by mattferderer on Monday October 05, 2020 @09:24PM (#24693911)
Sadly Node Services has gone the way of the Dodo bird. I'm not aware of any replacement.

https://github.com/dotnet/aspnetcore/issues/12890

Re:.NET Orleans by manigandham on Monday October 05, 2020 @10:08PM (#24694125)
Yea 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 and should be a drop-in replacement for `INodeServices`

If you just want V8/JS scripting then there's https://github.com/microsoft/ClearScript

Re:.NET Orleans by mattferderer on Monday October 05, 2020 @10:49PM (#24694316)
Have 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.
Re:.NET Orleans by manigandham on Tuesday October 06, 2020 @12:02AM (#24694576)
.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.