K
K
Konstantin2021-02-04 03:17:28
Software design
Konstantin, 2021-02-04 03:17:28

What approach should be taken in design?

What approach is better to apply for the case when there is a tree with many nested nodes, next to each there can be either a checkbox or an input field. Depending on the type of element, you need to substitute different click processing logic. What is the best way to design this? The command and mediator pattern comes to mind to delegate.

But what if each checkbox taken requires its own click processing logic?
Thanks to!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2021-02-04
@Junart1

strategy or decorator

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question