Stemon63 Posted June 23, 2025 Posted June 23, 2025 What I would like for Christmas in Unigui: After the first steps towards "stateless" in the management of HyperGrid, what is really missing to consider it a product for "Enterprise" applications is the complete management of the Crud only on the client (as an option). Keeping the "deferred" update approach (cached updates) I miss the management of the Dataset directly on the client side, to which to connect both the Dbgrid (or better Hypergrid, in this case) and ALSO ALL the DB editors. This option would allow us to move the entire CRUD cycle to the client, including data input and validation, before sending, all in one, all the changes to the server. What Hypergrid is now able to do, the "HyperDataset" should do 🙂 In this way, by managing the events of the dataset (unfortunately with Javascript code) we can have complete data management without "chatting" continuously with the server. (I discovered some users who enjoyed scrolling up and down the grids continuously to saturate the server 🥺 ). In practice, in a totally "stateful" system like Unigui we lack a data management part via dataset that is instead "stateless" until the operations are confirmed or abandoned.  So I could manage thousands of users instead of hundreds, where most of the time only some specific CRUD functions are involved (invoices, inventory, registers, tax returns, billings, etc.). I hope Santa Claus listens to me... 🙂 1 1
Stemon63 Posted September 10, 2025 Author Posted September 10, 2025  Hi, Any comments, suggestions, opinions, or anything else about my request? 🙂Â
Hayri ASLAN Posted September 10, 2025 Posted September 10, 2025 Hello, Hypergrid will get lots of updates.
Stemon63 Posted September 12, 2025 Author Posted September 12, 2025 Hello Hayri, great news! But I talk also about a "HyperDataset", a kind of CLIENT dataset e datasource clones with DBeditor attached! Imagine a form with a grid and DB editors for CRUD, all client-side and with no interaction with the server during any operation (other than Load). Ultimately, the delta generated in the dataset can be sent to the server (ApplyUpdates) or deleted if the operation is rejected. This is exactly what HyperGrid already does, but performed by the dataset client. Essentially, all CRUD operations are entirely client-side, on a Store hidden into a HyperDataset. 🙂
Administrators Farshad Mohajeri Posted September 15, 2025 Administrators Posted September 15, 2025 Hi Stemon63, There's a client dataset indeed. It is an Ext JS DataStore which is not visible to you but it is there and keeps all changes until submitted to the server. https://docs.sencha.com/extjs/7.9.0/modern/Ext.data.Store.html   Â
Abaksoft Posted September 15, 2025 Posted September 15, 2025 Hi, I asked their chatBot :  Is it possible to work with a DataSet locally (Clientside) and then send all changes to the server ? Yes, it is possible to work with a dataset locally on the client side and then send all changes to the server using Sencha Ext JS. You can use the Ext.data.Store in combination with a proxy to manage data locally and synchronize changes with the server. Local Data Management: You can use Ext.data.Store to manage data locally. You can add, update, or remove records in the store. The store can be configured with a proxy to handle data operations. Local Storage: You can use Ext.data.proxy.LocalStorage to store data locally in the browser using the HTML5 localStorage API. This is useful for saving user-specific information without needing server-side infrastructure. Synchronization: To send changes to the server, you can use the sync method of the store. This method will perform a batch of operations (create, update, delete) on the server based on the changes made to the store. Here is an example of how you might set this up:  Ext.create('Ext.data.Store', { model: 'MyModel', proxy: { type: 'localstorage', id: 'myLocalStore' } }); // Add, update, or remove records in the store var store = Ext.getStore('myLocalStore'); store.add({ name: 'New Item' }); store.getAt(0).set('name', 'Updated Item'); store.removeAt(0); // Synchronize changes with the server store.sync();  For more detailed information, you can refer to the documentation on Ext.data.proxy.LocalStorage and Ext.data.Store.
Stemon63 Posted September 16, 2025 Author Posted September 16, 2025 Great! But I knew that. What I'm trying to suggest is creating a Delphi component (HyperDataset, for example) that encapsulates the Extjs DataStore (which HyperGrid and UniDbgrid already do) and makes it available to us at design time, to which we can connect the visual DB components (UniDbedit, etc.) and grids. Exactly as we do now with an FdQuery or any dataset. At that point, however, the dataset management is entirely client-side, with only the LoadData and ApplyUpdates events handled on the server. It goes without saying that I want a Unigui component 🙂 (By the way, I've already published a demo using the ExtJs Store for lookups) This completes the work already done for Hypergrid, but extends it to the dataset and therefore makes it accessible to DB components. Clearly, the control and calculation logic for individual records is handled in the client code, not managed by the server except when ApplyUpdate is performed (after the fact). 1
Sherzod Posted September 16, 2025 Posted September 16, 2025 @Stemon63 Maybe in the future we will also try to use IndexedDB for such cases.
Stemon63 Posted September 16, 2025 Author Posted September 16, 2025 Hi Sherzod, I talk about a NO persistent data, but only for "temporary" cached operation (invoices, billing, etc.) Use of IndexedDB (or other technologies) is welcome.
Fred Montier Posted September 21, 2025 Posted September 21, 2025 It's doable. With Json, Delphi Serialize table. https://github.com/viniciussanchez/dataset-serialize Doing some test with it and made two components: TJsonTable (base on vinicius same component) and TJsonDatasource-"ish" (not finished). But, of course, not binding with Db controls. Basic procedures only. Maybe no need to a datasource at client side. Then I found a pure Js lib that has it all done already. Saved for later. Is really ideal for db small operations. The ext.js solution is way more complex.
Stemon63 Posted September 23, 2025 Author Posted September 23, 2025 Hi Fred, I'm clearly interested in your work on this topic. Can you provide me with details?
Recommended Posts