domain-driven-design

1000+ Linq queries or logic in the database...which is worse?

I had asked this question in a much more long-winded way a few days ago, and the fact that I got no answers isn't surprising considering the length, so I figured I'd get more to the point. I have to make a decision about what to display a user based on their assignment to a particular customer. The domain object looks like this vastly ...

Book advice requesting

Ho there, I will be facing a new and exciting issue in the near future. I have to study a complex Domain Model for an application that will control the Production Cycle of a very big manufactoring Industry. I am a Developer with good experience mainly in the UI and the in the logic layer. I have not created a Domain Model in the past. ...

Where should logging logic sit within a DDD solution?

I've created a custom filter for my MVC application, [LogAttribute]. Action methods are decorated with this and it has the responsibility to create a LogEntry object to pass into some type of provider - ILoggerProvider. My question is, where should ILoggerProvider and it's implementations sit (I'll be wanting to use a DI technology on i...

Where to put "ViewModel Classes" in DDD approach?

Hi, As you may have seen the question from the title, i'm little bit confused about where to put the ViewModel classes in our web project. What is the best practice to putting ViewModel classes? Seperate assembly or in UI project? We're working on a project that is built upon Asp.net MVC2 with DDD approach. Thank you. ...

Value Objects Vs Entities...

Quick question... When approaching something like an email address the immediate idea is to treat this as a value object. If we have a number of entities though, say a customer, a contact, and a supplier that are referencing the same email address, it is conceivable that when we change a customer's email address we may want the custome...

What class should have ability to set a password (Repository, User, etc)?

I'm using Entity Framework 4. I'm not really sure where the responsibility of setting a user's password should be. I thought about on the Repository like SetPassword(User user, string password). But it doesn't seem right. The main problem is that it can't just be a simple property setter since I also return the salt that's generated. ...

Domain Driven Design - Parent processing children

Hello, I'm trying to get a handle on good DDD principles, so pardon this question if it is noobish. Take an Author object that has a Books collection. I want an IsAwardWinningAuthor property on my Author, with each book having an IsAwardWinningBook property. Would I simply make IsAwardWinningAuthor loop through (or query, or whatever)...

Start learning DDD

I would like to start learning DDD. As .net developer, I found 3 interesting books for me. 1) Applying Domain Driven Design and Patterns With Examples in C Sharp and .NET (Jimmy Nilsson) 2) .NET Domain-Driven Design with C#: Problem - Design - Solution (Tim McCarthy) 3) Domain-Driven Design - Tackling Complexity in the Heart of Softwa...

Service behaviour in Entity - how to avoid service injection into entity?

Hi, I have an entity structure as follows: IManager: IDeletable { IEnumerable<IFund> Funds {get;} IFailureNotification Delete(); } IFund : IDeletable { IEnumerable<IFundClass> FundClasses IFailureNotification Delete(); } IFundClass: IDeletable, IInvestable { IFailureNotification Delete(); } And I have a service which takes an IDele...

Using Linq expressions as a specification pattern with parent/child query

I'm trying to use the specification pattern implemented as a Linq expression so that Linq providers can parse it to produce efficient database queries. This gives the basic idea. I am having a hard time trying trying to get it working with a parent/child query class Parent { public int Foo; public IList<Child> Children = n...

Traversing Aggregates

Doing a bit of reading around domain driven design and it seems that you're supposed to access all entities within an aggregate by traversal from the aggregate root. However, at the same time you should really try and encapsulate your data so that the properties/fields are protected or private. Therefore my question is: If the fields a...

Design Methodology: use case driven vs. domain driven

Just for discussion, to me it seems that 2 different terminologies actually are saying the same thing. Is there any tangible differences between this 2 design approaches? ...

Getting started with Domain Driven Design on an ecommerce site

having a tough time figuring out how to model the expected product behavior. Basically, the customer's inventory is managed along products and skus. A product has many skus, but a single sku accounts for several product attributes. Let me give an example. Let's say i'm selling you a shirt. "Shirt" is the product with some product ID...

Domain-Driven-Design - How a UnitOfWork should be notified about entities that were updated?

Hi, There is something not clear to me about domain-driven-design and unit of work pattern. Let's say I have an entity that was retrieved from a repository. Once I updated this entity, how UnitOfWork should know that it was updated, so the updated entity can be persisted to the DB? Currently, I see two options: 1) Manually call uow.Upd...

Book suggestion on this DDD concept specific to ASP.NET MVC and JSON?

I am looking for a book or blog entry on the following DDD concepts, something specific to MVC and C# code. Quick summary: partially populated domain models from special repository methods and sending only changed domain model properties as JSON back from the client. More details: If you have a Customer object but need a drop down li...

DDD what all terms mean for Joe the plumber who can't afford to read books few times?

I am on a tight schedule with my project so don't have time to read books to understand it. Just like anything else we can put it in few lines after reading books for few times. So here i need some description about each terms in DDD practices guideline so I can apply them bit at a piece to my project. I already know terms in general...

Is non-programmatic software development feasible?

I'm currently faced with a very unusual design problem, and hope that a developer wiser than myself might be able to offer some insight. Background Without being too specific, I've been hired by a non-profit organisation to assist with the redevelopment of their legacy, but very valuable (in terms of social value) software. The develop...

Is dependency injection useful in the domain model when applying Domain driven design?

DDD Newbie question: I read in a blog somewhere that in a scenario where objects are closely associated with each other in a domain driven design, and where one object based on some complicated business rule is responsible for the creation of a dependent object, in such a design the usefulness of dependency injection is very limited. ...

DDD: Address as an aggregate root?

I’m struggling designing this system where an address is the most central piece of information. Now in this case, an address is not just a few lines of strings. We’re storing municipalities (code, name), district (post code, name), streets (code, name), house number on a street in a specific district belonging to a municipal. It's a very...

ASP.NET MVC NHibernate Model Binding

With NHibernate I no longer expose foreign keys on my domain objects, so Product no longer has a property: public int CategoryId {get;set;} but instead has: public Category Category {get;set;} Unforunately this doesn't appear to work so well with the automatic model binding in ASP.NET MVC - if I want to simply bind a form collectio...