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...
When looking at some application designs for DDD, I see that the objectgenerated from the entity framework are only used to access the data store. Once the data is loaded it's mapped to another POCO object defined in the model of the application.
Is this just good design and is done for the sake of design? Or is there some added value ...
I am trying to build a domain model that will allow me to manage Contracts.
The Contract class is my aggregate root, and it has a single property right now, which is Reviewers.
Reviewers, in the context of the Contract, each have a property to it's parent Contract, and a First Name, Last Name, and Login. The reason they have these pro...
Most books about DDD talk about aligning the tech to the business. So you have orders and payment business rules and such.
What if I write a technological applicaiton. For example if I author a visual studio like app. Is DDD not relevant, or can I say that my domain is "application development" and identify the players ("solution", "fil...
I'm trying to avoid ending up with an anaemic Domain Model, so I'm attempting to keep as much logic as possible within the domain model itself. I have a method called AddIngredient, which needs to add a new KeyedObject to my Recipe Aggregate.
As the Domain Models themselves are meant to be devoid of repositories, I'm getting the ingredi...
Hi,
In the context of DDD setters on a domain model are a code smell.
They should be avoided for the simple reason that they are not really part of the domain. There are no nouns in it that a Domain Expert may understand and changes to the data should go through specific methods instead.
Example:
customer.StreetName = ...
customer.C...
My enterprise is about to start a somewhat complex project in which we will probably use Domain Driven Design for the business layer. The project will be developed using Visual Studio 2010, and managed via TFS 2010 using the CMMI 5.0 team project template.
I think that it would be a good idea to use TFS work items to track and manage th...
Hi,
suppose I have a domain classes:
public class Country
{
string name;
IList<Region> regions;
}
public class Region
{
string name;
IList<City> cities;
}
etc.
And I want to model this in a GUI in form of a tree.
public class Node<T>
{
T domainObject;
ObservableCollection<Node<T>> childNodes;
}
public class Countr...
I don't want to store my domain model classes in the same assembly as my web platform. The Models folder in the project structure is therefore useless to me. I've however just finished the Music Store Tutorial and noticed how they create a "ViewModels" folder which makes lots of sense to me.
Does it make sense to just treat the Models...
Is there a (freely available) sample of a DDD domain model with an accompanying schema that makes use of several ORM features (inheritance, value types, etc) that could be used to test an ORM?
It's easy to create a simple Order/OrderItem schema, but that never prepares you for the intricacies down the road.
(I'm coming at this from a ....
I'm looking for a 'complete' solution for code-generation based on DDD or model first approach. Ideally, this would be a separate application or VS plugin that we could use and re-use to generate as much of the standard plumbing code as possible, preserving my custom business logic as well.
I would like to generate VS projects, includin...
Should I consider Rhino.Security components to be part of the domain
layer, used by other domain entities, or should it be used by the
Application layer? For example, I have a system where an
administrator can create new user accounts. By default these new user
accounts should have the following security settings:
Associated wit...
I have created domain model and define entities, value objects, Services and so on. Now, my query is that i have an entity called "Company" which has around 20+ attributes and i want to bind a dropdownlist control in one of my page that require only two attributes i.e. company.Name, company.Id. Why should i use such a heavy entity having...
I have a domain model that looks like this:
Instruction
| \
Money Other
/ \
Unit Cash
and I want to map this model to my DB using JPA.
All classes map to the same table in the DB, (T_INSTRUCTION).
So I started out with jpa's SINGLE_TABLE inhertance strategy. Separating the Money and Other classe...
Domain Driven Design (DDD) suggests using immutable objects or to copy object state when moving data around.
I see both good reasons for copying when setting data and when getting data.
Take the following interfaces and pretend they have implementations:
interface Aggregate {
function setEntity($e);
function getEntity();
}
in...
I've been reviewing an example of domain event design blogged about recently by Mike Hadlow and created originally by Udi Dahan.
Currently we are publishing static events on our domain objects and subscribing to them directly within our services, or via our plugin model (we locate and initialize our plugins at runtime using StructureMap...
I m applying domain driven design in my existing application using generic repository pattern in Linq2SQL,For this i m having an abstract entity class with common properties to be inherited by my other object tables,i m using structure Map for Dependency Injection.For saving and mapping my object tables to database tables i m using Syst...
I'm trying to get to light. In DDD approach we have Presentation Layer(UI), Application Layer(Application Services), Domain Layer and Infrastructure. I'm sure that anyone knows o short description on those 4 layers.
I know WCF feet in Application Layer(Application Services), and the Entity Framework .edmx model in Infrastructure Layer....
I have been practicing DDD for a while now with the 4 distinct layers: Domain, Presentation, Application, and Infrastructure. Recently, I introduced a friend of mine to the DDD concept and he thought it introduced an unnecessary layer of complexity (specifically targeting interfaces and IoC). Usually, its at this point, I explain the b...
Can someone please clarify the following;
if a have the following model;
presentation-->slide-->video
where I have identified presentation as the aggregate root, does this mean that if I want to add a slide to a presentation then I must go through the aggregate root e.g. presentation.addslide(slide myslide) and in a similar fashion if...