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
vote
1answer
65 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
68 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
29 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
83 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
49 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
49 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 ...
0
votes
0answers
22 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
119 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 ...
1
vote
2answers
100 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
83 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
407 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
190 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
86 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 ...
5
votes
2answers
587 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
383 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
155 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
134 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 ...
4
votes
3answers
294 views

How should I go about 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
87 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
108 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 ...
0
votes
0answers
29 views

Import many data using dto between multiple modules

I am working on a symfony application where i have complex user data coming through an external json feed. This data is usually a 100MB json feed from which i have to read user data (with all its more ...
1
vote
2answers
100 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
123 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
50 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?
2
votes
3answers
396 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
495 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
133 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
110 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
218 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 ...
0
votes
1answer
546 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
215 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
280 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
0answers
28 views

Modelling device-oriented domain

My application is connected to several hardware devices, where as for each device, there is a dedicated device client containing it's own representation of the device protocol, response/request or ...
0
votes
3answers
456 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
362 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 ...
1
vote
3answers
859 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
159 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
160 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
173 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
226 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
440 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) ...
0
votes
1answer
60 views

Should I have two identical classes in two different aggregate roots?

I have an application that is modifying some XML files. Two of the files have a similar structure, with similar business logic needed to be implemented on them. I've realized that there are some ...
0
votes
1answer
78 views

Modeling entities for company invoice management software

I am making a software to store all my company invoices (and then infer some statistics about it). The idea is: My company issues invoices to it's clients. My company receive invoices from it's ...
27
votes
4answers
6k views

Is there an industry standard for gender model other than male and female?

I am modeling a database that should be used as generic non-functional requisite for all services of the startup company, like persons, users, services and commercial data like coupons, signature ...
1
vote
3answers
265 views

Modelling recurring events

I am in the process of writing a web app to track expenses and which will be multiuser. Everything is fine with a single expense, but I am struggling to find the best way to represent recurring ...
2
votes
2answers
97 views

What exactly is the term “model” defined as in the context of Domain-Driven Development?

I am reading "Patterns, Principles, and Practices of Domain-Driven Design" by Scott Millett and Nick Tune and so far it has been a great read (first 2 chapters read) but one term they seem to use a ...
13
votes
2answers
2k views

Is domain/persistence model isolation usually this awkward?

I'm diving into the concepts to Domain-Driven Design (DDD) and found some principles strange, especially regarding the isolation of domain and persistence model. Here is my basic understanding: A ...
0
votes
1answer
131 views

How to model either relationship?

I am working on a project where a user can send email to either a contact from his directory (Internal) or type an email address explicitly (External Contact) or a mix of both. We also show the read ...

1
2 3 4 5 6