Proxy, DataProcessor and DataDriver relationships

Hello Webix team!

Relationships between Proxy, DataProcessor and DataDriver are uncler for me.

For example: what for does Proxy object methos [save, result] have the DataProcessor as an argument?
As I understand:

  • the Proxy object responsible for data loading.
  • the DataProcessor cares about sending changes to the server side
    And these operations aren’t crossing ones, in my mind.

Also, it’s unclear when and where the DataDriver comes into play.
Does it process data given from the Proxy object but not from DataProcessor, doesn’t it?

Could you clarify these unclear moments, please?

Thank you in advance!

Hello @KlimAlex !

Relationships between Proxy, DataProcessor and DataDriver are uncler for me.
For example: what for does Proxy object methos [save, result] have the DataProcessor as an argument?

Proxy can replace default logic of request-response processing. Through the proxy, you can customize the request type, its parameters, callback and add some additional methods.

DataProcessor is intended for data saving/updating. It decides when the update request should be triggered (before the proxy) and can handle the result of the response (can be called form the default callback in some proxy configuration).

DataDriver is not strictly related to the server-side interaction. It is a client-side module that handles the incoming data format (according to the specified datatype) whenever the data is received by a component. As all Webix data components work with JSON, it provides a possibility to turn any format of data into the readable format.

As an example, please check one of the DataProcessor features
https://docs.webix.com/desktop__dataprocessor.html#dataupdatingfromserverresponse

After response is received, it is possible to update the client-side data with the new parameters which has come from the server (corrected file name, for example). This can be done when

  1. updateFromResponse is set in the data processor
  2. dp.processResult( /arguments/ ) is called in proxy callback.
1 Like

Hello @Nastja!

Thank you very much for your concise and very helpfull clarification!