2022 Developer Survey is open! Take survey.

Questions tagged [domain-objects]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
0 answers
257 views

Clean Architecture, what are objects that does not completely fit as entities?

I'm reading chapter 20, "Business Rules", of clean architecture book, in this chapter Uncle Bob defines entities as: An Entity is an object within our computer system that embodies a small ...
user avatar
0 votes
1 answer
188 views

Best practice to create model objects in Java

I have an existing microservice that talks to a Natural Language Processing (NLP) product and fetches around 50 fields. I need to create domain objects in Java now from these fields. I read about ...
user avatar
1 vote
3 answers
233 views

How to model and unit test code with multiple side effects?

How to unit test code that requires multiple side effects? For example, making an invoice. Simple action requires few thing to happen simultaneously: create invoice in db send invoice to backend ...
user avatar
  • 181
4 votes
3 answers
494 views

Should the DTO be able to parse itself from and to Domain?

Let's say there's the class Book, with different models in different endpoints: Endpoint A (consumer): class Book{ Map<string,string> chapterName_content } Endpoint B (provider): class Book{ ...
user avatar
2 votes
1 answer
174 views

How to model Business Objects depending on use cases?

I'm having trouble modeling the Business Objects of my application. In my domain I have substantially a list of bills of orders, and for every bill I have the pallet that contains the materials to ...
user avatar
  • 59
1 vote
0 answers
144 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 ...
user avatar
1 vote
2 answers
87 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 ...
user avatar
  • 111
3 votes
1 answer
252 views

What domain objects might I need to represent a user and users profile in a forum web application

I’ve been trying to get a firm understanding of the MVC design pattern so that I can write my own framework for implementing the back-end of a forum web application using Slim 3. In particular, after ...
user avatar
0 votes
2 answers
920 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) ...
user avatar
  • 17
8 votes
2 answers
7k views

Separating Domain Object and Data Models

I looked through a lot of articles, blogs, and SO topics about separating domain object and data models. Almost every answer said: You should have separate classes for the domain and data persistence, ...
user avatar
  • 267
1 vote
1 answer
160 views

Domain model and feature Crypter

In my project I must implement a feature for encrypting some information when it is written into the database, and decrypt the information when it is reloaded. Should this concept be implemented in ...
user avatar
4 votes
1 answer
2k views

Domain Model vs Service in a MVC context

At the end of this article from Martin Fowler there is this sentence: In general, the more behavior you find in the services, the more likely you are to be robbing yourself of the benefits of a ...
user avatar
  • 461
5 votes
1 answer
730 views

Where does business logic go that involves multiple aggregates?

I'm still a beginner when it comes to domain driven design, and I am trying to model something like an RPG's battle system as a bounded context. I am trying to model a bounded context in which a ...
user avatar
  • 161
3 votes
2 answers
180 views

Where to put domain classes in a component structure and diagram?

I've got a microservice called ExamResults, with a very simple component structure: ExamResults (offers: IExamResults) (requires: IExamResultsDAO) ExamResultsDAO (offers: IExamResultsDAO) This ...
user avatar
3 votes
2 answers
1k views

DDD: must all Aggregates model relationships, or they can be "shallow"?

Sometimes my Aggregate will be very simple; some scenarios are simply not complex enough to require deep trees of objects and relations. Consider a Website Monitoring application, which periodically ...
user avatar
  • 788
4 votes
1 answer
788 views

In MVP, should the View have access to Domain objects?

Let's say I have a form for representing a user. When pressing the "Save" button, should a User object be: constructed by the View based on the input, then passed to the Model via the Presenter and ...
user avatar
16 votes
7 answers
3k views

Primitive vs Class to represent simple domain object?

What are general guidelines or rules of thumb for when to use a domain-speciifc object vs a plain String or number? Examples: Age class vs Integer? FirstName class vs String? UniqueID vs String ...
user avatar
  • 281
115 votes
6 answers
28k views

What is a domain?

I see this term a lot in the context of software architecture ("domain-model", "domain-driven-design" etc.). I have googled it, but I get tons of different definitions. So what is it really?
user avatar
-1 votes
4 answers
102 views

Is there a term for an entity that represents another known missing entity?

I am working on a project where I am importing data from 3rd party sources. Often certain data is missing (usually older data), which is detectable from the data that I do have. Obviously I cannot ...
user avatar
  • 1,103
4 votes
1 answer
254 views

Making a change-prone class immutable

According to Effective Java's Item 15: Minimize Mutability, it is always better to make classes Immutable. According to that, how would I handle classes that are by nature given to change? Some ...
user avatar
2 votes
1 answer
1k views

How do you define Domain Objects and Repositories, when dealing with multiple database tables?

Imagine an application that allows you to add line items to a quote. The end result is like a sales person giving you a printed sheet with information such as name of the business, name of the sales ...
user avatar
  • 8,021
2 votes
2 answers
1k views

Domain Driven Design - Aggregate Roots When All Data is Needed from Child Node

I'm struggling with a DDD concept in designing aggregate roots. I have a Client, which has multiple Projects, Projects have multiple Project assignments, which has multiple Employees. It seems natural ...
user avatar
  • 271
4 votes
2 answers
2k views

is it bad practice that controller call domain objects(entities) direclty instead of service?

is it bad practice that controller call the methods of domain objects directly instead of service? to explain more: I figure out that in good design controllers call service and service use Domain ...
user avatar
  • 396
2 votes
1 answer
2k views

Is a class representing a JSON response a DTO, a domain object, or something else?

Consider a restful service in Spring MVC. I am wondering how to package my response classes, i.e. how to name the containing package. First I thought of them as being domain objects. But they are ...
user avatar
  • 143
1 vote
2 answers
252 views

How can I create a model to efficiently answer the question of - where to place my db-interaction code I am about to write?

I am seeking the right model for storing and retrieving data, when working with any specific class, while keeping in mind the bigger picture. Details: I have some SQL code in (one) of my classes and ...
user avatar
  • 8,021
10 votes
2 answers
2k views

JavaFX - the right way to use Properties with domain objects

JavaFX has provided a bunch of new Property objects, such as javafx.beans.property.DoubleProperty which allow you to define fields which can be automatically observed and synchronised. In many JFX ...
user avatar
  • 101