Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Which is the best pattern to use in the controller?

Page Properties
label

Status

Status
colourYellow
titleIn progress

Impact

Status
colourRed
titleHIGH

Driver

Alessandro Domanico 

Approver

Contributors

Niccolò Pasquetto Vito Romano Antonio Verni Roberto C 

Informed

Due date

Outcome

Background

The REST API layer is still under design. Different idea has been proposed up to know but still we are not sure which is the best one.

Initally, the

Jira Legacy
serverSystem JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverIdf0d90336-9135-337c-8387-a97c21b1155f
keyOP-4
has been proposed

Then the

Jira Legacy
serverSystem JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverIdf0d90336-9135-337c-8387-a97c21b1155f
keyOP-6
has started and divided in a number of subtasks

One of these subtask (the

Jira Legacy
serverSystem JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverIdf0d90336-9135-337c-8387-a97c21b1155f
keyOP-118
) changed the initial proposal to something different while not yet completed (premature merge) and while other contributors were relying on the initially proposed pattern in other isses (e.g.
Jira Legacy
serverSystem JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverIdf0d90336-9135-337c-8387-a97c21b1155f
keyOP-178
and
Jira Legacy
serverSystem JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverIdf0d90336-9135-337c-8387-a97c21b1155f
keyOP-127
)

So now the point is to adopt one of the two, with an agnostic comparison between differnt contributions.

Relevant data

  • almost 90% of ModelDTOs in “api” would be identical to Models in “core”

  • some ModelDTO may need a dedicated mapping

Options considered

Option 1:

Option 2:

Description

Linear mapping

Automapping

Pros and cons

(plus) doesn’t need more knowledge for Java Base contributors (more linear)

(minus) makes the controllers ticker

(plus) offer a centralized point for models mapping

(plus) can be customized or disabled where not required

(minus) it needs annotations (less linear)

Estimated cost

Status
colourRedGreen
titleLARGESmall

Status
colourYellowGreen
titleMEDIUMsmall

Action items

These are the proposed steps in order to take a decision

  •  Riccardo Costa continues with the linear mapping on module “OPD” as per his own OP-118
  •  Uni2grow Cameroun continues with his own work on the OP-115
  •  Antonio Verni propose a change to the initial pattern in order to make it not exlusive and applying it on other OP-6 unassigned subtasks (e.g. OP-119)
  •  Vito Romano continues his own work on OP-116 trying using the the change to the initial pattern coming from Antonio
  •  Alessandro Domanico To decide the final pattern before the end of March

Outcome