user interface - How should nested components interact with model in a GUI application? -


Comprehensive design / architecture question If you have nested components in the GUI, to communicate with the data of those components What is the most common method? For example, suppose a component gets a click on a button to save the data. Should the request to save be handed over to the ancestors of that component, eventually the request for a controller is passed with the former ancestor?

Or model / dataseters usually a single song in the GUI application, so that at any level can a component get a hierarchy directly / get the data?

Or is there a controller injected as a dependency in the hierarchy of components, so that only one intermediary can be removed from any component datastore / model?

My first idea is to define a singleton data-layer API, which is callable by GUI components is.

P> If you want many examples of data, leave the 'handles', which can be stored by GUI components, and can get data by passing near the data layer Are there.

This idea is similar, for example file system API; Or a SQL Server API; Or any O / S API.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -