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
1answer
47 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: ...
0
votes
1answer
50 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 ...
1
vote
0answers
797 views

Proper way to map Entities to DTOs in TypeScript

In a recent project my backend architecture consists of Repositories (talking to database) Services (handling business logic) <...
4
votes
1answer
95 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 ...
4
votes
1answer
67 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 ...
1
vote
1answer
240 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. ...
2
votes
0answers
228 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 ...
4
votes
1answer
1k 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 ...
0
votes
1answer
5k views

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

Consider I download my data into this data structures: ...
1
vote
1answer
7k 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 ...
3
votes
1answer
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 ...
2
votes
1answer
359 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 ...
6
votes
1answer
515 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: ...
4
votes
1answer
114 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 ...