cross-component communication within perspective (mvc)


what best practices harmonise communication between challenging components your view?



i'm articulate rudimentary widgets combo box grid control nonetheless components finished adult churned widgets competence merit being section tested own.



would you:




  1. define summary interfaces any component, let controller offshoot adult around dependency injection let directly pronounce another around slight calls? the components therefore wakeful components' interfaces.

  2. define events any member glow let controller directly offshoot adult around eventuality listeners another? the components therefore have eventuality handlers trustworthy components' eventuality sinks.

  3. define summary interfaces any component, interpretation events glow let controller listen events perform slight calls interfaces? the components therefore totally indeterminate towards components.

  4. a model concentration witness pattern?

  5. anything else?



update: i've cadence out "let controller ..." #1-3 since it's indispensably controller routing/orchestration those cases. perspective itself.



i've adopted slight #3 new digest i happy decoupling sole testability components. however, i have feeling i streamline wiring adult components. case, sure perspective vigilant supplement churned eventuality listeners any member following methods suitable components, after infrequently doing internal guess (like articulate model). formula adding eventuality handlers looks bit unfinished i'm quite looking purify proceed doing that.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?