News for hackers. Stuff that matters.
Re:.NET MAUI: .NET Multi-Platform App UI by bob1029 on Tuesday April 20, 2021 @09:48PM (#26884486)
The entire point is to avoid javascript as much as possible and to force the few edge cases into an interop shim.

We have a very complex Blazor webapp and the JS interop shim is fewer than 200 lines of code. This is 100% of the custom javascript for the entire application. Front and back. We do things like GetClientRect, Get/Set/Delete cookies, keyboard/mouse event subscription, etc.

There is little-to-no context switching when operating with one of these codebases. The notion of "front-end" and "back-end" is completely meaningless here. The "back-end" is literally an F12 keystroke away from the "front-end".

> and very difficult to debug production issues with in my experience

What sort of production issues have you been encountering that were difficult to track down? I rather enjoy being able to set breakpoints in my view templates to confirm the state of affairs in local testing.

Re:.NET MAUI: .NET Multi-Platform App UI by mumblemumble on Tuesday April 20, 2021 @09:56PM (#26884538)
> The notion of "front-end" and "back-end" is completely meaningless here.

So to start with, a disclaimer: I carry some baggage here, from working occasionally on 10+ year old GWT app that's developed into quite a tangled mess.

Having said that -- this sort of thing doesn't seem like an obvious win to me. The notion of "front end" and "back end" represents a real-world distinction that you want to pay attention to. Making it too hard to see, or too easy to communicate across, brings some risk of losing track of which is which, and putting logic that belongs on the server into the client or vice versa. Or having the two communicate with each other much too often, which may not cause any noticeable problems during development, but, in production, can cripple the site for users with higher-latency Internet connections.

Re:.NET MAUI: .NET Multi-Platform App UI by manigandham on Wednesday April 21, 2021 @04:08AM (#26886680)
Blazor has two modes: Blazor client-side is C# code running on a WASM dotnet runtime. It does have the frontend/backend split. Data still has to be serialized (as HTTP calls since that's all a browser can do) but it's done using the same classes & libraries as on the backend.

Blazor server-side has no distinction though because everything is running on the server, and the UI is just a thin stream of HTML updates.

The model you choose is up to you based on resources, latency requirements, payload size, etc. Blazor just gives you more ways to get things done.

Re:.NET MAUI: .NET Multi-Platform App UI by sk5t on Tuesday April 20, 2021 @10:34PM (#26884796)
Ditto, I've no desire at all for web applications--or heaven forbid clients--to poke directly at a database or cache, or otherwise obviate the need for APIs. One will need to deploy, scale, monitor, and secure those things very differently from one another.
Re:.NET MAUI: .NET Multi-Platform App UI by bob1029 on Tuesday April 20, 2021 @10:45PM (#26884860)
We use SQLite for storage of all things. The entire application lives on a single machine.

   OurApp.exe: 
   SQLite <-> C# Services <-> Razor Components
When you have a stack like this, Blazor goes into additional dimensions of productive. Every F5 of the app is a complete stack running without any frustration in setting up databases, containers, message buses, etc. None of the concerns regarding scalability apply when you plan to go vertical.

I would not currently argue for developing blazor server apps as a replacement for 100% of web applications. But, there are situations where you have a constrained user base and predictable performance characteristics which provides enough confidence to go all-in on a single fast box.

Re:.NET MAUI: .NET Multi-Platform App UI by virtualwhys on Wednesday April 21, 2021 @01:49AM (#26885841)
Not familiar with .NET, but am intrigued by the Sqlite all-the-things bit -- can you run your LINQ queries client-side? (e.g. for offline capable apps)
Re:.NET MAUI: .NET Multi-Platform App UI by bob1029 on Wednesday April 21, 2021 @04:28AM (#26886802)
We use the Blazor Server hosting model, which is inherently incapable of running offline. For our specific use case, this is actually more ideal than any notion of offline capability. In this model, any LINQ would be running on the server.

Now, you certainly can run LINQ client-side if you were on a Blazor WASM (or hypothetically, Desktop) application. This is kind of the entire point of the stack.

Re:.NET MAUI: .NET Multi-Platform App UI by littlecranky67 on Wednesday April 21, 2021 @04:26AM (#26886794)
LINQ is built into the core .NET runtime (and the syntax into C#) and available everywhere (I think LINQ was introduced with .NET 4 and C# 3.0 some >10 years ago). So doesn't matter if client/server or blazor. But you need some kind of LINQ-to-your-datasource adapter (i.e. to Sqlite, MongoDB etc.) which might have different availability depending on your environment (i.e. a Sqlite adapter would clearly somehow depend on a native sqlite client - but AFAIK is available in Blazor through WebAssembly).
Re:.NET MAUI: .NET Multi-Platform App UI by wokwokwok on Wednesday April 21, 2021 @05:49AM (#26887376)
> I rather enjoy being able to set breakpoints in my view templates to confirm the state of affairs in local testing.

That’s a local development environment.

Have you had similar experiences when dealing with deployed applications? How did you do it? It’s rather more difficult when, eg. You can’t have a copy of visual studio there to use on your production deployments.