Every few months, I come back to rewriting a #todo app in #aspnetcore, sometimes it's with Blazor, sometimes it's Razor Pages, and this time with #Htmx (although I may have already done HTMX ๐ )
I got some quality-of-life improvement issues entered to help make #JetBrainsRider better, too. So that's a win!
@jonstj Woah, a lot of questions. Iโll answer them one at a time. 1. โDo you consider Razor Page with HTMX the best production-ready tech stack for HTMX-powered SSR web?โ I think Razor Pages and MVC are great options, and they give you the most control over the HTTP response (which is essential to get the most out of HTMX). My HTMX.NET library is designed to work with #aspnetcore in helpful ways that I haven't seen in other ecosystems. (1/3)
โRazor components and Minimal API a better choice?โ
No, I donโt think so, because Minimal APIs were designed for JSON responses first and foremost. While they can support HTML responses, they lack the view resolution and reuse that makes MVC and Razor Pages โbetterโ imho. Also Razor Pages and MVC have link generation which Blazor does not. Youโll end up hardcoding a lot of URLs in Razor components which will lead to a big headache when refactoring. (3/3)
โWill RP be discontinued?โ MS support might dwindle, but itโs in a good spot today and wonโt be ripped out anytime soon. Maybe Blazor will get there someday, but right now, Blazor still lacks features that I think make it frustrating to use.
In general, I think the UI story in .NET is its weakest case, and the adoption of SPA libraries like Vue, React, and Angular in the space signals a big marketing/user problem in general. (2/3)
@jonstj Iโve seen this sample before. Itโs neat, but you soon start filling in all the gaps yourself, and that to me is no fun. Adding Endpoint names, injecting dependencies, and messing with conventions gets tiring (imho).
That said, itโs your app and you have to maintain and be happy with it.
@egil@jonstj Actually, one of my biggest gripes with Razor as a whole is its lack of pre and post-processing hooks.
It would be great if there was a way to process the HTML produced by views to enhance it, or to pre-process the Razor to inject things. Right now you have to have something in the views themselves to do anything, which is not always good.
@egil@brtkdotse I started with a โBlazor Web Appโ template from the dotnet templates and tried to create a working sample app. I probably got a few things wrong, so thereโs room for improvement.
If you want to review on a stream, we can do that.
It still feels like Blazor and Htmx are on different sides of the spectrum to me, but thatโs just my opinion.
I'm really glad console makers seem to be done with exclusivity
It made sense back when one console ran fukn MIPS and the other ran a deranged PowerPC config and another has an arcane DSP GPU with a Gameboy strapped to it
But now everything is literally just an x86 box made by AMD, except the Switch which is just an Nvidia Shield.
If they needed exclusives to sell their identical boxes the real answer isn't that exclusives are a valid choice, it's that consoles are kind of dumb now
@aer Yeah, Iโm not sure whatโs going to happen to the industry.
I swear I saw that 80% of the gaming industries profits come from mobile games and โwhalesโ (folks who have a mental disposition to addiction). So itโs not going to be good.
I want more creators to have control and to have smaller experiences myself. I only have a few hours to play anything becauseโฆ Iโm old.