1. #1
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    71
    Vote Rating
    7
    Wilky is on a distinguished road

      4  

    Default Ext.ux.data.proxy.WebSocket is among us!

    Ext.ux.data.proxy.WebSocket is among us!


    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

  2. #2
    Sencha User
    Join Date
    Nov 2007
    Posts
    294
    Vote Rating
    0
    Sesshomurai is on a distinguished road

      1  

    Default


    This is marvelous!

    Will it work with websocket backends like socket.io?

    Does this mean, the store will continually update its data as messages arrive over websocket?

    Very cool indeed.

    Question. How does this compare to Ext Direct?

  3. #3
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    71
    Vote Rating
    7
    Wilky is on a distinguished road

      0  

    Default


    Thank you so much! Congratulations, questions and constructive criticism are welcome

    Well, it doesn't work with socket.io because it's a particular backend.
    However, it works great with other backends, like Tornado (Python): https://github.com/wilk/Ext.ux.data.proxy.WebSocket/blob/master/demo/server.py

    Yes, the store is continually update by the proxy by intercepting new data incoming from server (push technology).

    Honestly, I didn't think to Ext.Direct, so I don't know if you can integrate with it.
    I'll give it a look!

    Ciao!
    Wilk

    Quote Originally Posted by Sesshomurai View Post
    This is marvelous!

    Will it work with websocket backends like socket.io?

    Does this mean, the store will continually update its data as messages arrive over websocket?

    Very cool indeed.

    Question. How does this compare to Ext Direct?

  4. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,904
    Vote Rating
    178
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      1  

    Default


    Thanks for sharing!

  5. #5
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    71
    Vote Rating
    7
    Wilky is on a distinguished road

      0  

    Default


    Now available on Sencha Market: https://market.sencha.com/extensions...roxy-websocket

    Wilk

  6. #6
    Sencha Premium Member
    Join Date
    Jul 2012
    Location
    Hengelo, The Netherlands
    Posts
    5
    Vote Rating
    1
    kreativ-software is on a distinguished road

      1  

    Default


    Nice. Tx for the work!
    A Socket.IO version would be awesome.

  7. #7
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    71
    Vote Rating
    7
    Wilky is on a distinguished road

      0  

    Default


    Quote Originally Posted by kreativ-software View Post
    Nice. Tx for the work!
    A Socket.IO version would be awesome.
    Thank you!
    I'll try to make ExtJS-WebSocket (the websocket wrapper behind Ext.ux.data.proxy.WebSocket) compatible with socket.io

  8. #8
    Sencha Premium Member
    Join Date
    Jul 2012
    Location
    Hengelo, The Netherlands
    Posts
    5
    Vote Rating
    1
    kreativ-software is on a distinguished road

      0  

    Default


    That would be great!!
    I don't like the gridplugins method.
    Implement it in the store is the best thing to do.
    I'm thinking about making a Ext.Direct Socket.IO implementation myself, or are there any implementations already?

  9. #9
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    71
    Vote Rating
    7
    Wilky is on a distinguished road

      0  

    Default


    Quote Originally Posted by kreativ-software View Post
    That would be great!!
    I don't like the gridplugins method.
    Implement it in the store is the best thing to do.
    I'm thinking about making a Ext.Direct Socket.IO implementation myself, or are there any implementations already?
    I don't know if exists an implementation of Ext.Direct + Socket.io.
    However, there's extjs-socketio: https://github.com/softwarezman/extjs-socketio
    I
    think I will give it a look to make ExtJS-WebSocket working with socketio

    Cheers!
    Wilk

  10. #10
    Sencha Premium Member
    Join Date
    Apr 2010
    Posts
    193
    Vote Rating
    24
    elgs will become famous soon enough

      1  

    Default


    Hi @wilky, thanks for your great contribution!

    I have a question regarding the server side when I am trying to play with your WebSocket ux. I saw a server.py from the source repository. As I don't have much knowledge about python, I'm planning to write my server program using Java. I tried to understand the server.py, and here's my understanding, would you please confirm or correct me:
    1, What the server.py does is to echo whatever it received to all connected/registered clients?
    2, server.py does not contain any special logic that could be a dependency for the clients?

    I think if the answer to the first question would be yes, then automatically the answer to the second question would be yes.

    Would you please help to confirm or correct me? Thanks.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi