Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ah, sounds good. Do you mean the grid keeps front-end and back-end data synced? DGXL does not offer that at this moment. You could probably recreate something like it by using getData and setData methods and implement some kind of AJAX communication.


The grid itself doesn't proactively try to equalize frontend and backend data, but I utilize backend orm signals to generate websocket events which are then captured by a javascript callback in the frontend and sent to the grid. The grid then updates immediately reflecting the changes. There is no need to send the entire dataset, though, just the changes.


Is that what "dataSource" does? (https://js.devexpress.com/Documentation/ApiReference/UI_Widg...)

I don't know DevExtreme and I have to admit that I find the API Reference a little overwhelming. If I can introduce more ways to communicate between back-end and front-end, I am all for it of course.

Do you think the websocket approach for grid/tables is a common one among web devs? A link to a specific code example would help me understand the approach better.

Thanks for your feedback!


The data source is an observable which triggers changes in the widgets that listen to it. A nice way of avoiding slow widget updates is to disable animations while making big changes to the data source. It also helps decouple UI code from business code. It even gives you the opportunity to react to widget changes such as adding a row or changing a cell without reading code directly from the widget's internal data structures or DOM.

This is a common theme among many widget providers. If you work a little bit with lazarus or delphi, you will understand throughly what I mean.

Now how common is streaming backend changes to frontend using websockets? I would say it is pretty common among the financial industry, streaming trades and quotes directly to the UI. Bloomberg, investing.com and many in-house systems that require live updates probably use this.


I see. I did spend a few months on a crypto trading platform and they had this frequent-updating table to display latest prices for each currency. DGXL really is an input-first component, so I haven't thought of this websocket approach.

Still, DGXL has methods like setCellValues, among others, that let's you update a part of the grid, not the entire grid. And it's super fast because of DGXL's virtual DOM.

Thanks again!




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: