We've been playing with UiBinder and I thought it'd be a good idea to
share what we've seen so far (and ask some questions).
Some of the apps we write are used by more then one hospital and this
requires a tailored UI depending on the user's preferences and to
store additional information that a particular hospital needs to keep
track of. At the moment, writing UI in a swing style, we program to
interfaces and use GIN to bind everything together. Using different
AbstractGinModules and Ginjectors, we can tie the application together
in different ways using different UI implementations. What would be
the way to do this with UiBinder? From what we could tell, one would
use UiTemplate, but there doesn't seem to be a way to configure the
String in UiTemplate easily through a GIN module. Are there
alternatives?
Following the programming to interfaces theme, we've been doing that
with UiBinder, but have run into an issue when trying to build a
larger UI page out of smaller ui.xml classes. It seems that referring
to interfaces in ui.xml doesn't work, so you need to work with direct
concrete classes. But this would force you to use a particular
implementation when we'd like to keep it generic.
Lastly, I guess this is something just for consideration for the
future, but having the GEP work with UiBinder would make using it a
lot easier. For example, having code completion, refactoring support
and error messages right in Eclipse. This would be something like the
Spring IDE plugin that one you configure Spring XML files with all the
above features.
Thanks again for the UiBinder, we'll definitely have to spend more time with it.
Best regards,
--
Arthur Kalmenson
Thanks again for the UiBinder, we'll definitely have to spend more time with it.
Best regards,
--
Arthur Kalmenson
On Tuesday, August 25, 2009, Miroslav Pokorny
<miroslav...@gmail.com> wrote:
> Extras...
> Are there any plans to build a ui tool (maybe in swing) so designers can drag n drop available widgets and have the view instantly updated?
> Other kool features might include save the file etc.Some of the extra features in interface builder.
Will Google Plugin provide text editor for *.ui.xml files?
> Finally, GWT is all about finding coding patterns with which tools (IDEs in
> particular) are useful. UiBinder's XHTML syntax makes it easier to write
> good tools because it isn't as expressive as full-blown code: more
> restrictive language means more ability to analyze it statically, which is
> what tools are all about. Fluent APIs that would encourage people to write
> UIs with Java code are less amenable to creating good tools for them. For
> example, the Google Plugin is already working on tools to make editing
> UiBinder templates easy breezy, and we hope other IDEs will do the same.
Is there any place where I can ask to make this editor embeddable
into MultiPageEditorPart?
This would allow us to compose corresponding Java, ui.xml and
WYSIWYG Design pages into single editor.
For example Eclipse Java editor can not be embedded, because there
are several dependencies in it and its actions, so we have to inherit
from it to add Design and other pages in WindowBuilder. But if Google
Plugin editor also will have such limitation, we will not able to
include it in same way.
I use MultiPageEditorPart just as example, most probably we will use
our own multi-page editor implementation (inherited from Java editor).
Hmm, I don't have it handy but it's the name xmlns I use for all other resource "injection", and those work fine. I'll give it another shot later today. I'm sure you're right and I just messed something up.+1 for the expression language. Will res be required to be a subclass of one of the resource types, or will it work for any class? If the latter, it's a first step towards basic data-access from the template, which would be nice.
I wouldn't mind some convincing urls to backup this viewpoint if you
have any :-) The entire rest of the team here is saying "id id id",
"class bad, id good". Searching for "html id brittle" wasn't very
enlightening :-)
I have also found that there seems to be no way of overriding the
class that is created when hitting HTML elements - it is hard coded in
UiBinderWriter to look only in the Google classes for elements with
TAG. Descending and fixing it for UiBinderWriter was relatively
straight forward (even tho I had to put the replacement class in
com.google...), but because all of the important methods are private
in UiBinderGenerator, I had to replace that and copy the methods,
which was triple yuk. Good to have the source though :-)
<gwt:UiBinder ...
xmlns:res='urn:with:my.package.Bundle'>
...
<gwt:Button res:addStyleNames="formCss.error" />
[ERROR] In <gwt:Button res:addStyleNames='formCss.error'>, class Button has no appropriate setAddStyleNames() method