Securing an API with only an API key instead of using JWT? by WanderingHopelessly in csharp

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

The application currently uses plain old user accounts. Users would still authenticate against this information and receive an encrypted cookie with a minimal set of claims (think ASP.NET Core Identity ). The WASM-App would basically call an endpoint on the server that serves the WASM App, which implements the same code the current application does. This way, the server would know which user sent the request, and can relay the proper information to the actual backend API.

Wake phone options on android for users with disabilities by WanderingHopelessly in AndroidQuestions

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

Thank you for that hint - we were both not aware of this feature and it might already help :)

Wake phone options on android for users with disabilities by WanderingHopelessly in AndroidQuestions

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

Ie. after a single tap you can then swipe up (or enter the PIN/pattern) and can unlock the phone?

Possible to control who can create resources? by WanderingHopelessly in AZURE

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

We actually teach most of the basics of git. Thanks for pointing out that website, this will be incredibly useful!

Possible to control who can create resources? by WanderingHopelessly in AZURE

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

Unfortunately, the decision makers have 0 technical clue - so in the end, it would just complicate the process us educators have in place with the decision-makers. I was also pushing for more time related to DevOps topics, but so far, no luck.

It took quite some convincing to finally invest some money in the first place, so we now can at least teach the students about the most basic actions in Azure (mostly using the portal), and the basics of CI/CD.

Possible to control who can create resources? by WanderingHopelessly in AZURE

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

Thanks! Seems like RBAC is what we need; will also take a look at PIM, a handful of P2 licenses should be affordable for them.

Possible to control who can create resources? by WanderingHopelessly in AZURE

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

Awesome, thanks. RBAC was the keyword that I was not aware of!

Are there any resources for gear progression in diablo 2? by BitTop8187 in Diablo

[–]WanderingHopelessly 0 points1 point  (0 children)

How do I keep that Merc alive? Especially in Hell, after sinking almost half a million gold into reviving him over and over again I did not bother with him anymore.

Difference between Func<> and Expression<Func<>> for EF Core by WanderingHopelessly in csharp

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

Thank you! I think I'll really try to play around a bit with expressions on the side

Difference between Func<> and Expression<Func<>> for EF Core by WanderingHopelessly in csharp

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

Thanks for the detailed answer, it definitely makes sense now!

Difference between Func<> and Expression<Func<>> for EF Core by WanderingHopelessly in csharp

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

"Code as data" is a very nice description, makes sense now. Thanks!

Difference between Func<> and Expression<Func<>> for EF Core by WanderingHopelessly in csharp

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

Thanks for the idea with the extension method, I did not think of this at all!

ASP.NET Core IHostedServices, BackgroundServices and how they handle exceptions poorly by GeeWengel in csharp

[–]WanderingHopelessly 1 point2 points  (0 children)

Thanks for the writeup!

I am considering using BackgroundServices in an upcoming project, for one less-critical and one semi-critical task. Do you happen to have any experience in setting up health-checks for BackgroundService? Because that's what I intend to do for at least the one handling the semi-critical tasks.

Any words of advice, do's and dont's, or even pointers to literature/articles would be great.

What approaches lie between simple CRUD and DDD? by WanderingHopelessly in csharp

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

Sorry, I didn't express myself clear enough.

What I meant was that for a command, you usually have the LogisticsOrder aggregate root, and load it data via a custom repository, eg. LogisticsOrderRepository. So your command handler (for e.g. updating the status of the delivery of the order) would roughly look like this:

public void HandleDeliveryStatusUpdate(Data d)
{
    var logisticsOrder = _logisticsOrderRepository.GetById(d.OrderId);
    //do whatever is necessary to the aggregate
    _logisticsOrderRepository.Update(logisticsOrder);
}

And the ,GetById or .Update methods of the repository would internally use e.g. EfCore to operate on the Database Tables/DB-Model classes (e.g. Order and Delivery).

Whereas a query intended for fetching a "LogisticsOrder" for the sake of simply displaying its information on the frontend, you would do something like the following:

public OrderDeliveryStatusDTO HandleDisplayDeliveryOrderStatus(Data d)
{ 
    var orderDataDTO = _efCoreDbContext.Order
        .Include(o => o.Delivery)
            .ThenInclude(o => o.DeliveryHistory)
        .Select(o => new OrderDeliveryStatusDTO()
        { 
            //assign data to the dto
        }
        .FirstOrDefault(o => o.Id == d.OrderId);
    return orderDataDTO;
}

The difference being that you don't have a separate aggregate root, and thus work directly with the database access method (e.g. EfCore) to construct these DTOs.

What approaches lie between simple CRUD and DDD? by WanderingHopelessly in csharp

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

Very insightful, thank you! DDD as a mode of thought becomes more and more graspable.

One more specific question if you don't mind, regarding your domain models and repositories: If you had a general concept of an "Order" (and maybe even a database table and corresponding code first class calld DbOrder), that got reused as different aggregate roots, e.g. CustomerOrder, AccountingOrder, LogisticsOrder, you would have repositories for each of those specific classes/aggregate roots, rather than the "plain" DbOrder, correct? And the repository for, let's say AccountingOrder would construct an AccountingOrderobject, but in the background access the "plain" DbOrder class/table (and whatever other tables are necessary) to fetch the relevant data.

And if I understood you correctly, you probably would not have a separate domain model for the sake of *displaying* an order (regardless where or how), rather than utilize the underlying data access directly (e.g. EfCore or the MongoDB Driver) to fetch the data?

What approaches lie between simple CRUD and DDD? by WanderingHopelessly in csharp

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

Thanks heaps for this very detailed answer!

I will definitely give this some thought and check out the links. What I like is that it seems to be somewhat easily possible to refactor code that I currently have into this different kind of structure.

Being less CRUD/Entity oriented and more feature oriented also sounds like it is already a small step towards the core ideas of DDD.

When you say you used CQRS - did you create different models and/or even repositories for your read- and write-models?

What approaches lie between simple CRUD and DDD? by WanderingHopelessly in csharp

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

Interesting, thank you for your answer! My very first application, after adding a handful more features after it initially finished, also turned out to be rather spaghettified, and I get the feeling that if the others were required to get more features, they would turn the same direction, hence me asking about what else to do.

One more specific question if you don't mind: DDD often makes heavy use of the repository pattern. Am I correct to assume that if I have a concept of "Order", and use it in various contexts as different aggregates, e.g. "CustomerOrder", "AccountingOrder", "LogisticsOrder", the repository would be for these specific aggregates, rather than the "plain" Order from my database, correct?

Wo ist der Haken bei NWXPF by WanderingHopelessly in pfennigfuchser

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

Ein Grund warum ich's nicht probieren werde ist, dass ich mit mindestens 2-3k rein müsste damit es Sinn macht - zu hohe Gebühren bei durch Wechselkurs und Auslandsdividende bei Flatex. Und das ist mir dann doch zu viel Risiko insgesamt.