PDA

View Full Version : Simple GridView



tsorgie
1 Jul 2009, 8:24 AM
Hey guys,

I've spent a bit of time checking out the PagingScrollTable (PST) in the GWT incubator. And i couldn't help but noticing how surprisingly fast it was as compared to the GXT grid. Now of course i understand that the GXT grid has a ton of functionality that is not available in the PST. But i dug in a bit to compare the resulting html from the two widgets anyway.

Looking at the PST the resulting html is surprisingly simple. It produces a very simple table with minimized style repetition. Each row in the view is rendered as a TR and the final cells are literally as simple as <td class="">Bob</td>. With additional style info only added where needed.

By comparison the Grid output is huge. Each row in the grid is a Table itself, and each cell includes an extra div inside the TD. Style info is pushed on every node.

I would have just accepted that as "the way it is" in GXT, until i saw what you guys did with the BufferView (which should be called BufferGridView) in GXT2 - it seems that the seperation of Grid instructions (represented in the Grid object), and grid rendering managed by the View, was stronger than i realized at first. That made me think that it might be possible to build a SimpleGridView (with limited functionality), which could use a rendering methodology closer to that used by the PST.

You can check out the incubator demo for the PST at this url - be sure to look at the resulting html:
http://collectionofdemos.appspot.com/demo/com.google.gwt.gen2.demo.scrolltable.PagingScrollTableDemo/PagingScrollTableDemo.html

What do you guys think?

tom.