5 ms·
One entry in this space that doesn't get a lot of attention is ASP.NET Blazor [1]. Blazor gives you the option of writing views in C# that will actually compile
by jolux 6y ago
One entry in this space that doesn't get a lot of attention is ASP.NET Blazor [1]. Blazor gives you the option of writing views in C# that will actually compile to WebAssembly and run in the browser, or run on the server and send DOM updates over a SignalR connection, a lot like LiveView.
[1] https://docs.microsoft.com/en-us/aspnet/core/blazor/ https://docs.microsoft.com/en-us/aspnet/core/blazor/
- catmanjan 6y agoLast time I looked it couldn't run in the browser, and there was no ETA, has that changed?
- unsignedint 6y agoAnd best of all, both Server and WebAssembly has a lot in common, so it is possible to make that movment as needed. (I often prototype in server, as it's a lot easier to debug, too!)
- kumarvvr 6y agoIf you are using Blazor Server, you don't have to even think about REST APIs. Depending on your app, that might be good or bad. But if you primarily target browsers on Desktop, you can tremendously improve productivity, because you can directly use C# POCO Models for UI and backend data services.
- ablekh 6y agoBlazor is certainly a very interesting and promising piece of technology. However, Blazor Server hosting mode is prone to latency issues and requires always-on connection to run an applications (so, no offline mode). On the other hand, the alternative Blazor WebAssembly mode requires clients to download a sizeable mix of .NET runtime and other system DLLs on the first use of the application (even a lightweight demo application with almost zero app-specific resources requires a download of 6+ MB of data in DEBUG mode and 2+ MB in RELEASE mode). Of course, relevant Microsoft teams work hard on further minimizing the size of the system bundle, but there are obvious limits to efforts in this regard.
- wyattpeak 6y agoIs offline mode widely used? I remember it being released to great excitement and then I never heard about it again. I assumed it died out when being offline became too much of an edge-case for your average user to be worth dealing with.
- jolux 6y agoAre the latency issues specific to Blazor Server or are they inherent in any framework that uses this pattern, like LiveView?
- kumarvvr 6y agoInherent in any framework that uses a connection to transmit diffed DOM nodes.
- Scarbutt 6y agoASP.NET core is still all the same over-engineered enterprise baggage you see in the Java world.
- tester756 6y agoWhat makes you think so? I'm actually curious
- jolux 6y agoAdmittedly I don't have a lot of experience with enterprise web development in Java but I love working with ASP.NET Core and I think it's come a long way since the mess of Web Forms and classic ASP.
- pcjthug 6y agoit smokes Spring in benchmarks, often by a factor of 10x or more, and on plaintext it's 50x faster than spring and even with the fastest Rust/C++ frameworks, so must be some awfully light baggage
- GordonS 6y agoIt's not. You can literally have a simple "hello world" app in a handful of lines or code if you want. I have to wonder if you actually use ASP.NET Core yourself, because ASP.NET Core 3 is, IMO, fantastic. ASP.NET used to be a bit clunky, and lacking in extensibility points, and a lot of people used alternatives like Nancy instead. Nancy officially stopped development around a year back, largely because dotnet devs just don't need it anymore. I was a long-time Nancy fan myself, ASP.NET Core 3 has all the best bits and more. And you don't need to stick with the typical paradigm on controllers in one folder, views in another etc - feature folders work great. Hell, you don't even really need to use controllers, if Razor Pages are your thing.
- cutler 6y agoBlazor currently has to ship its runtime over the wire so it's not an option for anything bandwidth constrained.
- jolux 6y agoNot if you use Blazor Server.
- kumarvvr 6y agoYup. Been using it for a very complex data app. Its awesome. You can choose Wasm for LOB apps or on fast connections. You can choose Server hosting for apps that have about 100,000 users at a time. Mind you, that is 100,000 users concurrently. Which should be more than enough for most apps. There are plans to reduce bundle size and server side resources, coming in .NET 5. As per Microsoft Benchmarks[1], it should cost about 100 USD per month (3 years, reserved instances, paid upfront) to handle 20,000 concurrent users. (This price is not including database, storage, etc). That comes to about 0.18 USD per user, for 3 years. (cost of serving app to 1 user for 3 years in total). Which seems pretty reasonable, especially if you have a decent, paid app. The cost comes down even more, if only a %age of your users are online concurrently. On Digital Ocean, a similar machine, would cost about 40 USD a month. For 3 years, total cost for 1 users will be 0.072 USD [1] - https://devblogs.microsoft.com/aspnet/blazor-server-in-net-core-3-0-scenarios-and-performance/ https://devblogs.microsoft.com/aspnet/blazor-server-in-net-c...