Tag Info

New answers tagged

2

At some point in time, someone has to make a decision how the UI has to look like. If this is done iteratively step-by-step in a dicussion between the customer and your team, fine - that is a feasible, pragmatic way. Whenever the decision is made for a particular part of your UI, you can start creating the tests. I end up creating the Automated test code ...


0

I suppose that if resolving data conflicts is a part of technical considerations which you cannot remove, then whatever is required to resolve such conflicts does belong to the domain. You could have two interface layers for that, though. The simpler layer, oblivious of conflict-resolution needs, can be used wherever conflicts cannot arise (e.g. querying ...


1

You're overthinking this. If your class is: public class Bill { private BillId billId; Collection<BillEntry> billHistory; } Then your Average Balance method properly belongs in the Bill class. public class Bill { private BillId billId; Collection<BillEntry> billHistory; public decimal GetAverageBalance() { ...


-1

The underlying purpose of serialization is to ensure that data produced by one system is able to be consumed by one or more compatible systems. The easiest and most robust approach to serialization is to translate the data into a type agnostic format that maintains the structure in a simple and easy-to-consume format. For instance the most ubiquitous ...


5

Kinds of objects For purposes of our discussion, let's separate our objects into three different kinds: Business Domain logic These are the objects that get work done. They move money from one checking account to another, fulfill orders, and all of the other actions that we expect business software to take. Domain logic objects normally do not require ...


0

Now where does the logging go? Second, I need to send a mail to the user. where should the call go? I would recommend Domain Events. Create two events: UserBanAttemptedEvent and UserBannedEvent (note the past time). The logic for logging and email notifying is going inside event handlers, create two handlers UserBanAttemptedEventHandler and ...


1

... intuitive for developers to use, so the code itself explains and forces developers to use it in certain way... It's a myth that OO bits can be intuitive unless they are trivial. like the most fundamental framework elements. LOB objects are the opposite of that. They need good documentation and examples demonstrating all the functionality you'd hope ...


0

The way I would approach the problem of validation is this way: Create a Domain Service called MembershipService: class MembershipService : IMembershipService { public MembershipService(IGroupRepository groupRepository) { _groupRepository = groupRepository; } public int NumberOfGroupsAssignedTo(UserId userId) { return ...


1

The DI means your Application layer shall not depend directly on the Domain Service classes, but on abstract interfaces of those service classes (actually, your diagram is already showing this). The only thing which is debatable is if those interfaces should be placed in the Domain Layer. You better place them outside, in a "Service Interface" layer, so they ...


2

It doesn't break DIP because Domain is the highest level, higher than Application, and doesn't have a dependency on it. The reverse (Domain depending on Application) would break DIP. [Edit : clarification] Also, the "should depend on abstraction" part of DIP doesn't necessarily apply here, because domain entities can't be abstracted -- they are already a ...



Top 50 recent answers are included