Vojtech Szocs has posted comments on this change.

Change subject: frontend: Introduce GinUiBinder
......................................................................


Patch Set 2:

> I think that without concrete benchmarks we cannot decide which approach is 
> better in terms of performace, we can argue only the code style.

Indeed, but without such benchmarks, is it really safe or appropriate to change 
one style to another?

None of these GWT.create()'d classes (UiBinder, IdHandler, EditorDriver) depend 
on GIN and as such I see nothing wrong with using GWT.create() directly.

The fact that GIN uses GWT.create() to implement Just-in-time Bindings [1] 
doesn't imply we should avoid GWT.create() altogether.

[1] https://github.com/google/guice/wiki/JustInTimeBindings

The use of GinUiBinder (allowing generated UiBinder implementations to accept 
GIN-managed dependencies) is not related to *how* we manage 
UiBinder/IdHandler/EditorDriver instances, so I don't understand why we're 
trying to do both changes in one patch.

If you really want to make UiBinder/IdHandler/EditorDriver instances managed by 
GIN (although the "extra code" saving is negligible IMHO), you can use 
@Singleton annotation that should be applied when processing Just-in-time 
Bindings for given interface:

 @Singleton
 interface ViewUiBinder extends UiBinder<SimpleDialogPanel, 
DataCenterPopupView> {
 }

Anyway, in this patch, I suggest to *not* change the way we handle 
UiBinder/IdHandler/EditorDriver instances - please do that in a separate patch, 
ideally for all affected interfaces (so that we won't end up in some 
inconsistent state where some interfaces are GWT.create()'d automatically by 
GIN and some are GWT.create()'d manually in code).

-- 
To view, visit http://gerrit.ovirt.org/34954
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib3ac93ae3c8a80f5b49a0780ed8c9a674a109779
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <mbe...@redhat.com>
Gerrit-Reviewer: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Greg Sheremeta <gsher...@redhat.com>
Gerrit-Reviewer: Martin Betak <mbe...@redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to