domain-driven-design

Domain Events with Spring Boot and MongoDB

丶灬走出姿态 提交于 2020-07-23 02:28:18
问题 I am working with DDD and Spring using MongoDB . Now the since MongoDB is a DocumentDB and no schema validations are present, The AggregateRoot and the Document class that gets stored in the MongoDB are two different classes and the Repository translates content between those two classes while reading and writing data to database . Since the Root entity class is different from the class being stored to DB, Spring doesn't trigger the DomainEvents of the AggregateRoot . Is there a way I can get

Domain Events with Spring Boot and MongoDB

我怕爱的太早我们不能终老 提交于 2020-07-23 02:27:25
问题 I am working with DDD and Spring using MongoDB . Now the since MongoDB is a DocumentDB and no schema validations are present, The AggregateRoot and the Document class that gets stored in the MongoDB are two different classes and the Repository translates content between those two classes while reading and writing data to database . Since the Root entity class is different from the class being stored to DB, Spring doesn't trigger the DomainEvents of the AggregateRoot . Is there a way I can get

Domain Events with Spring Boot and MongoDB

ⅰ亾dé卋堺 提交于 2020-07-23 02:26:26
问题 I am working with DDD and Spring using MongoDB . Now the since MongoDB is a DocumentDB and no schema validations are present, The AggregateRoot and the Document class that gets stored in the MongoDB are two different classes and the Repository translates content between those two classes while reading and writing data to database . Since the Root entity class is different from the class being stored to DB, Spring doesn't trigger the DomainEvents of the AggregateRoot . Is there a way I can get

Using Durable Functions, how to return multiple values from an Activity Functions

大憨熊 提交于 2020-07-21 07:21:11
问题 I’m a big Domain Driven Design fan and developer, and am always attempting to map technology/architecture into the world of DDD. Mapping microservices to bounded contexts provides for a natural marriage. At the end of the day, I just want to focus on my business logic and host that in the right environment. Durable Functions looked promising to me, in needing to solve the distributed transaction problem across microservices, Sagas or Process Manager if you will. I have been using NServicebus

DDD Infrastructure services

こ雲淡風輕ζ 提交于 2020-07-16 14:00:11
问题 I am learning DDD and I am a little bit lost in Infrastructure layer. As I understand, "all good DDD applications" should have 4 layers: Presentation, Application, Domain and Infrastructure. Database should be accessed using Repositories. Repository interfaces should be in Domain layer and repository implementation - in Infrastructure (reference DDD: Where to keep domain Interfaces, the Infrastructure?). Application, Domain and Infrastructure layer should/may have services (reference Services

Is it problematic that Spring Data REST exposes entities via REST resources without using DTOs?

若如初见. 提交于 2020-07-16 12:59:51
问题 In my limited experience, I've been told repeatedly that you should not pass around entities to the front end or via rest, but instead to use a DTO. Doesn't Spring Data Rest do exactly this? I've looked briefly into projections, but those seem to just limit the data that is being returned, and still expecting an entity as a parameter to a post method to save to the database. Am I missing something here, or am I (and my coworkers) incorrect in that you should never pass around and entity? 回答1:

Can a repository access another by DDD?

霸气de小男生 提交于 2020-07-11 07:03:03
问题 I am practicing DDD, and I have a very simple example, which looks like this currently: Polling getEventBus() -> Bus getEventStorage() -> Storage getMemberRepository() -> MemberRepository getCategoryRepository() -> CategoryRepository getBrandRepository() -> BrandRepository getModelRepository() -> ModelRepository getVoteRepository() -> VoteRepository MemberRepository MemberRepository(eventBus, eventStorage) registerMember(id, uri) -> MemberRegistered(id, uri, date) -> MemberRegistrationFailed

Can a repository access another by DDD?

╄→гoц情女王★ 提交于 2020-07-11 07:02:38
问题 I am practicing DDD, and I have a very simple example, which looks like this currently: Polling getEventBus() -> Bus getEventStorage() -> Storage getMemberRepository() -> MemberRepository getCategoryRepository() -> CategoryRepository getBrandRepository() -> BrandRepository getModelRepository() -> ModelRepository getVoteRepository() -> VoteRepository MemberRepository MemberRepository(eventBus, eventStorage) registerMember(id, uri) -> MemberRegistered(id, uri, date) -> MemberRegistrationFailed

Should DTO and Entity both have input validations

穿精又带淫゛_ 提交于 2020-07-04 08:48:26
问题 I have a WCF layer and my Domain Model is behind this WCF layer. I am using Nhibernate as an ORM tool and all my business logic/ Data Access etc will be behind this WCF layer. I am exposing DTO to my clients. I have below questions 1) Should i create DTOs? is there any harm in exposing entities directly to wcf clients as my entities would also have business logic methods also in doing so i would have to corrupt my entitiy object with WCF attributes which i think is not good? 2) If i expose

Should DTO and Entity both have input validations

徘徊边缘 提交于 2020-07-04 08:46:47
问题 I have a WCF layer and my Domain Model is behind this WCF layer. I am using Nhibernate as an ORM tool and all my business logic/ Data Access etc will be behind this WCF layer. I am exposing DTO to my clients. I have below questions 1) Should i create DTOs? is there any harm in exposing entities directly to wcf clients as my entities would also have business logic methods also in doing so i would have to corrupt my entitiy object with WCF attributes which i think is not good? 2) If i expose