Questions tagged [domain-model]

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

Filter by
Sorted by
Tagged with
-1
votes
1answer
14 views

How important is abstraction in a class diagram?

Could someone please elaborate on what exactly abstraction is and why do we need it in a class diagram, trying to model the problem domain? I have read many articles from various websites and academic ...
4
votes
1answer
95 views

Do Domain Objects Have To Be Persisted?

Does a domain object have to be persisted, or does this violate some convention about domain objects? For example, let's say I'm using an object called AuthenticationState to represent authentication ...
3
votes
1answer
93 views

How to name a domain concept when experts use different terms?

The DDD literature is quite clear that when a word/term has a different meaning for different users, a Bounded Context should be created to be able to separate the domain models. I'm facing the ...
1
vote
1answer
46 views

Defining domain logic and finding the correct place to put it

I've been practicing DDD and refactoring an app to understand it's principles and applications better. However I can't fully grasp some of the ideas and how to implement them in my business domain. ...
2
votes
1answer
97 views

How to model an action that involves more than one model?

I'd like to start by saying that I'm new to DDD and I'm creating a hobby system to practice some concepts, so this question might be trivial, but not so much for me. I have the following scenario: I ...
0
votes
2answers
61 views

How can domain modelling coexist with certain database optimisations?

I'm currently working on a .NET project where we'd like to perform some computations directly on the database for efficiency (e.g. performing a join and count on the database to check if a user has ...
0
votes
1answer
68 views

What is correct way to accept arguments in Domain Model when you want to add item?

I'm looking for ways how to accept arguments in the domain model when you want to add items in it. Let's take a look at this example: public class Order { public ICollection<OrderItem> Items ...
2
votes
4answers
206 views

When are Description classes useful

A book called 'Applying uml and patterns by craig larm' emphasized the use of Description classes in software designing. For example, the book pointed out why putting attributes such as description, ...
1
vote
1answer
135 views

Is there an equivalent to “aggregate” outside DDD?

Edit 2: Thinking about the problem some more I realized that "Can aggregates be used outside DDD?" was not the right question, hence I changed the title. For the reasons described on the ...
0
votes
1answer
78 views

Using a domain model to persist metrics

I am currently developing a spring boot web application in which no entity is persistent, and hence will not be saved on a database. Although, I need to be able to query some business metrics from it. ...
1
vote
1answer
107 views

Clean Architecture: Can Use Cases Imply UI?

In the chapter "Business Rules" of his book "Clean Architecture", Robert C. Martin comments on the relationship between use cases and the UI: [...] the use case does not describe ...
0
votes
0answers
159 views

How to achieve both: clean (hexagonal) architecture with JPA goodies?

How do I achieve two things at the same time writing Java Spring Application: Clean Architecture JPA goodies (@Transactional, Optimistic Locking, dirty checking, etc.) I like the idea of database/...
1
vote
1answer
194 views

Is it necessary to have DTO to domain entity mapping always?

I am working on a WebAPI application which follows the layered approach like Controller > Service Layer > Repository Layer > Entity Framework Core (SQL / Cosmos) The view is in Angular. In many of ...
0
votes
0answers
85 views

.NET core: Independent view model and domain vs. common data annotation via ModelMetadataType and interface

I'm building a .NET core/standard application that should support different UI platforms (ASP, API, Winforms/WPF). Rich domain model is perfect for databinding in winforms and WPF by itself. However, ...
-2
votes
1answer
54 views

How many states to be associated with an Order entity?

I am currently adding functionalities to Order Entity and have a column storing the state of the current order in Status. Order goes through the following workflow with minor deviations I have not ...
1
vote
0answers
40 views

Separating generated flatbuffer/protobuf files from domain model - best practices

I'm using flatbuffers for the first time. I've generated my java classes and have tested out serializing / deserializaing a message. Now I'm thinking about how to integrate these in to my JavaFx and ...
3
votes
2answers
137 views

DDD, Aggregate Root and entities in library application scenario

I'm building a library application. Let's assume that we have a requirement to let registered people in the library to borrow a book for some default period of time (4 weeks). I started to model my ...
2
votes
2answers
434 views

Domain Driven Design - Updating and persisting aggregates

I'm trying to wrap my head around the best possible solution in the following situation: When updating part of an aggregate, could be any part of the aggregate so either the root or any other entity, ...
1
vote
2answers
85 views

What's the best convention to store “other” option?

Say I have a Person object. I need to ask the user to choose from a list, which laptop they have. They can also choose the option "My product isn't listed here". Now the Person object will look ...
4
votes
4answers
648 views

What kind of logic can Domain Objects realistically contain?

I have been struggling with this concept in the context of web applications ever since I first read about it. The theory states that the domain objects should encapsulate their behaviour and business ...
2
votes
1answer
65 views

Persistent data structure changes for changing domain model

I've learned many ways to keep a domain model flexible over the years, but there is a remaining case where the setup resists change. Suppose that we have kept our domain model properly isolated: we ...
1
vote
2answers
377 views

How to deal with bad third party APIs in a microservices architecture?

I'm currently in the process of transforming a monolithic application to a microservices based architecture. The monolith is dependent on third party services (as in other departments) for its data. ...
3
votes
1answer
327 views

How can I provide a class diagram for a system that contains creation of an object that contains a combination of property?

I am designing a system that contains organizational hierarchy management. There are four roles in the system which are the user, admin, manager and head of procurement: I am trying to let the ...
7
votes
3answers
2k views

Domain vs Entities model? Domain-Driven-Design (DDD)?

In this github, https://github.com/johnph/simple-transaction, under the Transaction.Framework project, there are entities (located at Data/Entities) AccountSummaryEntity.cs AccountTransactionEntity ...
2
votes
3answers
680 views

In domain driven design, is a timestamp a property or a value object?

I have some entities and some value objects that need to record the moment they were made. Now I read that a value object is a collection of properties with its own set of rules, and two value objects ...
1
vote
1answer
299 views

Loan Amortization Schedule - Precision and rounding

I have been playing around making amortization schedules in PHP. My php.ini currently has the precision set to 14. I understand going into this that there will be rounding errors however I am hoping ...
2
votes
3answers
135 views

Modeling different types of “Posts”

I have different types of posts a user can create: TextPost ImagePost VideoPost The frontend client needs to retrieve the last 10 posts from a user. I am wondering how to model this structure ...
6
votes
5answers
476 views

What is a good approach to naming when modeling a sport that can be between either individuals or teams?

Tennis is played as singles or doubles. I considered making my tennis scoring model logic refer to "teams" throughout its naming since "player" wouldn't take into account doubles. However, seeing ...
1
vote
1answer
90 views

API design for data model with frequent field name updates

I have an external data model framework with frequent updates to the names of fields. Say for an iteration I implement on - EnterpriseModelObject -- EnterpriseDomainContentList --- ...
1
vote
2answers
116 views

What is a good domain model in this case?

I have a grid of values, something like [ [0,3,1], [0,2,5], [1,0,3], ] I have objects that move on that grid, so they have positions { x: 1.87, y: 1.21 } If we check the upper ...
1
vote
2answers
104 views

Need good design: Anemic Model, Inheritance and Pattern Matching

I have Handler classes which accepts Queries and returns Results. Handlers is anemic. They accept input data bag and returns output data bag. Handlers can be many so I created common generic interface ...
2
votes
2answers
129 views

Different types of account transactions

I'm working on a system where users have different types of 'Accounts' of the financial type. I'm struggling to come up with a design that works. Background A user has 2 types of accounts: A 'tab' ...
-1
votes
1answer
57 views

Software Architecture - Defining an extension in a domain model

If you had a domain model like this one: How would you define an extension (something that would only happen as an exception)? Do you draw a box around it like you do in a e.g. a sequence diagram?
3
votes
3answers
823 views

DataAccess Layer coupling with Domain Layer

We have an issue with how the implementation of the Data Access layer (EF6 Includes more specifically), influences the behavior of our Domain layer. A theoretical example to illustrate: Application ...
0
votes
2answers
845 views

Object and actors in sequence diagram [duplicate]

question Can an actor "talk" directly with an object of the system in a sequence? example For an homework I need to model a "tracking service" for some shipping company. The functional requisites ...
1
vote
1answer
219 views

Domain Driven Design - Bi Directional association between aggregates

I've been struggling with modeling something out correctly, the DDD way. The use case is quite simple. You're a User, and you can be part of a Group. So we have a 1 - many between group and users ( ...
1
vote
1answer
127 views

DDD - Hardcoded Ids in Domain Model [closed]

I have a Business Layer, where I have put all the Entities of the Domain Model. Also there are Domain Services, where I put Domain Logic related to n Entities. One entity is : public class ...
2
votes
2answers
319 views

Is making your ORM DAO a subclass of your Domain Model object a viable strategy?

I am trying to separate my domain model and associated business logic from my persistence model, particularly such that the domain model has no dependency on the ORM. One apparent way to do that was ...
1
vote
1answer
817 views

Domain Driven Design // Navigation Properties and Aggregate

I'm currently making a REST API, using DDD. As ORM i use Entity Framework Core, this ORM has easy mappings for navigation properties, as you sure are familiar with. My question is about navigation ...
2
votes
1answer
329 views

DDD - how to model an aggregate using data from 2 other aggregates to make a business decision

I'm stumbling trying to find a proper way to model this scenario: I have 3 different aggregates within same Bounded Context: A Student A University A University of Interest public class Student : ...
6
votes
2answers
468 views

In Hexagonal Architecture, can a UseCase call another UseCase?

My layers are like: Controller (Http) -> Use Case -> Domain Services Imagine that I have a PurchaseController which is just getting the parameters from the Http Request and calling the ...
0
votes
3answers
691 views

Domain Models with complex properties construction

According to this article: Using Ids in Domain Models is not a good practice. We should reference the entire domain model instead. In this case, when we want to provide only Getters for our ...
1
vote
2answers
130 views

Would I have one domain model (.NET Project) for all consumers or one domain model (.NET Project) per consumer?

Say I have a bounded context called: 'Loans' and the following APIs: HSBC NatWest TSB The three banks above are consumers and have an API. I am using the scatter gather pattern (https://www....
1
vote
2answers
411 views

Domain models vs entity models vs Hibernate lazy loading

In a new Java project I plan to use an extra layer above Hibernate entities. So there would be a CustomerEntity and CustomerDomain. The reason for that is that the CustomerDomain can contain extra ...
3
votes
3answers
1k views

REST model sharing between client and server

Consider two facts of a typical organization: Some entities are very common (e.g. Order in a POS system) Some entities might have complex relations (e.g. Order might have a list of Items, a ...
0
votes
3answers
164 views

Can an entity include “technical” (not business related) information?

I want to to follow a clean architecture rules (with domain and architecture layers). I have a problem with properties that an entity should or should not have. Let's say that I have a User domain. ...
2
votes
4answers
166 views

Migration from Anemic Models to Rich Models

I am looking into improving my overall application architecture and (I think) I understand the issues my Anemic Models are causing. Here is my current architecture: Controller with injected Service ...
3
votes
1answer
187 views

DDD - Aggregate that changes “owner” mid-process

We're evaluating CQRS/ES for a high-volume subsystem in our app in order to take advantage of distributed systems and ensure uptime. This is my team's first time implementing this architecture, and I'...
-1
votes
5answers
230 views

Design Pattern for object that asks questions of another object

I'm looking for a design pattern that might work for this class I am working with. This main class is an entity using Domain Driven Design. public class TimeCard() : ITimeCardHeader { ...
0
votes
2answers
550 views

Domain Driven Design Modelling Organization -> User

Relatively new to Domain Driven Design i decided to try it out in an saas app currently under development/refactoring. I've refactored the identity part out to it's own context (class library in .net) ...

1
2 3 4 5 6