Questions tagged [domain-objects]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
3answers
257 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{ ...
2
votes
1answer
115 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 ...
0
votes
0answers
30 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 ...
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 ...
3
votes
1answer
172 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 ...
0
votes
2answers
508 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) ...
6
votes
2answers
5k 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, ...
0
votes
1answer
106 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 ...
3
votes
1answer
1k 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 ...
5
votes
1answer
488 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 ...
3
votes
2answers
163 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 ...
3
votes
2answers
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 ...
4
votes
1answer
652 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 ...
15
votes
7answers
2k 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 ...
110
votes
6answers
21k 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?
-1
votes
4answers
95 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 ...
4
votes
1answer
217 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 ...
2
votes
1answer
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 ...
2
votes
2answers
936 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 ...
4
votes
2answers
1k 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 ...
2
votes
1answer
1k 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 ...
1
vote
2answers
248 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 ...
10
votes
2answers
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 ...