jeudi 21 mars 2019

circular dependencies input fields

I've got the job to implements a specification like this:

There are 4 input fields named:

  • G
  • Y
  • P
  • Z

Change -> triggers actions in input-field:

G -> Z, P
Y -> P
P -> G, Z
Z -> G, P

this leads to the obvious problem that we result in a loop until every field got a steady change and is not triggering a change anymore.

I'm wondering if it is even a good idea to implement such a really ugly pattern, there's definitly a need for our business but I think it could be solved also in another way.

So what could you suggest? Cutting specification to a non-circular logic or just implementing stuff like this and to hope every goes well...

Aucun commentaire:

Enregistrer un commentaire