A domain model is composed of the objects, behavior, relationships, and attributes that make up the industry that is the focus of development.

learn more… | top users | synonyms

1
vote
1answer
102 views

DDD - Business rule that depends on a service

I got confused about if a domain is required to access an external service in some state of it's life cycle. The business rule is this : If an Employee is accepting a JobSeeker's JobApplication, ...
2
votes
2answers
73 views
+50

Rich domain model and container services

I have a long experience in programming Java EE projects, but as I noticed most of the job I have done was with Transaction Script (anti)pattern. So I want to learn using a rich domain model, but ...
2
votes
2answers
132 views

Choosing an ubiquitous language across different bounded contexts

If my domain has several Bounded Contexts, but only ONE team will work on all contexts, should I develop an Ubiquitous language for each context? or should I have only one and force to into all ...
1
vote
2answers
93 views

ID properties on Domain objects in DDD

In my domain I have an Account object. e.g. class Account { public string Number; public string SortCode; } Within the context of DDD, should this account object have an ID property? The ...
0
votes
0answers
19 views

Functional tests only to testing the infrastructure layer, or test too the domain services without mocking?

This is a code example: My entities (Domain Layer): class Account: def __init__(name, author): self.name = name self.email = email My repositories interfaces (Domain Layer): ...
13
votes
5answers
658 views

Do RESTful APIs tend to encourage anemic domain models?

I'm working on a project in which we are trying to apply both domain-driven design and REST to a service-oriented architecture. We aren't worrying about 100% REST compliance; it would probably be ...
1
vote
1answer
159 views

modelling a restaurant availability search

I am looking into finding an efficient way which can scale up to thousands of restaurants, for doing a reservation search. Ideally, it would be efficient to answer queries like find a restaurant ...
1
vote
0answers
31 views

Rails: get data about a model collection, with new model or method?

have a model Product with attributes sales, views and I need to get sales/views count of all products, in this case is more correct to implement this things as method and have a call like ...
1
vote
4answers
179 views

In MV* pattern where does non-business model goes?

I am passing Menu items to View from ViewModel. My menu definition is a model with properties title, image, hasChildren and isEnabled. But this model is meant for UI unlike business domain models like ...
0
votes
2answers
216 views

How do I make a domain model that doesn't violate OOP?

My game reads a number of JSON files, deserializes them, and hands the resulting objects off to the classes that need them. These deserialized objects, which can be thought of as the domain model, are ...
2
votes
1answer
226 views

DDD: Domain Model Factory Design

I am trying to understand how and where to implement domain model factories. I have included my Company aggregate as a demo of how I have done it. I have included my design decisions at the end - I ...
2
votes
2answers
95 views

Handling “unspecified” values in software

So I'm working on a software product where we have a number of fields that the customer can leave blank, some of which are numeric. To persist these in the database we use nullable columns. Easy ...
3
votes
3answers
151 views

Ensuring transactional consistency with DDD

I am starting out with DDD and understand that aggregate roots are used to ensure transnational consistency. We should not modify multiple aggregates in one application service. I would like to know ...
0
votes
0answers
49 views

Model Driven Design with Bean Validation

If I have a rich domain library that gets included into a Java web application, but I want to achieve a level of dependency isolation with that domain library such that it is possible to build and ...
0
votes
2answers
105 views

How does one design his various architecture/business models?

I'm currently learning about various application design approaches and there's one thing I can't really get my head around. Let's say I have a physical device in my network, an IP surveillance ...
1
vote
0answers
81 views

How to isolate a massive and changeable web service [duplicate]

I am trying to come up with a way to wrap a very large web service that changes very frequently. There are 400+ types and each type has 20 to 300 attributes. The service is a SalesForce.com ...
0
votes
1answer
118 views

Several interdependent models, each with several data sources — how to avoid hell and nightmare

I'm currently working on a project that requires a complicated model structure and I'm struggling with picking the right architecture. First of all, there are several interdependent models. Change in ...
0
votes
1answer
102 views

Why aren't Entities allowed to reference other entities inside an aggregate except the root?

I have read in several places this following rule concerning Aggregates: Entities in one aggregate can hold references to any other Aggregate Root, but never to an Entity or Value Object inside ...
0
votes
1answer
99 views

Aggregate Boundary repository/service design

I am trying to apply DDD to the design of a Release Management system. Domain Entities Project: The project/product/system. ProjectEnvironment: The environments (Test, Staging, Prod) that exist ...
7
votes
1answer
314 views

Does current evidence support the adoption of Contextual over Canonical Data Models?

The "canonical" idea is pervasive in software; patterns like Canonical Model, Canonical Schema, Canonical Data Model and so on, seem to come up again and again in development. Like many developers, ...
1
vote
1answer
333 views

Web application / Domain model integration using JSON capable DTOs

I'm a bit confused about architectural choices for the web-applications/java/python world. For c/c++ world the available (open source) choices to implement web applications is pretty limited to zero, ...
0
votes
1answer
418 views

How do you formulate the Domain Model in Domain Driven Design properly (Bounded Contexts, Domains)?

Say you have a few applications which deal with a few different Core Domains. The examples are made up and it's hard to put a real example with meaningful data together (concisely). In Domain Driven ...
5
votes
3answers
3k views

DDD with ORM where should the business logic go?

I have used an MDA (model driven architecture) tool in the past where we modeled via UML and this generated the business entities (our domain model) and the ORM (mapping etc) amongst other things. A ...
2
votes
2answers
95 views

How to deal with data on the model specific to the technology being used?

There are some cases where some of the data on a class of the domain model of an application seems to be dependent on the technology being used. One example of this is the following: suppose we are ...
4
votes
3answers
279 views

Architecting multi-model multi-DB ASP.NET MVC solution

I have an ASP.NET MVC 4 solution that I'm putting together, leveraging IoC and the repository pattern using Entity Framework 5. I have a new requirement to be able to pull data from a second database ...
3
votes
2answers
482 views

Validation and data persistence in a domain model

My (first and current) workplace (a .NET shop) suffers from an over-abundance of anemic domain models, to the extent that I don't really know how validation and data persistence should be handled in a ...
5
votes
2answers
209 views

Exposing domain models over API

I'm building a simple RESTful API for a web-based application I'm working on, and I'm wondering about the best way to go about exposing my domain models. Let's say I have a User class and I want to ...
1
vote
3answers
184 views

Does an in-code enumeration provide a stronger domain model than a static table?

Does an in-code enumeration provide a stronger domain model than a static database table? As an example, say I have an Marble entity, with a Color attribute. The color attribute has a finite set of ...
0
votes
3answers
548 views

Auto - incremental ID in Domain Object

I read a lot about auto-incremental id (guid, interlocked.increment, ObjectIdGenerator...) but don't find nothing for my situation. In my domain model user ask to have an automatic progressive ...
2
votes
2answers
289 views

NHibernate and complex domain model against a legacy database

I'm trying to refactor (actually, rewrite) an application which currently uses only stored procedures to access the database (hundreds of SPs). My goal is to use Nhibernate and follow a good design as ...
1
vote
1answer
915 views

Do MVC web frameworks favor anemic domain model in order to avoid duplication?

Binding directly the form to your model helps a lot to get rid of boiler plate code, but that means that your model must have a getter/setter for each property otherwise it wouldn't be possible. ...
0
votes
0answers
145 views

Model design used in Zend Framework 1.8 Web application development

I am currently reading Zend Framework 1.8 web application development by Keith Pope. In this book an application called storefront which is a shopping cart is being built. But I am not able to ...
7
votes
4answers
981 views

Accessing Repositories from Domain

Say we have a task logging system, when a task is logged, the user specifies a category and the task defaults to a status of 'Outstanding'. Assume in this instance that Category and Status have to be ...
2
votes
1answer
314 views

How far to go with Domain Driven Design?

I've read a little about domain driven design and the usage of a rich domain model, as described by Martin Fowler, and I've decided to put it in practice in a personal project, instead of using ...
0
votes
2answers
156 views

How to salvage a business model from a mismatched database?

There is an application that involves billing enterprise customers for the services their customers utilize. The database schema does not properly reflect the business model. For instance, on a given ...
0
votes
1answer
137 views

What is the best way to represent quantity in stock in domain model?

A Transaction contains one or more LineItem. One LineItem has a relation with an Item. Every Item has a number field that represent quantity in stock. Using this approach, every Transaction ...
3
votes
2answers
275 views

Single Responsibility principle VS KISS principle

Let's assume the modeling of User model in a context of a social network. User concept is composed of two notions: Authentication elements like userName/Password/Email etc... Extra data information ...
0
votes
1answer
101 views

Extending Composite Structure model generally/in Enterprise Architect

I'm currently on a project, which integrates domain specific techniques in the modelling tool Enterprise Architect through UML Profiles. The domain specfic model almost matches the structure of the ...
2
votes
1answer
87 views

Way to allow inspection of java data model after exporting to file

I've refactored a program to remove its dependency on an sql database by storing all the state in a memory model. However the manager liked the ability to easily inspect the domain state just by ...
4
votes
1answer
51 views

How to model and query spatial responsibilites of company local branches

what are best practices, to model and query spatial responsibilities of company local branches? My company has many local branches which are all in general responsible for 1 city. This is the easiest ...
1
vote
2answers
348 views

Are factors such as Intellisense support and strong typing enough to justify the use of an 'Anaemic Domain Model'?

It's easy to accept that objects should be used in all layers except a layer nominated as a data layer. However, it's just as easy to end-up with an 'anaemic domain model' that is just an object ...
3
votes
1answer
111 views

Representing domain objects

This is related to my recent question regarding naming awkward domain objects. A number of answers indicated I was using the wrong representation for the domain objects. To summarize, I chose to use ...
2
votes
2answers
59 views

Should I use structure from a core library graphic toolkit in my domain?

In java (and many other programming language), there are often structure to deal with graphic element : Colour, Shape, etc. Those are most often in a UI toolkit and thus have a relatively strong ...
1
vote
1answer
309 views

DDD Model Design and Repository Persistence Performance Considerations

So I have been reading about DDD for some time and trying to figure out the best approach on several issues. I tend to agree that I should design my model in a persistent agnostic manner. And that ...
1
vote
1answer
411 views

Sample domain model for online store

We are a group of 4 software development students currently studying at the Cape Peninsula University of Technology. Currently, we are tasked with developing a web application that functions as a ...
5
votes
6answers
474 views

Should a domain expert make class diagrams?

The domain expert in our team uses UML class diagrams to model the domain model. As a result, the class diagrams are more of technical models rather than domain models (it serves of some sort of ...
3
votes
2answers
433 views

Can the following Domain Entity contain logic for creating/deleting other entities?

a) As far as I understand it, in most cases Domain Model DM doesn't contain code for creating/deleting domain entities, but instead it is the job of layers ( ie service layer or UI layer ) on top of ...
3
votes
2answers
69 views

Resources on securing domain models? [closed]

I'm have good resources on both security, domain modelling, and architecture patterns. I've noticed a distinct lack of any suggestion of how and where to integrate security into the systems I build. I ...
8
votes
3answers
358 views

Resources for popular domain models

I have come across many situations where I had to build a system for a library or a clinic or other popular domains. The thing is a domain model for a library was probably done 1000 times already with ...
3
votes
1answer
528 views

Domain Models (PHP)

I have been programming in PHP for several years and have, in the past, adopted methods of my own to handle data within my applications. I have built my own MVC, in the past, and have a reasonable ...