70 likes | 165 Views
Debugger Services Framework (DSF) View Model. Device Debugging Project Update by Pawel Piech Wind River Systems, Inc. Flexible Hierarchy: Delta Generation. View. Root. X. Y. Event: Change State. Z. Knows Full Path. Model Event Proxy. Generates Delta Root: NO_CHANGE
E N D
Debugger Services Framework (DSF)View Model Device Debugging Project Update by Pawel Piech Wind River Systems, Inc.
Flexible Hierarchy: Delta Generation View Root X Y Event: Change State Z Knows Full Path Model Event Proxy Generates Delta Root: NO_CHANGE X: NO_CHANGE Y: NO_CHANGE Z: STATE
Flexible Hierarchy: Delta Generation (Notes) • Model Event Proxy for element "Z" needs to know the full path of Z in the view in order to generate the Delta. • Reusing the Model Event Proxy in views with different layouts is difficult because the view layout in hard-coded in its implementation.
DSF "View Model" Structure View View Model Root Context Root Node Context X1 Node X Context X2 Context Y1 Node Y Context Z1 Context Y2 Node Z Context Z2 Context Z3
DSF "View Model" Structure (Notes) • A view model is composed of a hierarchy of "Layout Nodes", where each node can have a number of "Child Nodes" • A layout node generates "Context" wrappers for elements which are used to populate the view. • Each node is self-contained so that it holds no references to other nodes in the model. • When handling updates and events, layout nodes use the TreePath of an element to extract data needed for the given evaluation. • Layout nodes can be arranged arbitrarily, however some nodes may require that certain elements be present in the TreePath when performing evaluations. • Layout of nodes for a given view can be changed at runtime.