[dojo-contributors] Updates on new grid thread - v 0.1 patch

Evan Huang evanhuangwei at gmail.com
Fri Mar 11 12:31:32 EST 2011


Some more updates on another thread of new Grid - the v 0.1 patch
 - http://bugs.dojotoolkit.org/attachment/ticket/11903/new%20grid_v.0.1.patch
or - https://github.com/evanhw/grid-2.0

The patch experiments the following ideas:
1. A new way of virtual scrolling
   - Scrollbar is separated from the main scrolling div
   - When scrolling out of viewport, rows are removed in an
asynchronous way which may bring benefits on rendering speed
   - Possible to solve the page joggling issue caused by the 2nd rendering;
   - Might be able to avoid the row size limitation of Grid (#11446)
   - Some detail rationale at
http://evan.dojotoolkit.org/grid2.0/new-grid-UI-virtual-scrolling-Nate.pdf

   Samples:
   a. Default rendering all data at once -
http://evan.dojotoolkit.org/oria/dojox/grid/gridx/tests/test_new_grid_default.html
   b. Virtual scrolling with 1000 rows -
http://evan.dojotoolkit.org/oria/dojox/grid/gridx/tests/test_new_grid_virtual_scrolling.html

2. In progress ideas on Grid core, model, cache e.g.
   - How to split Grid core into header, body, row, column, cell ...
   - How to encapsulate & handle both sych & asych stores by
leveraging new store api
   - How to enable a tailored store cache for Grid

    And related in progress discussions & thoughts: (thanks Oliver for
summarizing all these together):
    a. Overview -
https://docs.google.com/document/d/1mMqFQuKKBe5rY1hT9pb8kg0Swb3s2q2oZh-_zcr8_f8/edit?hl=en&authkey=CIzkxLYG#
    b. Core - https://docs.google.com/document/d/1xYOQGquJ3Qu28vzvmlQ3cjKk_LK_6VrLLCDS8G2lY48/edit?hl=en&authkey=CPnskeUF#
    c. Cache - https://docs.google.com/document/d/1iZsYfCSKAZnIy58tFGq5tFaVO8BaxgZVlAhxD-SOkLs/edit?hl=en&authkey=CPb6_IIP#
    d. Model - https://docs.google.com/document/d/1TlSzNWyle9oZdJ1klmy_aNA-RfQ7drmWXXFFCerCamA/edit?hl=en&authkey=CKegu60H#

    Note:
    - Here model is different from 'M' in MVC work, Grid model is more
like TreeModel, it provides Grid specific functionality based on new
store API
    - Cache also provides Grid specific support - similar as previous
_by_idx[ ], but would like to address #11370(occurs with server side
store), need to figure out anything shall be leveraged with
dojo.store.Cache


Another interesting idea we're trying is how we can do decomposition
as possible so that we may finally have a set of modules (either in
core or plugins), and provide several Grid profiles e.g. one profile
for SimpleGrid(or mobile), one for another AdvancedGrid etc. Hopefully
we can get this into the next patch.

- Evan


More information about the dojo-contributors mailing list