[dojo-contributors] My attempt at a lightweight mobile-ready grid/table

Evan Huang evanhuangwei at gmail.com
Thu Oct 7 06:42:07 EDT 2010

Great works, Kris,

The synch store api brings significant simplifications and the new
observer/stateful patten looks very impressive.

BTW, something may worth a discussion so that we can ideally have the
same new Grid core scaled well both for desktop and mobile:

1. Have a centralized class for registering & dispatching events?
This would be more convenient for event customization, typically e.g.
to easily plug in the further touch & gesture event layer

2. Virtual paging model
It's great that the adjacent divs are also used as page holders, so
for huge pages(data), I suppose the "padding position"  way will be
used, right?

3. Have a separate scroller managing the virtual paging
So that it will be easier to add a pagination plugin or we can even
make the pagination as default?

4. UI rendering customization - especially when adding UI plugins
Ideally Grid core won't have concept of any plugins but only with
interfaces opened, so that various plugins can hook in and add
corresponding UI parts

5. Advanced features & backward compatibility
This won't be a problem for mobile, but the desktop version is
supposed to keep supporting some complex layout e.g. multiple views,
flexible colSpan/rowSpan etc. Another big pain is backward
compatibility, can I assume that after moving to new sotre() API, we
can still make it compatible with previous data api with adapters?

Sorry for coming up with these stuff, I know they may break the
simplification, but it's just a trade off.

- Evan

On Thu, Oct 7, 2010 at 4:08 AM, Kris Zyp <kzyp at dojotoolkit.org> wrote:
>  I've been wanting to have a decent widget to natively run and test
> against the new dojo object store API, and having been frustrated with
> the DataGrid, and also seeing the interest in a mobile-ready
> plugin-based grid, I thought it'd try to put some together from a clean
> slate. So here is my attempt at next generation widget/grid:
> http://github.com/kriszyp/objectable (runs in dojox.table on latest trunk)
> And the demo of it:
> http://kzyp.dojotoolkit.org/trunk/dojox/table/tests/test_table_programmatic.html
> Key aspects:
> * Natively uses Dojo Object Store API - Directly uses the store API,
> including result set observation (the new notification events), for
> proper rearrangement of rows in response to data changes.
> * Mobile ready - Handles touch events for scrolling, check out the demo
> on your iPhone.
> * Extremely easy to write plugins. By using persistent DOM nodes, the
> Tree, Selection, and Editing are all written as very simple plugins in
> less then 100 LOC each.
> * Lightweight - Less than 20K src, probably be 3-4K gzipped/minified.
> * Very fast
> * Very few dependencies - Optimized build could probably contain
> stripped down dojo.js and everything needed under 20-30K gzipped
> * Includes support for key features from the DataGrid:
> ** Virtual Paging
> ** Sorting
> ** Selection
> ** Tree/hierarchical expansion (based on the hierarchical extensions to
> the object store)
> ** Editing
> ** Notifications
> Anyway, it still rough, I haven't really spent that much time on it, but
> I think it is nice clean, simple, and extensible design.
> Thanks,
> Kris
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors

More information about the dojo-contributors mailing list