common-workflow-language / common-workflow-language/cwlviewer

Split database entities and response serialized objects (DTO)

Aperta
#379 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
52
Fork
29
Merge medio
5h 12m
PR unite (30g)
6

Descrizione

It's normally considered a bad practice to have the database model classes also being used to send data to the user in responses.

It's better - and IMHO easier to maintain - to have the database model classes with its single responsibility, and move all de/serialization specifics to DTO's (or any other acronym like VO/POJO/DO/etc used in the project).

## Description

Part of #254 . Realized I was having to deal with the MongoDB specifics and also with how data is de/serialized :disappointed_relieved: It would have been a bit simpler should these two were separated entities.

## Expected Behavior

Separate classes, separate concerns.

## Actual Behavior

## Possible Fix

## Steps to Reproduce

NA

## Context

## Your Environment

* Version used:
* Environment name and version (e.g. Chrome 39, Java 1.8):

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.