Tuesday, February 26, 2013

Re: New widgets: Best way to implement them?

Interesting topic. 
Can't really comment on those things but I guess the CellWidgets are a good starting point. 
I also came across a good stackoverflow reply which I think might also be useful: http://stackoverflow.com/a/7481137/356594

On Monday, February 25, 2013 3:32:08 PM UTC+1, Jens wrote:
I am planing to write some new widgets that meet my personal requirements and I would like to have some opinions how to implement them best.

First my requirements:
1.) Performance
2.) ClientBundle for styles/resources
3.) DOM/behavior should be extendable/changeable (see next point)
4.) Mobile ready: a.) UI/behavior can be different between desktop/mobile devices and b.) user input should be abstracted to "Pointers" (idea taken from Microsoft) so the widget reacts fast and you have a single API for inputs. Deferred binding should be used to emulate pointer events via click/touch/MSPointer events.
5.) An IsXyzWidget interface that defines the API of that widget.
6.) UiBinder compatible
7.) Some widgets should also be available as cells.
8.) No explicit IE6/7 support

So now I am looking at GWT and have some options how to implement it. Should I extend Widget and do it the traditional way (and possibly create an additional cell) or is the future of GWT more about the 'renderable' approach like cells + CellWidget? Or maybe something in between like using IsRenderable/RenderablePanel with its fake DOM element although its experimental? Would it be suitable to use UiBinder to generate DOM / UiRenderer if things get a bit more complex or would it add too much overhead? 

One thing I am pretty sure about is that I would use the appearance pattern so I can switch out the widget UI/behavior based on the device type (desktop/mobile) if needed. 

Any thoughts would be welcome.

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment