aggregateroot

Handling aggregate root

落花浮王杯 提交于 2021-01-29 21:34:34
问题 I'm new in DDD so I'm doing some practice to undertand a little bit more. I have Course BC with the follow rules: Course has to be created first and then they can create the modules of one course Every module will be finished by the user when he upload the homework The course will be finished by the user when he finished all the modules Definition: A course covers a particular topic and it is comprised of module. For instance, sap course has 10 modules such as: module 1: what is it?, module 2

Aggregates and aggregation roots confusion

旧时模样 提交于 2021-01-27 14:16:15
问题 i've been assigned a quite simple project as an exam and i had the idea to develop it using the Domain Driven Design. Many of you might say that the application is so simple that going with repositories and UoW is just a waste of time, and you probably be correct but i think of it as an opportunity to learn something more. The application is a "Flight tickets" system and from the following image you could probably well guess it's functionality. The thing is that i am not sure if i am

How entities covered with in an aggregate Root are saved in DDD?

别说谁变了你拦得住时间么 提交于 2020-03-25 18:54:13
问题 After reading lot of posts, I realised if an aggregate root exists for a concept/context, we need to have a single repository for that whole concept/context. If thats the case, I see there won't be any repositories for the internal entities. If so, how these internal entities are saved to database? I have a many internal entities under the aggregate root. So, wondering If I need to have all the saving of the internal entities under the aggregate root repository, it's going to be bloated.

DDD - Modifications of child objects within aggregate

本秂侑毒 提交于 2020-01-22 09:30:34
问题 I am having some difficulty working out the best way to handle a fairly complex scenario. I've seen quite a few similar questions, but none addressed this scenario to my satisfaction. An Order (aggregate root) is created with multiple OrderLines (child entities). According to business rules, each OrderLine must maintain the same identity for the life of the Order. OrderLines have many (20+) properties and can be mutated fairly often before the Order is considered "locked". In addition, there

Reference another Aggregate Root inside another Aggregate root?

馋奶兔 提交于 2019-12-25 01:45:21
问题 I'm done DDD for a couple of years now and still its challenging when it comes to designing Aggregates. Thats the fun part of DDD and it makes your head spin. I'm asking this question since I'm architect in a project and we're in the middle of designing the model. Its an iteration when model evolves parallel with GUI and requirement gathering together with customer. Now to the problem. Our scenario is that we are facing some Aggregates that are growing into very large AR's. I think I'm good

Aggregate for one entity

微笑、不失礼 提交于 2019-12-23 10:06:02
问题 In Domain-driven design if I want to use a repository I need to have an aggregate for it - as I understand. So I have a User, that has id, login, email, and password. A user is a domain Entity with unique Id. When i want to add a User to User repository, should I build first an Aggregate with only Aggregate Root that is my User entity and nothing more? It looks like a proxy to User in this case, unneeded layer. Or maybe I missed something here? Maybe User isnt an Entity, even if it looks like

DDD: Persisting aggregates

狂风中的少年 提交于 2019-12-23 09:59:29
问题 Let's consider the typical Order and OrderItem example. Assuming that OrderItem is part of the Order Aggregate, it an only be added via Order. So, to add a new OrderItem to an Order, we have to load the entire Aggregate via Repository, add a new item to the Order object and persist the entire Aggregate again. This seems to have a lot of overhead. What if our Order has 10 OrderItems ? This way, just to add a new OrderItem , not only do we have to read 10 OrderItems , but we should also re

DDD - How to design associations between different bounded contexts

牧云@^-^@ 提交于 2019-12-20 10:08:42
问题 I have setup a domain project which is being populated with an ORM. The domain contains of different aggregates each with its own root object. My question is how properties that cross the aggregate boundries should be treated? Should these properties simply ignore the boundries so that a domain object in bounded context A has a reference to an object in context B? Or, should there be no direct link from context A to B and does the object in context A have an "int ContextBId" property that can

DDD - How to design associations between different bounded contexts

∥☆過路亽.° 提交于 2019-12-20 10:07:17
问题 I have setup a domain project which is being populated with an ORM. The domain contains of different aggregates each with its own root object. My question is how properties that cross the aggregate boundries should be treated? Should these properties simply ignore the boundries so that a domain object in bounded context A has a reference to an object in context B? Or, should there be no direct link from context A to B and does the object in context A have an "int ContextBId" property that can

Bounded context implementation and design

╄→尐↘猪︶ㄣ 提交于 2019-12-20 09:04:21
问题 Let's say I have two bounded contexts, the Shipping Context and the Billing Context . Each of these contexts need to know about the customer. At a data level, the customer is represented by a CustomerTbl table in a database. This table consists of all the necessary columns that describe the customer. Columns in CustomerTbl (simplified): Name PhysicalAddress PaymentMethod The Shipping Context is concerned with Name and PhysicalAddress while the Billing Context is concerned with Name and