Data object

1. Introduction

    The data object model is the middleware between data and interface. Interfaces such as forms, tables, and trees can be quickly implemented through data objects.

2. Design thinking

  • By data structure
    There are currently two data models. One is DataObject that represents two-dimensional table data, and the other is TreeModel that represents tree-structured data.
      
  • Operational interface
    The data model defines the interface for manipulating data. For example, DataObject has CURD-related interfaces, and TreeModel has interfaces for obtaining nodes and child nodes. The specific data model needs to implement these interfaces.
      
  • Display
    The data model defines how properties are displayed. The interface generates corresponding components based on these properties.

    Since it is middleware, the data model itself is abstract, and the data interface and interface need to be implemented concretely. However, it is not necessary to implement every specific data model and interface by yourself. For example, if you implement a DbDataObject and then use it to write specific database data objects, there is no need to rewrite it.

3.Example

    For example, in the 26-second video below, the currency code is a CSV data object. By binding it to the table through DataStore, the table can display the contents of the data object. For more examples, see Example-Data Object.

 

Copyright ©  2007-2019 XWorker.org  版权所有  沪ICP备08000575号