GWT Cells - Unnecessary headache?

394 views
Skip to first unread message

DrG

unread,
Dec 19, 2012, 12:28:21 PM12/19/12
to google-we...@googlegroups.com
I have been using the cell widgets for a while now and am having trouble understanding their purpose.  I attended Google IO 2010 when they were introduced and thought great GWT has some list and table widgets now.  But quickly realised that after using them that all your existing widgets need to be re-engineered to enable use in the lists.  Now whilst for performance I can understand why this is necessary, but given that these lists will be used in a lot of typical  given that most people show < 20 records at a time, or often a lot less, it seems like there is a lot of work just to use these widgets.  Therefore I am raising the question in order to get feedback.

With GWT 2.5 we have the UiRenderer which offers some interesting abstraction issues but still requires you to significantly re-write your existing widgets.

Thoughts?

Jens

unread,
Dec 19, 2012, 12:54:45 PM12/19/12
to google-we...@googlegroups.com
You should use Cell widgets when you expect to display a lot of data to get the full performance benefit of using Cell widgets. If you only want to display a few things in a list then simply use ScrollPanel + FlowPanel along with some CSS and add your "list entry" widgets to it. 
Sure CellTable/DataGrid have some nice features like column sorting that are not available in other GWT table like widgets but that does not mean that you should use CellTable/DataGrid for absolutely everything.

-- J.

DrG

unread,
Dec 19, 2012, 1:04:44 PM12/19/12
to google-we...@googlegroups.com
Using a scroll panel and flow panel then means we have to build all the other benefits of the CellTable ourselves.  For example pagers, sorting, columns, data providers.  All those things are great.  I guess my question is.  It would be great if there were two versions of the list widgets.  A Cell version for high performance and a widget version for existing functionality.

GCJ

Jens

unread,
Dec 19, 2012, 1:53:00 PM12/19/12
to google-we...@googlegroups.com
Sure you have to do a lot more when trying to port CellTable features to a widget based solution. But for CellList its not really an issue. Also AbstractPager and AbstractDataProvider are so generic that you could reuse them for anything as long as your widget implements HasRows and HasData.

But its a well known wish that GWT should provide more feature rich widgets out of the box that makes you think twice if you really need a 3rd party UI component library.

-- J.

Ümit Seren

unread,
Dec 20, 2012, 8:38:08 AM12/20/12
to google-we...@googlegroups.com
Also you can use FlexTable which supports Widgets if you don't have many records to display. 

RyanZA

unread,
Dec 20, 2012, 10:08:04 AM12/20/12
to google-we...@googlegroups.com
Surely opposite is better? GWT should remove all widgets from the base GWT, and then we can add in widget packages - so if our UI is all CellList stuff then we don't need things like FlexGrid. If we are using RootLayoutPanel, we don't need RootPanel, etc.

It also makes GWT much easier to update, as only the base features need to be updated - all the widget libraries can continue working using standard API...

One of the annoying things with GWT currently is we have all of these incompatible tables/widgets/layouts etc - it's hard to know which ones to use where.

Stephen Haberman

unread,
Dec 21, 2012, 3:29:30 PM12/21/12
to google-we...@googlegroups.com, drgen...@gmail.com

> I have been using the cell widgets for a while now and am having
> trouble understanding their purpose.

Well, as you say, the purpose is performance.

> Thoughts?

Personally I avoid cell-based widgets until I really, really need them,
and then push back on putting anything in the cells except really
simple functionality (showing text).

For example, a "dashboard" table of, say, employees, where each row has
interactive functionality to toggle/update/whatever aspects of the
employee, to me is just too hard to implement as cells. And it probably
doesn't make sense from a UX perspective to show 1000 of these
more-than-just text rows on the screen at a time anyway.

So, as you say, if you have <20 rows, or can filter/page the results
down to 20 rows anyway, just go with regular widgets.

- Stephen

Reply all
Reply to author
Forward
0 new messages