- Stephen
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
> I would definitely prefer starting from zero without IE 6-8 in mind
> for new widgets.
With new widgets, definitely agree, I just think that's orthogonal to
adding interfaces for the existing widgets.
> So what would be the added benefit in terms of MVP?
In the Type 1 style of MVP, the view interface exposes widgets directly
to the presenter, albeit via the HasXxx characteristic interfaces. This
can get annoying if you need multiple characteristics exposed for a
single widget, or need to call a method that is not in a HasXxx
interface.
The general idea is to use custom elements + html templates which can be extended for uibinder like support and/or data binding.
The general idea is to use custom elements + html templates which can be extended for uibinder like support and/or data binding.Sounds a bit like AngularJS directives for reusable components.
--
The simpler thing than buffering is just to have a StubButton, e.g.:
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
So, my point: Is the purpose of the IsButton *only* to be an interface for com.google.gwt.user.client.ui.Button?
Either we have a backward compat problem
UiHandler makes inner classes 2 lines shorter, but IMO it still leads
to the same spaghetti code (reactive/imperative, instead of
declarative).
Tessell's binding DSL makes simple/common operations one line
declarations (explicitly via Type 1-exposed widget interfaces, not
UiHandlers). E.g. I don't see how UiHandlers/Type 2 could be as
succinct as:
https://github.com/stephenh/todomvc-tessell/blob/master/src/main/java/org/tessell/todomvc/client/app/TodoPresenter.java#L43
> So I think this argument looses some weight as probably no one really
> wants to do the type 1 way anymore and only a minority still choose
> it for new projects.
Well, that is unfortunate, as MVP Type 1 with Tessell's view generation
and binding DSL is quite pleasant. But, again, to each their own. :-)
What are we looking at having in these interfaces? The discussion that Goktug and I had a few months ago got stalled around the concept that these interfaces were trying to both be a) implementation independent but also b) rich enough to be useful. Doing both is hard/meaningless.
To pick an example, button has a few basic premises (in the standard GWT widgets) - it has text (or html if you support a base other than an <input>), it can receive focus, and it is a source of click events. In a perfect world an implementation could be backed by an appearance (perhaps wrapped itself in a cell) like the TextButton...
But this ends up meaning that 'click' events aren't the only thing to worry about - a <div> won't pass along key events like space or enter as a means of activating the button. So we either need to also emit key events, and touch events, or need to wrap all of these in one event (GXT calls it a SelectEvent).
Either we have a backward compat problem (can't represent both past and future button-ish widgets with the same interface), or we limit the button implementations to a single setup (must be backed by <button> or <input>, or perhaps an <a>?).
So, my point: Is the purpose of the IsButton *only* to be an interface for com.google.gwt.user.client.ui.Button? Or are we trying to build this out for the ideal button (and ideal text box, etc)?
This is tangenting a bit...but... :-)
> If the former, then I understand it as mostly a mean to provide
> mocks/stubs/fakes for testing. How about gwt-mockito then?
> https://github.com/google/gwtmockito
I know everyone uses them, but IMO mocks are less than ideal for
testing UI code. With stubs, you can have state and semi-intelligent
behavior without repeating every test the same "oh, right, this is how
a textbox works...when call this, then return that, expect so and so",
etc.
That said, mocks are a personal preference, and while nifty tools like
gwt-mockito exist for the current state of affairs, I don't think that means
making life easier for everyone (by making the require for gwt-mockito go away)
is a bad thing.
- Stephen
- Stephen
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
- Stephen
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
You received this message because you are subscribed to a topic in the Google Groups "GWT Contributors" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit-contributors/odoaoi1s7N0/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit-co...@googlegroups.com.
But now that it the sits right along side the original/only-asWidget
IsWidget, I had to come up with some incredibly clever name, like
IsWidget2.
> What about IsWidget.Extended ?
That's actually pretty good.
Maybe IsWidget.Full...eh, just thinking that is shorter, and there are a lot of places where I use the extended IsWidget type.
- Stephen