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.
This idea is similar, for example file system API; Or a SQL Server API; Or any O / S API.
Comments
Post a Comment