domain-driven-design

Mapping Linq Entities and Domain Objects and object tracking

If I map my Domain objects to linq Entities will I now not be able to track changes when saving my domain objects? So for any change in my model that i wish to make, once I map the object to linq entities for submission to db, all object values will be submitted to the db by linq since it it goes through a mapping first? Or would the obj...

nhibernate and DDD suggestion

Hello, I am fairly new to nHibernate and DDD, so please bear with me. I have a requirement to create a new report from my SQL table. The report is read-only and will be bound to a GridView control in an ASP.NET application. The report contains the following fields Style, Color, Size, LAQty, MTLQty, Status. I have the entities for S...

Is this really DDD?

I am 80% sure I should not be asking this question because it might come across as negative and I mean no disrespect to anyone, especially the author of this book. I have seen several posts recommending this book and its companion project. I have not read the book, but I have spent a few hours today studying the project. And while it doe...

Is Asp.Net MVC + CSLA + DDD Possible

I was asked to review a system the other day that was based on ASP.NET MVC + CSLA + DDD (domain drive design). The first version of this system was based on ASP.NET MVC + CSLA. The second release was based on that plus added DDD. The reason is because..... well, I don't know what. As I looked at the diagrams from the two different ar...

Business/Domain Object in ASP.NET

Just trying to gather thoughts on what works/doesn't work for manipulating Business/Domain objects through an ASP.NET (2.0+) UI/Presentation layer. Specifically in classic ASP.NET LOB application situations where the ASP.NET code talks directly to the business layer. I come across this type of design quite often and wondering what is t...

In Domain-Driven Design, can you use your domain entities in your UI?

In many leading DDD projects, especially MVC style, I see the UI using display objects that mirror domain entities, rather than using those domain objects directly. This style is obviously for decoupling and separation of concerns, and I personally prefer this style. But what I'm not sure of, is whether this a strict tenet of DDD, or w...

Allowing nulls vs default values

I'm working on an ASP.NET project that replaces many existing paper forms. One of the requirements is that the user can save the form in any state, i.e. they could create a new blank form and immediately save it with no data or with partial data. I'm validating for data type on every save but validation for required fields does not occur...

Is a Repository still a Repository without Unit of Work?

If you create a repository class that encapsulates all of your persistence logic for a given entity, such as PersonRepository, but your repository class does not implement the Unit of Work pattern or the Identity Map pattern, is it still considered a repository? In other words, are Unit of Work and Identity Map required for a repository...

DDD - Factory Method and Dependency Injection

Hello, I' am a bit stuck on a peice of design which i hope this group can help. I am new to DDD and would like an opinion on how to solve this problem. I have a Currency Value Object that needs to access a repository to get addditional data to make the class complete. The problem (or design issue) is that new instances of Currency can ...

Entity/value object selection

In domain driven design, it is common knowledge that an object with an identity is an entity. For example, any person will have several forms of identity (name, etc). But value objects are those objects with no identity. One common value object is address, however address has no identity. But at the database layer, we can have a composi...

DDD: How should adding and removing related entities be modelled?

Say we have two aggregate roots in a domain model: Group and User. Now, Users can be added to or removed from groups. Using the repository pattern, I only modelled the following two interfaces so far: interface IGroupRepository { Group FindById(int groupId); } interface IUserRepository { User FindById(int userId); IQueryabl...

DB/Entity Design: table related to any one of multiple tables

A Report can have multiple charts. The Chart table looks as follows: Chart -- Id, ChartId, ReportId, ... The ChartId above can map to the ChartId to either one of the following Chart Types: Line: ChartId, Thickness, YAxis, XAxis, Color, ... Pie: ChartId, Radius, Color, ... Bar: ChartId, Width, Color, Border, ... I am using SQL Se...

Domain Driven Development in C# - example web application

Are there any recommended examples (with source of course) on DDD in C# / Microsoft stack? ...

What is a practical way to model lookup tables in Domain Driven Design (DDD)?

I'm just learning DDD (Eric Evans book is open in front of me) and I've come across a problem that I can't find an answer for. What do you do in DDD when you're just trying to get a simple list of lookup records? Ex. EmployeeID: 123 EmployeeName: John Doe State: Alaska (drop-down) County: Wasilla (drop-down -- will be filtered based on...

Is DDD a waste of time?

Googling "What kind of applications is DDD suitable for?" gave me the following answer: Probably 95% of all software applications fall into the “not so good for using DDD” categories. (see the article) So what is all the fuss about?!? The application I am working on is mainly data-centric but still contains some business logic an...

Project architecture, using DDD

Requirements Project should contain 1 main application and some secondary sub applications (which uses the same domain objects, has some shared services, but has some slightly different too - unneeded for main app, therefore - should be separated). There should exist shared search service (probably, in different DLL) over most of the ...

Table module samples

Hello, I'm looking for some good open-source sample applications that use the Table Module pattern to organize the business logic (can be any language). Any suggestions? ...

Why should I isolate my domain entities from my presentation layer?

One part of domain-driven design that there doesn't seem to be a lot of detail on, is how and why you should isolate your domain model from your interface. I'm trying to convince my colleagues that this is a good practice, but I don't seem to be making much headway... They use domain entities where ever they please in the presentation a...

Using object's setter to trigger data updates, best practices.

I have an object that gets instantiated in a linq to sql method. When the object fields are being assigned, i want to check a date field and if it is an old date, retrieve data from another table and perform calculations before continuing with assigning this object. Is there anything wrong with triggering such an event through the proper...

POCO vs DTO: Is it ok to partially hydrate a domain object?

Its often a requirement to have a domain object displayed in various ways on the UI; lists, search results, view and edit pages, as well as in headers, footers and popups. Typically you have several different "views" of the domain object, each with different fields displayed. Most advice seems to be to use a DTO to get the data when you...