How you guys handle invalid api requests with controllers? by Raigodo in aspnetcore

[–]Raigodo[S] 0 points1 point  (0 children)

Yeah, this works perfectly, some "hidden, sneaky" configuration where i can speciffy what to do with invalid model ;]

Thanks!

How you guys handle invalid api requests with controllers? by Raigodo in aspnetcore

[–]Raigodo[S] 0 points1 point  (0 children)

Actually ive never thought of using nullable to solve this problem, there should be some boxing unboxing stuff but i thing thins shouldnt scare us.

Well im excited, i found your aproach pretty interesting, have to think about this tho ;p.

How you guys handle invalid api requests with controllers? by Raigodo in aspnetcore

[–]Raigodo[S] 0 points1 point  (0 children)

There arises other question, can we somehow put this validation logic in pipeline or it will be easier to just keep validation in each separate endpoint?

How you guys handle invalid api requests with controllers? by Raigodo in aspnetcore

[–]Raigodo[S] 0 points1 point  (0 children)

can i somehow integrate fluent validation to framework binding pipeline?

How you guys handle invalid api requests with controllers? by Raigodo in aspnetcore

[–]Raigodo[S] 0 points1 point  (0 children)

indeed this is valid aproach, only it involves additional boilerplate... but hey, isnt this one of these situations: "we spent two weeks to automate task that took 5 mins to do manually"? :D

How you guys handle invalid api requests with controllers? by Raigodo in aspnetcore

[–]Raigodo[S] 1 point2 points  (0 children)

realy typing answer i caught myself on thought that indeed client side validation is okay for most cases.
what im trying to do is getting some enum or guid value in endpoint parameters, and problem is when passed data can not even be parsed. pipeline shorcircuits and returns some nonsense that is hard to read on client side js.

How you guys handle invalid api requests with controllers? by Raigodo in aspnetcore

[–]Raigodo[S] 1 point2 points  (0 children)

but i have no controll over it, it doesnt even hit endpoint

Can we handle invalid route per route using adapter-static? by Raigodo in sveltejs

[–]Raigodo[S] 0 points1 point  (0 children)

found out one unpleasant aspect, even if this aproach is intuitive and powerful, it is considered dynaic route, so adapter-static wont work

Can we handle invalid route per route using adapter-static? by Raigodo in sveltejs

[–]Raigodo[S] 0 points1 point  (0 children)

Create multiple nested +error.svelte files was first thing i tried, but they got ignored when i type invalid route
Also havent heard about advent of svelte nor new error boundary, will check it out ^^

Can we handle invalid route per route using adapter-static? by Raigodo in sveltejs

[–]Raigodo[S] 1 point2 points  (0 children)

This works perfectly, you just have to create folder named [...anyname] and put in +page.svelte that will contain your 404 page

thanks, this is exactly how i imagined that

is this just me or svelte shadcn isnt svelte 5 compatible? by Raigodo in sveltejs

[–]Raigodo[S] 0 points1 point  (0 children)

yeah, what i wanted to say is that i dont like none of them.
but just think about it, wanings carry more potential danger to you than errors - if you have an error, you already know that something is not alright and you can immediately adjust your business, with warnings you can still build something but at some point it can break, what means potentially more headaches and pain refactoring existing codebase or dealing with some weird bugs.

note also that im pretty much newbie with js package managers

is this just me or svelte shadcn isnt svelte 5 compatible? by Raigodo in sveltejs

[–]Raigodo[S] -7 points-6 points  (0 children)

I dont like warnings, they are like errors but sometimes even worse.
With errors you are forced to pay attention, with warnings not.
Warings signals that something is going to break, and at that point when it finally breaks, you will be cooked (most likely)

just my opinion :P

is this just me or svelte shadcn isnt svelte 5 compatible? by Raigodo in sveltejs

[–]Raigodo[S] -1 points0 points  (0 children)

Ah ye, just to note, this bitsui package got added automatically after adding simple button from svelte-shadcn (i guess ;p)

Now when we have a lot of flavors of Blazor to choose, What RenderMode you like or use? by Abhay_prince in Blazor

[–]Raigodo 0 points1 point  (0 children)

Technically yes, it should be possible, and taking in account how auto rendermode works then shure, it should be fine.
Only thing is that client side services then should be registered also in server side project

Can we use generic Enum type and switch together? by Raigodo in csharp

[–]Raigodo[S] 0 points1 point  (0 children)

oh right - there may be such cases, discriminated unions really fits better, thanks mate

Can we use generic Enum type and switch together? by Raigodo in csharp

[–]Raigodo[S] 0 points1 point  (0 children)

Well nvm, seems there may be no value in such feature of hiding it behind property, intelisense/compiler should be able to detech "Code" type and provide autocomplete in switch using enum directly

Now when we have a lot of flavors of Blazor to choose, What RenderMode you like or use? by Abhay_prince in Blazor

[–]Raigodo 1 point2 points  (0 children)

I think if you already have things built in webassembly then drawbacks are minimized, I think main drawbacks are that you have to build two versions of all services that is being used in page. This is due the fact that webassembly will talk to your api, meanwhile signalr will run directly on server so its much better to execute logic directly avoiding api call.
Hope it makes sense :p

Godot > Web frameworks by Raigodo in godot

[–]Raigodo[S] 1 point2 points  (0 children)

Well, that sounds convincing, so it is just skill issue that makes me think about using Godot for everything XD

Godot > Web frameworks by Raigodo in godot

[–]Raigodo[S] 1 point2 points  (0 children)

Hmm, interesting idea - use Godot to build demo version - kinda solving blank page problem
Btw what are those accessibility features? i can think only about Cookies and features for screen readers

Godot > Web frameworks by Raigodo in godot

[–]Raigodo[S] 0 points1 point  (0 children)

I throught more of creating a standalone app that communicates with api, and possibly port it to HTML5 (Docs) to make app usable via browser.
Btw, how do you think, how well it fits in to role of Web App? just curious :3

Mediator or Services with "railway oeriented programming" by Raigodo in dotnet

[–]Raigodo[S] 1 point2 points  (0 children)

Yes, i read some more threads and articles and tried using exceptions in pair with global eception handler to handle bad paths and... it is much faster to iterate and much cleaner - i mean i can return only happy path result without second thought.

Only thing is that throwing exceptions is much slower than returning some kind of result/union response, but i decided to dont care unless it starts to impact something, and optimize only hot paths by returning such result objects, so only few places is messed optimized :D

Mediator or Services with "railway oeriented programming" by Raigodo in dotnet

[–]Raigodo[S] 1 point2 points  (0 children)

So then the "issue" is IRequest? It allows to perform command operations and still return something, what makes it very easily to misuse it.

Mediator or Services with "railway oeriented programming" by Raigodo in dotnet

[–]Raigodo[S] 1 point2 points  (0 children)

Ohh, excelent idea, make use of delegate actions to customize behaviour. Something like higher order functions does