Questions tagged [dto]

Data transfer object (DTO) is an object that carries data between processes. The motivation for its use has to do with the fact that communication between processes is usually done resorting to remote interfaces (e.g. web services), where each call is an expensive operation.

Filter by
Sorted by
Tagged with
2 votes
1 answer
116 views

Is it good way to user dao when assembling dto to entity or not?

I have User entity that has relationship to other entities(Order,Profile) When I assemble entity from dto and back I need assemble order and profile entity too. User entity: ...
DozezQuest's user avatar
2 votes
1 answer
67 views

API endpoint that returns phone numbers

Background An API endpoint that returns phone numbers. I would appreciate some feedback on this very simple service class that is part of the overall solution. Here is its Interface: ...
J86's user avatar
  • 424
0 votes
1 answer
84 views

Business Layer Using DTOs and DataTables

I have a business logic layer class for creating and updating work orders, it also retrieves existing work order details from the database and displays it to the user on a form. The business logic ...
Brendan Jacobs's user avatar
3 votes
0 answers
8k views

Mapping Entities to DTOs in TypeScript

In a recent project my backend architecture consists of Repositories (talking to database) Services (handling business logic) <...
pschild's user avatar
  • 131
5 votes
1 answer
177 views

Replacing Uri with a more convenient class

I needed some data structure for holding Uris so I thought I try the Uri class. It quickly turned out that it's very impractical because: it's missing an implicit ...
t3chb0t's user avatar
  • 44k
4 votes
1 answer
80 views

Preparing tabular data to be sent as json

I query a database and pass the data for processing as a DataTable. After all computations (grouping, filtering, formatting etc.) I need to send it to a Web-Service ...
t3chb0t's user avatar
  • 44k
1 vote
1 answer
1k views

Return combined DTO from async controller

I have an asynchronous controller. It is supposed to make a couple async calls then return combined data from then as one DTO. ...
szpic's user avatar
  • 177
2 votes
0 answers
307 views

Generic Builder in Java needs annotation support

I was thinking about how to minimize the code needed to implement a builder. There is some code that any builder needs to have: Temporary storage of property values Validation of type Null check ...
Timothy Truckle's user avatar
4 votes
1 answer
2k views

Code for a Person DTO, with tests

My needs are to manage DTO in a php5.3 application. I've written few lines of code in TDD with phpunit 6. The scenario I want to implement is a request with following fields: name surname password ...
sensorario's user avatar
0 votes
1 answer
7k views

Map a hierarchy of nested DTO objects to a list of business objects [closed]

Consider I download my data into this data structures: ...
user avatar
2 votes
1 answer
8k views

Mapping interface between POJOs and DTOs

Following up on this question DTO interfaces for implementing web service integration I came up with this implementation. Data Transfer Object interface following a java.util.Map protocol. The ...
dmz73's user avatar
  • 151
3 votes
1 answer
3k views

DTO interfaces for implementing web service integration

I am trying to define some interfaces to implement some web service integration middleware. The SOA pattern that fits this system is probably the Multi-Channel Endpoint. I expect a lot of mapping of ...
dmz73's user avatar
  • 151
2 votes
1 answer
421 views

Passing a DTO into a static domain 'Create' method

I'm wondering if it's bad practice to couple my DTO to my domain object like this and pass the object itself into Create(). Is it better to just give the parameters ...
Sean Anderson's user avatar
6 votes
1 answer
555 views

Implementing a domain model

My domain model consists mostly of simple DTOs, i.e. 'Data Transfer Objects' which this article distinguishes from 'Plain Old C# Objects', like this one: ...
Big McLargeHuge's user avatar
4 votes
1 answer
116 views

Is the "current connected user" an information that should be shared with the domain?

I'm working right now in a readers social network. The main points are this: When an user connects with his account I save his user id in the session variable. My MVC is working with DTO's all the ...
Tomás's user avatar
  • 143