Hi,

I am new to qooxdoo, but despite only one-week acquaintance and I've
got to admit that the framework is quite impressive. Thank you guys
for the great job!

I'm now working on an enterprise user support / instant messaging /
web chat system.While choosing the relevant client technology, I've
examined YUI, Dojo, ExtJS, jQuery and others. But when I've
encountered qooxdoo messenger sample (Showcase / Virtual List), I knew
my quest has been completed :)

At the moment I've got a question on how to efficiently implement a
grouped roster with a virtual list. There are comprehensive examples,
but they all use JSON data structured as (group, data) tuples. For
example:
        {   "persons": [     {       "lastname": "Warnke",       "firstname":
"Rigbert"
      "group": "Friends"
    },     {       "lastname": "Grabowski",       "firstname":
"Friedwin",       "group": "Colleagues"     }
  ]
}
But what if our backend provides the data that is already
group-structured? For example:
        {   "roster": [
    {
      "group": "Friends",
      "members": [
        {           "name": "User 1",           "status": "ONLINE"
        },         {           "name": "User 2",
          "status": "AWAY"
        }
      ]
    },
    {
      "group": "Colleagues",
      "members": [
        {           "name": "User 3",           "status": "ONLINE"
        },         {           "name": "User 4",
          "status": "AWAY"
        }
      ]
    }
  ]
}
This format is much more transfer efficient than the initial
tuple-based format, and that's what my backend generates right now. As
a workaround, I can tweak my backend to produce tuple-based data
(luckily, it's me who develops the backend, too :) But of course I
would prefer to use structured, efficient layout. Is there an elegant
way to feed such data to grouped virtual list? Of course I'd like to
avoid manually converting structured data to (group, data) tuples;
typical roster would contain 500-1000 items.

Another issue is that the model should be easily updatable. When a
user comes online / offline / changes his status, an update will be
sent to all his buddies via WebSockets, in a form of JSON chunk:

{
  name: "User 1",
  status: "AWAY"
}

The idea here is to avoid iterative search through the model, that
would have linear complexity. We assume that "name" fields are unique,
or user records do contain auxiliary unique "id" fields (of any type).

Thank you!
Ripston
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to