Hi ExtJSers!
Finally, I made it!
After two evenings of hard work, I'm proud to present you Ext.ux.data.proxy.WebSocket: http://wilk.github.io/Ext.ux.data.proxy.WebSocket/
Yeah, great, fantastic but.... what is that??
Did you remember Ext.ux.WebSocket? (http://wilk.github.io/ExtJS-WebSocket/)
Well, I made an extension to integrate easily HTML5 WebSockets with ExtJS grids and charts and every component that uses Ext.data.Store!!
It automagically communicates with the server, using CRUD operation through the sync/load store actions.
Here's a brief example:
Code:
var store = Ext.create ('Ext.data.Store', {
fields: ['id', 'name', 'age'] ,
storeId: 'myStore',
proxy: {
type: 'websocket',
url: 'ws://localhost:8888',
reader: {
type: 'json',
root: 'user'
}
}
});
var grid = Ext.create ('Ext.grid.Panel', {
title: 'My Grid',
width: 500,
height: 300,
store: store,
columns: [{
dataIndex: 'name',
text: 'Name'
}, {
dataIndex: 'age',
text: 'Age'
}]
});
store.load(); // a read operation is sent to the server
...
store.sync ({ // commit updates by sending 'create' or 'update' or 'destroy' operation to the server
success: function () {
store.load (); // and then refresh the grid
}
});
See other examples on the github page, clone the repo and try out the demo (I suggest you to open two browsers and see the magic in action!), star and fork the project, and if you like it, make the documentation with jsduck 
Sencha Market: https://market.sencha.com/extensions...roxy-websocket
Cheers!!
Wilk