News for hackers. Stuff that matters.
Re:.NET 5.0 – New APIs by atraac on Tuesday September 22, 2020 @06:07PM (#24560543)
I worked for two consultancies that basically created apps for multiple startups and we used .NET Core in almost all projects. I don't really have comparison because besides simple, personal Django projects I never had much experience with Python but I find .NET Core actually enjoyable(I come from Android Java/Kotlin world). I don't like the community which is, mostly still stuck in the enterprise(though that's changing alowly) and often feels like an MS cult, but otherwise, there's nothing bad I could really say about .NET. Especially when paired with Azure ecosystem, it's really easy do develop and deploy, it's really fast, easy to work with thanks to Entity Framework and stuff like LINQ, there's a lot of choice in libraries. Some are still stuck in .NET Framework(Windows) world, but most of Nugets already implement at least netstandard2.0 which allows you to use them with Core. In overall, especially now with Blazor becoming a thing, I'd recommend at least trying it out.
Re:.NET 5.0 – New APIs by ablekh on Tuesday September 22, 2020 @06:19PM (#24560655)
I appreciate your prompt feedback with interesting details. Re: Blazor - while it's definitely a promising technology, I'm not sure how suitable it is for building SPAs. One potential issue that I can see is quite limited (and IMO very expensive, e.g.: https://www.syncfusion.com/sales/products/blazor) UI components ecosystem, when compared to the React/Vue/Angular one (I plan on using Vue).
Re:.NET 5.0 – New APIs by sunnyP on Tuesday September 22, 2020 @06:54PM (#24560960)
You might qualify for the Syncfusion Community License: https://www.syncfusion.com/products/communitylicense

Radzen also has a component library available: https://blazor.radzen.com/

https://abp.io/ recently added Blazor to their framework that you might want to check out.

Re:.NET 5.0 – New APIs by ablekh on Tuesday September 22, 2020 @07:37PM (#24561304)
Thank you for your advice. The Syncfusion Community License is certainly interesting and I will keep it in mind (as well as Radzen). Though, frankly, I don't like these "lure into an ecosystem/platform/product with free goodies and then lock in to a very expensive deal" approaches. I prefer a decent progressive pricing tiers model. Re: ABP and Blazor - yes, I read about that, but I think that it is still an experimental feature: https://github.com/abpframework/abp/issues/394.
Re:.NET 5.0 – New APIs by atraac on Wednesday September 23, 2020 @05:17AM (#24564800)
I didnt specify but we actually mostly use server side Blazor for now. The only issue with it so far is lack of proper hot reload which is annoying but manageable. Otherwise, it's really great. It's kinda an equivalent of Phoenix' LiveView. You only really send diffs over the wire, everything happens on the server, code sharing is very easy and makes developing very, very fast. Sure, SignalR might not be that scalable but IMO unless you're a giant with tens of thousands of active users at any given moment, I wouldn't care.
Re:.NET 5.0 – New APIs by ablekh on Wednesday September 23, 2020 @12:44PM (#24568984)
Interesting and good to know. Thank you for your additional clarifications. I would love to get my hands dirty with Blazor and many other technologies. The problem with being a very early-stage startup, despite being very tempting to jump the cutting edge bandwagon and (try to) use as many cool technologies as you can get your hands on, is to keep in mind the importance of risk management. More often than not, it makes sense to select a "boring" technology stack (http://boringtechnology.club), at least, for all or certain foundational layers or components of the larger system.
Re:.NET 5.0 – New APIs by cutler on Tuesday September 22, 2020 @06:18PM (#24560636)
I don't quite get the hype around Blazor. Great idea but the implementation is a non-starter considering it has to send a whole runtime over the wire.
Re:.NET 5.0 – New APIs by manigandham on Wednesday September 23, 2020 @12:42AM (#24563047)
Blazor is the first frontend component model framework built for the web that isn't older server-side templating and also not Javascript. Using a strong typed language like C# makes it very fast and productive, especially when reusing the same code and libraries with your server backend (something that was touted with node/JS but has been weighed down by the chaos of the JS ecosystem).

Blazor can also run in 2 modes:

1) server-side where the UI is controlled by a websocket (via SignalR) connection to the backend which processes all the logic. Developing complex interfaces becomes much easier because everything runs on the server and the distance between a database query and UI update is very short. Save the verbose JS->API->Backend layers of code.

2) client-side which uses cutting edge WebAssembly to run your app. The WASM version is getting smaller and faster with every release and isn't much bigger than your standard big SPA which also has megabytes of javascript these days. It has a great JSON library and can also support GRPC-Web now for easy RPC.

Re:.NET 5.0 – New APIs by kords on Wednesday September 23, 2020 @02:32AM (#24563666)
Typically modules come with their own contracts. Even in the backend by itself, we see same class definition as a model, as an entity and as a business object. OOP also had goals regarding reusability (see criticism section - https://en.wikipedia.org/wiki/Object-oriented_programming). Reusing the same code is hard.
Re:.NET 5.0 – New APIs by manigandham on Wednesday September 23, 2020 @02:42AM (#24563714)
True, but it's much harder in some languages than others, and much much harder when crossing language boundaries.

Copying a C# class to use as a DTO from a database entity is way faster than trying to worry about serializing to a JSON structure while maintaining all the fidelity (like dates, big ints, binary data, etc).

Another example is reusing business logic like validation for data input. Blazor lets you use a single layer of logic instead of using JS-based simple validation on the form and more detailed checks on the server.

Re:.NET 5.0 – New APIs by bob1029 on Tuesday September 22, 2020 @06:46PM (#24560897)
We use it in server-side mode (no WASM assembly to deliver). SSB is incredible for apps where you are expecting a well-bounded number of concurrent users.

We use it for internal business dashboards and devops management tools. The ability to inject & use existing .NET services is pretty incredible in terms of productivity. We now maintain a monorepository because of this reuse potential.

https://docs.microsoft.com/en-us/aspnet/core/blazor/hosting-...

Re:.NET 5.0 – New APIs by JamesBarney on Wednesday September 23, 2020 @12:27AM (#24562975)
It's amazing. I've been using server side blazor and it's been quick to develop, performant for users, and more interactive than SSR.

Down side is scaling, but I mostly write B2B apps. And by the time you run into scaling issues in B2B SaaS someone's rich.