domain-driven-design

Domain driven design and transactions in Spring environment

强颜欢笑 提交于 2019-12-18 10:42:46
问题 I used to design my application around anemic domain model, so I had many repository object, which were injected to the big, fat, transaction-aware service layer. This pattern is called Transaction script. It's not considered a good practice since it leads to the procedural code, so I wanted to move forward to the domain driven design. After reading couple of articles on the web, listening to the Chris Richardson's talk on Parleys and reading DDD chapters of the POJOs in Action, I think I got

Domain driven design and transactions in Spring environment

岁酱吖の 提交于 2019-12-18 10:42:07
问题 I used to design my application around anemic domain model, so I had many repository object, which were injected to the big, fat, transaction-aware service layer. This pattern is called Transaction script. It's not considered a good practice since it leads to the procedural code, so I wanted to move forward to the domain driven design. After reading couple of articles on the web, listening to the Chris Richardson's talk on Parleys and reading DDD chapters of the POJOs in Action, I think I got

Books that will cover TDD, DDD and Design Patterns in .NET

岁酱吖の 提交于 2019-12-18 10:19:30
问题 I would like to get book(s) that will really give me a complete view of modern ASP.NET development using C#, TDD, ASP.NET MVC, DDD and Design Patterns such as the Repository pattern. I'm very competent with C# and ASP.NET MVC, but want to fill in the gaps. If you've had a good experience with a book or two that covers these topics could you please share them? 回答1: I'm currently interested in how to architecture good .NET applications and I'm reading or have currently read some of the

Where can I find good Domain Driven Design resources? [closed]

拈花ヽ惹草 提交于 2019-12-18 10:08:05
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . What are the best places to find out everything there is to know about Domain-Driven Design, from beginner to advanced. Books Websites Mailing lists User groups Conferences etc 回答1: Here are some interesting sources: the DDD book by Eric Evans the free DDD Quickly book the DDD newsgroup 回答2: Wikipedia has some

DDD - persisting aggregate children only if changed

六眼飞鱼酱① 提交于 2019-12-18 08:28:21
问题 I'm trying use DDD in an application I'm currently working on. I have a following UserAggregate structure: UserAggregate - ProfileEntity - ImageEntity - RatingEntity And i have a UserRepository which is querying entities mappers to build a UserAggregate. Now I'd like to pass the UserAggregate to the UserRepository for persistance, like UserRepository->save(UserAggregate) . How do I tell the UserRepository that UserAggregate children entities have changed and needs to be saved? Is there any

Fluent NHibernate : How to map a 'Foreign Key' column in the mapping class

烈酒焚心 提交于 2019-12-18 05:29:17
问题 I'm starting to develop with Fluent NHiberate, and I was wondering how I create a defined 'Foreign Key' relationship in my Mapping class. Here's my class. These classes are a one-to-one with associated tables. public class Song { public virtual int SongID{ get; private set; } //Primary Key public virtual int SongArtistID { get; set; } //Foreign Key mapping to 'Artist.ArtistID' public virtual string Title { get; set; } } public class Artist { public virtual int ArtistID{ get; private set; } /

Accessing data for validation and determining default values using DDD

眉间皱痕 提交于 2019-12-18 05:22:20
问题 Lets take a hypothetical project such as a student enrollment system for a music school. Within the system there needs to exist a way to enter student data for a new student interested in receiving instruction at this school and we can assume that students may have access to this functionality through a web site. Part of the enrollment process asks the student the type of instrument for which she would like to receive instruction. As a result of entering information about her preferred

Accessing data for validation and determining default values using DDD

ぃ、小莉子 提交于 2019-12-18 05:21:33
问题 Lets take a hypothetical project such as a student enrollment system for a music school. Within the system there needs to exist a way to enter student data for a new student interested in receiving instruction at this school and we can assume that students may have access to this functionality through a web site. Part of the enrollment process asks the student the type of instrument for which she would like to receive instruction. As a result of entering information about her preferred

How to write functionality using DDD / CQRS

半腔热情 提交于 2019-12-18 04:16:35
问题 I have a bank account domain as listed below. There can be SavingsAccount, LoanAccount, FixedAccount and so on. One user can have multiple accounts. I need to add a new functionality – get all accounts for a user. Where should be the function written and how? It would be great if the solution follows SOLID principles( Open-Closed principle,…) and DDD. Any refactoring that would make the code better is welcome. Note: The AccountManipulator will be used by a website client over a web service.

Can DDD repositories be aware of user context?

霸气de小男生 提交于 2019-12-18 03:59:23
问题 Say you were to develop a system which availability of entities and domain logic is highly dependent on user context. Would it make sense to handle the user context sensitivity within repositories by making individual repository instances user context aware? I'm considering adopting this methodology as a way pulling the reliance on user context away from my Entities but I'm not sure whether there are any pitfalls that I may not be aware of with going this direction. The way I'm planning