Replies

This profile is from a federated server and may be incomplete. Browse more on the original instance.

jasonbock, to random
@jasonbock@mstdn.social avatar

Just saw a very weird issue with C# source generators in Rider.

  • Reference a NuGet package that does source generation
  • Write code that will trigger the generation of source.

What happens is that Rider doesn't "see" the new generated type, BUT, a build works, and the test runs as well.

The only way my co-worker got around this was to use EmitCompilerGeneratedFiles. (I don't use Rider, I use VS, and everything works fine there).

Tagging @khalidabuhakmeh for visibility.

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@jasonbock are the packages by any chance targeting a newer or release version of .NET? A reproduction would be helpful.

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@jasonbock I'll have a look tomorrow and report back. If I can repro I'll enter a ticket.

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@jasonbock Works on my machine. Make sure your friend is using the latest version of JetBrains Rider.

Iโ€™m using JetBrains Rider 2024.1.2.

Rocks Mocking library working in JetBrains Rider.

khalidabuhakmeh, to random
@khalidabuhakmeh@mastodon.social avatar

Every few months, I come back to rewriting a app in , sometimes it's with Blazor, sometimes it's Razor Pages, and this time with (although I may have already done HTMX ๐Ÿ˜…)

I got some quality-of-life improvement issues entered to help make better, too. So that's a win!

Htmx-powered todo app.

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@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 in helpful ways that I haven't seen in other ecosystems. (1/3)

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar
  1. โ€œ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)

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar
  1. โ€œ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)

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@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.

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@jonstj
@egil is also trying something with Htmxor if you want to see how he does it.

I like where heโ€™s going with it, and heโ€™s trying to address some of the issues I outlined.

https://github.com/egil/Htmxor

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@egil @brtkdotse Iโ€™ll give it a shot next week :)

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@egil @jonstj It would be really neat if there was a way that Razor allowed you to create your own โ€œ@โ€œ declarations.

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@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.

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@egil @brtkdotse I got it running, but I think I am probably doing a few things wrong. ๐Ÿ˜…

Blazor Todo App with Htmxor

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@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.

https://github.com/khalidabuhakmeh/HtmxorTodoApp

mistersql, to python
@mistersql@mastodon.social avatar

Gotta catch up on mocking with at
When I ask the bots to write unit tests, they use ALL the mocking libraries,

The theme at the talk is mocking using unittest the built in way.

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar
aer, to random
@aer@freeradical.zone avatar

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

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@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.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • โ€ข
  • anitta
  • rosin
  • InstantRegret
  • ethstaker
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • GTA5RPClips
  • slotface
  • Durango
  • khanakhh
  • kavyap
  • megavids
  • everett
  • vwfavf
  • Leos
  • osvaldo12
  • cisconetworking
  • cubers
  • modclub
  • ngwrru68w68
  • tacticalgear
  • provamag3
  • normalnudes
  • tester
  • JUstTest
  • All magazines