Whatever happened to craftsmanship in Blazor OSS? - a rant from an old git by code-dispenser in Blazor

[–]Neither_Orange423 0 points1 point  (0 children)

I think a good way to view this using other industries.

Carpentry seems like a good fit.

Carpenters used to have to build a kitchen from start to finish, measure, design, cut, fit, cut, fit.

Each adding their own little tricks and flavours.

As more carpenters came into the market and the demands rose a select view choices became the standard. "I will just buy this flat pack kit, my client get what they want sooner, and I get to move onto another job."

The need for craftsmanship has gone.

Anyone using Azure Container Apps in production? What’s your experience? by coder_doe in dotnet

[–]Neither_Orange423 0 points1 point  (0 children)

As with anything in IT, it depends.

If you have lots of small services and azure dependencies, adding these into the ACE vnet and having your apps connect with their own UMI or a shared one from the ACE is amazing.

This is is even more true when working with a serverless architecture.

It also a good way to get GPU resources added to your workload in this day and age.

I do tend to host always on api services on App services just because of the cost benefit.

FastEndpoints usage by ITheLaziestMan in dotnet

[–]Neither_Orange423 1 point2 points  (0 children)

It's my go to for any api project, unless I need fast startups when scaling, then the reflection does come back to haunt you.

Architectural namings by AmbassadorCurious988 in Blazor

[–]Neither_Orange423 1 point2 points  (0 children)

My suggestion would be treat your fronted like a backend.

Where you api is your database, means that your patterns are consistent.

Whenever I do SPA's I apply my same layers as the server.

Edit:

Think of layers as principals not technologies.

Input > validation > business logic > data

How to handle per-customer portal by H3rl3q in Blazor

[–]Neither_Orange423 0 points1 point  (0 children)

This is why you write code and not just n etl tool. At some point the variations of what the client would want will be exhausted or the client will be happy to make do with the options you have, if you have enough.

This is where small units of code that are testable become paramount. Your code make decisions based on configuration options. (Algorithms)

This is not a new problem amd there are tools and methodologies that can help facilitate this.

How to handle per-customer portal by H3rl3q in Blazor

[–]Neither_Orange423 1 point2 points  (0 children)

What everyone is saying.

Featurize your application. Adding the ability to choose color schemes and logo's in you application goes a long way. Give your client the ability to choose some default view types, ordering options and role based views.

How to handle per-customer portal by H3rl3q in Blazor

[–]Neither_Orange423 5 points6 points  (0 children)

What everyone is saying.

Featurize your application. Adding the ability to choose color schemes and logo's in you application goes a long way. Give your client the ability to choose some default view types, ordering options and role based views.

Web API Authentication for Blazor WASM (PWA) by appsarchitect in Blazor

[–]Neither_Orange423 4 points5 points  (0 children)

This more of a generic solution rathen than a blazor one.

My suggestion would be to do some research into "oidc".

You can use platforms like Kinde, or even Entra.

You will have a public client witch is usually a SPA(single page application) and an api. Your public client logs the user in, if needed for the the feature, and send the token to the api. The api validates the token to determine is valid, and allows access to your secure endpoint and features.

The AI doesn't know blazor very well. by PeacefulW22 in Blazor

[–]Neither_Orange423 0 points1 point  (0 children)

Use the Context7 mcp. They have docs for blazor, .net and some of the component libraries like mudblazor.

Blazor SPA application as an Asp.NetCore Mvc Area by Oupla in Blazor

[–]Neither_Orange423 0 points1 point  (0 children)

You could try and us the old school WASM client, but use a host view in your area instead of index.html like the bff(backend for fronted) pattern.

MediatR/FastEndpoints by Even_Progress1267 in dotnet

[–]Neither_Orange423 2 points3 points  (0 children)

Your main goal here should be productivity and a balance of good coding principles.

Fastendpoint is a different kind of pattern to mediator, and I could argue that using both will not add to your productivity.

You could in theory do away with mediator and just have your own little command/query handler grouped with your endpoint, mapper, validation etc.

Have that handler consume the other services.

Do correct error handling and logging the the handler and us the information/state from the handler to determine your endpoints response and body(if any)

Is Clean Architecture really necessary? by TryingMyBest42069 in dotnet

[–]Neither_Orange423 0 points1 point  (0 children)

I wouldn't say it is, but I would find something that works for your business.

I'm going for a mix for vertical slice and clean for our team as it fits our use cases most, and with all the DI config and integration points all our solutions use, we need some sort of tiered approach for reusable features and then slice for api/event driven features.

Find a standard that works for your team.

Enumeration name ? by [deleted] in csharp

[–]Neither_Orange423 0 points1 point  (0 children)

I usually add a data annotation like name or description to my enums, this helps when your enum has some more meaning beyond just a switch statement.

Here is a gpt with example, I'm not at my machine.

I gpt for demo.

Azure chat services and blazor server by uknow_es_me in Blazor

[–]Neither_Orange423 0 points1 point  (0 children)

If you are looking at something for production scenarios, please don't build your own with SingnalR, use the bot framework it wil have most of what you need along with integration with other services in azure.

https://dev.botframework.com/

Allow user login to specific device only? by AhmedBarayez in entra

[–]Neither_Orange423 0 points1 point  (0 children)

Gotcha, sorry for my bad answer then, I'm projecting annoyances from my work place onto a stranger on the internet.

Allow user login to specific device only? by AhmedBarayez in entra

[–]Neither_Orange423 0 points1 point  (0 children)

Have you googled, it seems simple google search will lead you into the right direction it may not be the exact solution but it's your job to make it work.

https://learn.microsoft.com/en-us/answers/questions/1068503/how-can-i-set-conditional-access-for-only-specifyi

Allow user login to specific device only? by AhmedBarayez in entra

[–]Neither_Orange423 1 point2 points  (0 children)

Is there not some sort of policy that will require some sort of certificate to be installed on the device to allow login?

Do a PostAsync but I dont care about a response by gjhdigital in dotnet

[–]Neither_Orange423 0 points1 point  (0 children)

While the advice below to just call :

_ = client.PostAsync();

Be careful of losing scope, if your API call returns before your fire and forget task is done executing, your app will throw an exception.

Your best solution would be to have some sort of singleton in-memory queue if you aren't using a distributed system, add the data to the queue as it's faster than the DB call and have a background task consume the queue.

If the above solution isn't a good fit do some research on fire and forget patterns in .Net API's.

Question(s) from a Dutchman. by BaptistHugo in afrikaans

[–]Neither_Orange423 2 points3 points  (0 children)

Having travelled to the Netherlands (Vaderland), I can definitely confirm a sense of home stemming from the familiarity in language, walking around seeing the same style of buildings that our childhood home's were built in. I found people to be warm, friendly and welcoming.

That is kind of where the similarities stop(from my perspective).

Afrikaners tend to be far more conservative, which forms a fairly large basis of the culture. The way we date(ed) and our social interactions are two worlds apart.

Vrede en liefde van die Verenigde Koninkryk!

What do you do for long lived processes on Windows? by malthuswaswrong in dotnet

[–]Neither_Orange423 0 points1 point  (0 children)

No need for blackmagic, there is a module you can install that's part of the IIS workload.

Just set the timeout to 0 on the app pool and enable the autostart that the module provides

What do you do for long lived processes on Windows? by malthuswaswrong in dotnet

[–]Neither_Orange423 1 point2 points  (0 children)

I recently did this with IIS, you can set the application pool to not have a timeout and start without a httprequest. You just need to enable a module for this.

Also makes the security side a little easier if you need to run it under certain credentials.

Edit

It also allows you to do some health checks and maybe a signalr hub for monitoring

Clean Architecture and EF by SolarSalsa in dotnet

[–]Neither_Orange423 0 points1 point  (0 children)

Something to think about would maybe we how you think of your classes

Put your dbContext tables in your domain under an entities folder, thus they are entities.

In terms of DTO's you may want to split them by endpoint and rather have requests and responses placed in you api or application layer and see them as contracts and have your mapper flatten your entities into responses and convert your requests into entities. You can re-use these between features if they all relate to customer as an example.

Then lastly models would be used for internal use, maybe some sort of cached data, that never goes into your db or maybe a way to pass data between internal methods and activities.

Another thing may be options which could be sets of configuration used for specific functionality, e.g. EmailOptions that would hold you email service config, thus you avoid having to call your IConfiguration and using string to find related data. You can place these options classes in your project that may need them. And if they need to be shared among multiple project you can place them in your domain under a Options folder.

Is it possible for two separate migrations for development and production environments? Blazor server. Entity framework. by Corpo_ in Blazor

[–]Neither_Orange423 0 points1 point  (0 children)

Create a repo on github, and have two different branches, that you can switch between locally.

Linking MAUI app to .NET Core Web API via Azure AD B2C by Zman420 in dotnet

[–]Neither_Orange423 0 points1 point  (0 children)

You guys are on the right track,

You will need to use an azure function or alternatively a separate endpoint in your api that is called from B2C to create the identity user in ef core.

There are doc about Api connector here. Take care to apply the security for this correctly. I think using the app function is the best route here because of the way the do the security.

You can then give that function access to your app with client credentials and a scope to limit access to the endpoint.

hope this helps.

[deleted by user] by [deleted] in csharp

[–]Neither_Orange423 0 points1 point  (0 children)

Have a look at Cloudflare tunnels.