domain-driven-design

DDD. Shared kernel? Or pure event-driven microservices?

寵の児 提交于 2019-12-22 07:59:10
问题 I'm breaking my system into (at least) two bounded-contexts: study-design and survey-planning. There's a concept named "subject" (potential subject for interviewing) in the study-design context. We also maintain associations between subjects and populations in that domain. Now, in the survey-planning, we also need (some) information about the subject (for example: for planning a visit, or even for anticipated selection of questionnaire, in case the population the subject belongs to is known

DDD, Event store, UI

↘锁芯ラ 提交于 2019-12-22 07:51:44
问题 I have a project which is designed or at least should be according to the well known DDD principles. Back - DDD + CQRS + Event Store UI - ngrx/store I have a lot of questions to ask about it but for now I will stick to these two: How should the UI store be updated after a single Command/Action is executed ? a) subscribe to response.ok b) listen to domain events c) trigger a generic event holding the created/updated/removed object ? Is it a good idea to transfer the whole aggregate root dto

DDD, Event store, UI

ⅰ亾dé卋堺 提交于 2019-12-22 07:51:12
问题 I have a project which is designed or at least should be according to the well known DDD principles. Back - DDD + CQRS + Event Store UI - ngrx/store I have a lot of questions to ask about it but for now I will stick to these two: How should the UI store be updated after a single Command/Action is executed ? a) subscribe to response.ok b) listen to domain events c) trigger a generic event holding the created/updated/removed object ? Is it a good idea to transfer the whole aggregate root dto

Immutable collections in Doctrine 2?

北城余情 提交于 2019-12-22 06:03:17
问题 I'm looking for a way to return an immutable collection from a domain object in Doctrine 2. Let's start with this example from the doc: class User { // ... public function getGroups() { return $this->groups; } } // ... $user = new User(); $user->getGroups()->add($group); From a DDD point of view, if User is the aggregate root, then we'd prefer: $user = new User(); $user->addGroup($group); But still, if we do need the getGroups() method as well, then we ideally don't want to return the

Immutable collections in Doctrine 2?

梦想的初衷 提交于 2019-12-22 06:02:19
问题 I'm looking for a way to return an immutable collection from a domain object in Doctrine 2. Let's start with this example from the doc: class User { // ... public function getGroups() { return $this->groups; } } // ... $user = new User(); $user->getGroups()->add($group); From a DDD point of view, if User is the aggregate root, then we'd prefer: $user = new User(); $user->addGroup($group); But still, if we do need the getGroups() method as well, then we ideally don't want to return the

Immutable collections in Doctrine 2?

旧时模样 提交于 2019-12-22 06:02:08
问题 I'm looking for a way to return an immutable collection from a domain object in Doctrine 2. Let's start with this example from the doc: class User { // ... public function getGroups() { return $this->groups; } } // ... $user = new User(); $user->getGroups()->add($group); From a DDD point of view, if User is the aggregate root, then we'd prefer: $user = new User(); $user->addGroup($group); But still, if we do need the getGroups() method as well, then we ideally don't want to return the

Factory Pattern where should this live in DDD?

一世执手 提交于 2019-12-22 03:55:31
问题 I have debated this for a while now and still have not come to a conclusion. While most examples I see have the factories code in the application layer I tend to think it should be in the domain layer. Reasons for this: I sometimes have initial validation done in my factory where I want all creation of objects to go through. I want this code to be used on all instantiates of my object. Sometimes an operation requires parameter information which feels unnatural to pass to a constructor. And a

CQRS: business logic on the query side

馋奶兔 提交于 2019-12-21 23:18:18
问题 Following the concept of CQRS (Command Query Responsibility Segregation), I am directly referring the DAL in my MVC application and doing all reads via the ViewModels. However a colleague of mine is asking me what will you do when any business logic has to be applied when doing a read. For e.g. if you need to compute a percentage value in scenario like below: //Employee domain object class Employee { string EmpName; Single Wages; } //Constant declared in some utility class. This could be

DDD/CQRS confusion regarding ReadModels and the Domain

你。 提交于 2019-12-21 20:45:14
问题 So after much reading I've now come to the realization that complex reporting functions do not belong in your typical Repository and that there needs to be some kind of dedicated "Finder" which returns read only objects to be used in reporting. What I'm unclear on is where the "Finder" classes, as well as their associated ReadModel classes are supposed to go inside my project? Are the finders like repositories in that you have an interface for the finder inside the infrastructure assembly

Choosing a NoSQL database for storing events in a CQRS designed application

梦想与她 提交于 2019-12-21 20:37:24
问题 I am looking for a good, up to date and "decision helping" explanation on how to choose a NoSQL database engine for storing all the events in a CQRS designed application. I am currently a newcomer to all things around NoSQL (but learning): please be clear and do not hesitate to explain your point of view in an (almost too much) precise manner. This post may deserve other newcomers like me. This database will: Be able to insert 2 to 10 rows per updates asked by the front view (in my case,