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

2
votes
1answer
72 views

DDD and edit of Aggregate's descendants

In a DDD approach, suppose I have an Order (this is my aggregate root) and a Line (a descendant of an Order). In both objects I have private setter for properties and a builder that handle creations ...
2
votes
2answers
136 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 ...
2
votes
1answer
159 views

How do you map members and their responsibilities to an organization? [closed]

I'm working on a Django project that tracks arts-related activities, and I'm stuck on the human-resources part of things. (code below) I have a class Ensemble that subclasses Organization. ...
2
votes
2answers
1k views

Anemic Domain Model, Business Logic and DataMapper (PHP)

I've implemented a rudimentary ORM layer based on DataMapper (I don't want to use a full blown ORM like Propel/Doctrine - for anything beyond simple fetch/save ops I prefer to access the data directly ...
2
votes
2answers
64 views

Domain/Model objects attributes good practices

Simple question: Should model/domain objects only include attributes that are meant to be persisted in a database or serialized to any other specific format? My understanding of a domain/model object ...
2
votes
2answers
487 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
2answers
302 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 ...
1
vote
1answer
99 views

Should a domain object wrap/contain a DTO interface?

Using .NET - I have an interface IPerson. This interface is implemented by classes in multiple, separate repositories, e.g. EF6 (EfPerson), custom SQL (SqlPerson), or even custom assembly connecting ...
1
vote
3answers
225 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 ...
1
vote
1answer
240 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, ...
1
vote
1answer
100 views

Help Improve DB model/strategy, for use in refactoring SQL-ridden legacy code

Question: Which design pattern do I use to help me refactor legacy SQL code into separate classes? Goal Bring in concepts of data separation and database separation and also latest modern ...
1
vote
1answer
42 views

Domain models with properties not always set

I don't know if to have domain models with properties that not always are set, it's a some kind of code smell or design error. I put an example: I have an app that lets read internet magazines using ...
1
vote
1answer
111 views

Domain-specific Interfaces

Are there any real benefits of using interfaces over abstract classes in a domain model? Does anyone have any experience using interfaces in a domain model in a real project? From a technical ...
1
vote
3answers
170 views

“Cross-cutting” domain in DDD

I've recently started studying Domain Driven Design and so far it looks like it will help tremendously with my team's current project. I'm running into a bit of a problem though actually determining ...
1
vote
1answer
205 views

How do you handle domain logic that spans multiple model objects in an ORM?

So I know that business logic should be placed in the model. But using an ORM it is not as clear where I should place code that handles multiple objects. E.g. let's say we have a Customer model which ...
1
vote
1answer
143 views

Cascading deletes from an aggregate root through out the entire aggregate doesn't make sense

Based on the same example for this question. Within the Pro ASP.Net MVC 4 by Adam Freeman, there is a discussion on aggregates and aggregate roots with a simple auction system. There are members who ...
1
vote
1answer
381 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
173 views

Domain model for a notification system

I'm trying to build a modular notification service in a ASP.NET MVC web application. The application generates notifications and the service is responsible for delivering the notifications to the ...
1
vote
4answers
272 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 ...
1
vote
1answer
540 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 ...
1
vote
2answers
355 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 ...
1
vote
1answer
799 views

Modular Database Structures

I have been examining the code base we use in work and I am worried about the size the packages have grown to. The actual code is modular, procedures have been broken down into small functional (and ...
1
vote
0answers
81 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
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 ...
1
vote
4answers
154 views

Domain model associations that do not required the behaviour of the associated object. How to model?

I've been struggling with this question for a while. I'm specifically thinking within the object orientated domain model. Let's say I have two entities. A supplier and a customer. There is a ...
1
vote
1answer
390 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
163 views

Technical example of modeling a domain with OOD?

Considering favoring composition over inheritance and looking at various design patterns there are multiple approaches to modeling a domain. Say you have some Entities which are very similar in some ...
0
votes
2answers
273 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 ...
0
votes
2answers
164 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
2answers
115 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 ...
0
votes
1answer
69 views

Clean architecture: should users go in the use case layer or the domain layer?

I recently read this article about Clean Architecture, as I'm trying to get out of some usual OO habits (interface design everywhere, but what does it do???), and program something that describes what ...
0
votes
1answer
164 views

How do I keep my classes in MVC from becoming bloated?

I'm not sure how I should have worded the question. If I have a Student and Classes database, and I have queries that involve both. Where do I put my queries? In one case, someone wants student ...
0
votes
1answer
855 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 ...
0
votes
2answers
171 views

Entity design for a blackjack game - should I make Card an entity?

I am creating a simple blackjack game backed by database In my Card is public class Card{ private Face face; private Suit suit; //setters.. getters } where face and suit are enums I have an ...
0
votes
1answer
70 views

Allow entities owned by one user to be referenced by other users' entities

I am working on an Asp.NET MVC web application. I have the following (simplified) entities: public class Course { public int Id { get; set; } public string Name { get; set; } public ...
0
votes
2answers
383 views

DTO - service layer - statelessness best practices interfering with each other

I am designing a REST API coupled with a service layer that takes DTOs as input and produces them as output. This works fine for most service calls where the DTO is used to access an underlying ...
0
votes
1answer
162 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
117 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 ...
0
votes
3answers
1k 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 ...
0
votes
1answer
116 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 ...
0
votes
1answer
62 views

DB modeling for staffing demand and supply

TL;DR - I'm looking for guidance with my database design. I am concerned that my existing design is inefficient and won't be able to handle large numbers of employees. This is going to be long, so ...
0
votes
0answers
62 views

Building simulation architectures : Which one to choose?

I am writing a simulation which unites discrete event and continuous system simulation. For example, you can use State Charts, System Dynamics and Queues side by side. Theese will then reduced to ...
0
votes
0answers
28 views

Domain security involving domain logic

Together with my application's domain logic I am trying to outline the security model. I am stuck with a requirement that prevents me from considering security just a cross-cutting concern over my ...
0
votes
0answers
39 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): ...
0
votes
0answers
93 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
1answer
154 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
152 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 ...
0
votes
1answer
318 views

Domain model for education [closed]

Are there any domain models already created for education industry? For example we have Prima IBCS for insurance. I was looking for something along similar lines.