Skip to main content
Álvaro García's user avatar
Álvaro García's user avatar
Álvaro García's user avatar
Álvaro García
  • Member for 2 years, 8 months
  • Last seen more than a month ago
  • Spain
comment
In DDD, is the root aggregate who has to expose the methods to tell if a child entity can be create or update?
When you tell the root can show child entities, do you mean it is correct if a consumer ask to the root entity for a child, the root entity can return the child that the consumer ask for? I mean, a consumer ask order for line 2, is correct the order return the line 2 to the consumer? The consumer will not can modify the line, because the line has not public methods to modify the line. The consumer will only can access data with readonly properties and get methods. If this is not correct, how could a consumer to know for example the price of a line?
Loading…
comment
Where to control optimistic concurrency in a domain-driven design (DDD) application?
Yes, you are right, and thinking more about it, I think that from a point of view, is the domain who has to decide if an action needs to ensure the coherence or not. Later the persistance has to ensore that thechnically it is done correctly. Perhaps I could think that instead of the domain, I could increment the version in the application layer, but thinking in the application layer as layer the coordinate domain and persistance, perhaps to decide if increment or not it is to know about domain matters. So according to that, it seems domain is not a bad place to care about concurrency.
awarded
comment
Where to control optimistic concurrency in a domain-driven design (DDD) application?
Thanks. I understand the point, that sometimes it is needed to accept that to don't make so difficult some things. Also I have read sometimes that the domain shouldn't know anything about implementation or technical aspects, and concurrency is something that I think it can be considerate in this way, so it is another reason why at first I try to avoid to make the domain to be conscious about the concurrency.
Loading…
accepted
comment
Security of the cerfiticates in the client application in a gRPC service
@FrankHileman Yes, I was thinking more how I could allow only my application can use the server. But if the client uses he public certificate to authenticate it, if someone get this certificate is possible to another application use the server. As Ben tells, once a certificate is in a device, it is out of my control. But this make me think about OpenVpn, for example. It uses certificate and key to authenticate and encrypt the data, and this certificate and key are in the user device, that can be stole. But in another side, OpenVpn is considerate secure. This is my main doubt.
comment
Doubts how to design a card game in DDD
Thanks for the comments. Yes, perhaps it is a very small application that I can develop faster and in simplier way without DDD, but sometimes the examples that can be found are big or complex and for a first time can be a bit complicated, so it is why I would like to try to think a very small example and try to think in a DDD away. I appreciate your comments so much, and the suggestions.
comment
Doubts how to design a card game in DDD
@RobertHarvey Well, I am starting to learn about DDD and I was thinking in this basic example. I was considerating the Game a my context, the player, the match and the rounds as entities and also the behaviour about them. For simplify, the Arbitrator asigns the turn to a player, then the player can request card, throw, bet... al this is notify and attended by the arbitrator. When arbitrator decides its turn is finished, it gives the turn to the next player... and so. Accoding with the example of the cab in the link, I think I have the basic concepts. But I could be wrong, sure.
comment
Doubts how to design a card game in DDD
@ErikEidt A player can play many rounds in different matches, yes, but I I only want to know the time of a player in a round. From a database point of view it would be something like this: Round(IdRound, IdMatch, IdPlayer, time).
asked
Loading…
comment
DDD - How to validate an entity is valid when said entity is a different domain which i dont have access to
Also i have another question. Isn't would be better in the share service method to check if the user can share and the so call the mehtod Document.Share() without passing the user by parameter? because in some way the document shoud only do the action to share, no check, and in this way the document wouldn't know about user entity and the concepts would be more isolated.
comment
DDD - How to validate an entity is valid when said entity is a different domain which i dont have access to
It is a good option, but my doubt is, the service, is a service in the domain layer or in the application layer? From my point of view I think it belongs to the application layer, because it request data from repositories and I prefer the domain doesn't know about persistance in any way.
comment
DDD - How to validate an entity is valid when said entity is a different domain which i dont have access to
Just i wanted to thanks for this question. It exposes in a very clear way one of my douubts about validation in DDD.
comment
Security of the cerfiticates in the client application in a gRPC service
Thanks for the comment. Well, in my case I want to use gRPC to can request some data from a server, but I don't need to identify each client in a unique way, just i want to encrypt and secure the data. But I would like to develop a client that I can redistributate in a zip and any user could use it just unzipping the application in his computer. So in this case I was thinking that the certificate belongs more to the client application that to the user.
Loading…
comment
Can DTO contain additional helper methods?
@AyoubBoumzebra I have a similiar question, could a DTO have a method Update to update all the fields with values passed as parameters?
1 2 3
4
5
7