Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Which is the best pattern to use in the controller?

Status

IN PROGRESS

Impact

HIGH

Driver

Alessandro Domanico 

Approver

Stakeholders

Niccolò Pasquetto Vito Romano Antonio Verni Roberto C Riccardo Costa

Informed

Due date

Outcome

Background

The REST API layer is still under design. Different ideas has been proposed up to now, but still we are not sure which is the best one to adopt for the project.

Initally, the OP-4 - Getting issue details... STATUS was proposed. Then the OP-6 - Getting issue details... STATUS has started and divided into a number of subtasks.

One of these subtask (the OP-118 - Getting issue details... STATUS ) 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. OP-178 - Getting issue details... STATUS and OP-127 - Getting issue details... STATUS )

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

Relevant data

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

  • some ModelDTO (10%) may need a dedicated mapping

  • the Swagger documentation need to be coherent with the code

Options considered

Option 1:

Option 2:

Option 3:

Description

Linear mapping

Automapping

AbstractController

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)

(minus) it needs adjustments for Swagger documentation

Estimated cost

SMALL

SMALL

SMALL

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
  • Other Contributors to feel free to follow one of the two patterns or to propose a different one in their developments
  • Alessandro Domanico To decide the final pattern before the end of March

Outcome

  • No labels