
Does anyone see an issue with adding jQuery to GwtHostPage? Some PatternFly widgets require bootstrap.min.js which requires jQuery. Thanks, Greg Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com

----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: devel@ovirt.org Cc: "Alexander Wels" <awels@redhat.com>, "Vojtech Szocs" <vszocs@redhat.com> Sent: Wednesday, June 4, 2014 3:19:23 AM Subject: jQuery?
Does anyone see an issue with adding jQuery to GwtHostPage? Some PatternFly widgets require bootstrap.min.js which requires jQuery.
My understanding is that PatternFly is essentially a "skin" of Bootstrap CSS, which doesn't imply the need for using Bootstrap _JavaScript_ library (which needs jQuery) to deal with widgets in JavaScript runtime. I thought that the purpose of "gwtbootstrap3" GWT module (integration with Bootstrap CSS framework) was to provide such widgets in context of GWT app. If not, what is then the purpose of "gwtbootstrap3" module? In other words, doesn't "gwtbootstrap3" module provide us with all widgets we need?
Thanks, Greg
Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com

----- Original Message -----
From: "Vojtech Szocs" <vszocs@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 9:26:19 AM Subject: Re: jQuery?
----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: devel@ovirt.org Cc: "Alexander Wels" <awels@redhat.com>, "Vojtech Szocs" <vszocs@redhat.com> Sent: Wednesday, June 4, 2014 3:19:23 AM Subject: jQuery?
Does anyone see an issue with adding jQuery to GwtHostPage? Some PatternFly widgets require bootstrap.min.js which requires jQuery.
My understanding is that PatternFly is essentially a "skin" of Bootstrap CSS, which doesn't imply the need for using Bootstrap _JavaScript_ library (which needs jQuery) to deal with widgets in JavaScript runtime.
Any JavaScript-enabled widgets (like tooltips) do require bootstrap.js and jquery.js. The only reason I didn't add them in the main PatternFly patch is that we didn't need them back then. But now we need them.
I thought that the purpose of "gwtbootstrap3" GWT module (integration with Bootstrap CSS framework) was to provide such widgets in context of GWT app. If not, what is then the purpose of "gwtbootstrap3" module?
gwtbootstrap3 provides renderings of GWT widgets that are compatible with bootstrap css. It does not rewrite the jQuery code into GWT-JavaScript code.
In other words, doesn't "gwtbootstrap3" module provide us with all widgets we need?
I wouldn't say "provide." It enables using the widgets more easily from GWT. Take a look at https://github.com/gwtbootstrap3/gwtbootstrap3/blob/master/gwtbootstrap3/src... line 521 on down. It simply wraps everything for ease-of-use from GWT / UIBinder. Greg
Thanks, Greg
Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com

----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: "Vojtech Szocs" <vszocs@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 3:44:14 PM Subject: Re: jQuery?
----- Original Message -----
From: "Vojtech Szocs" <vszocs@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 9:26:19 AM Subject: Re: jQuery?
----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: devel@ovirt.org Cc: "Alexander Wels" <awels@redhat.com>, "Vojtech Szocs" <vszocs@redhat.com> Sent: Wednesday, June 4, 2014 3:19:23 AM Subject: jQuery?
Does anyone see an issue with adding jQuery to GwtHostPage? Some PatternFly widgets require bootstrap.min.js which requires jQuery.
My understanding is that PatternFly is essentially a "skin" of Bootstrap CSS, which doesn't imply the need for using Bootstrap _JavaScript_ library (which needs jQuery) to deal with widgets in JavaScript runtime.
Any JavaScript-enabled widgets (like tooltips) do require bootstrap.js and jquery.js.
I'm not sure this is the only way. gwtbootstrap3 could do the same thing, after all its code becomes JavaScript in the end. I think there is no real difference (conceptually) between bootstrap.js vs gwtbootstrap3, each one can use JavaScript to implement widgets like tooltips. In the end it boils down to styling DOM elements with CSS classes, so Bootstrap CSS framework is the lowest common denominator.
The only reason I didn't add them in the main PatternFly patch is that we didn't need them back then. But now we need them.
Hm, I assume you mean this: http://getbootstrap.com/javascript/#tooltips these are jQuery plugins, apparently bootstrap.js builds on top of jQuery to ease the work with DOM elements. For example: $('#example').tooltip(options) will register mouse listeners on given element that control the tooltip. Anyway, the tooltip behavior is just JavaScript + setting CSS classes, not really related to jQuery. However, I found this: https://github.com/gwtbootstrap3/gwtbootstrap3/blob/master/gwtbootstrap3/src... so it seems that gwtbootstrap3 _does_ support things like tooltips. EDIT: see my comment below, Tooltip.java depends on jQuery, you're right.
I thought that the purpose of "gwtbootstrap3" GWT module (integration with Bootstrap CSS framework) was to provide such widgets in context of GWT app. If not, what is then the purpose of "gwtbootstrap3" module?
gwtbootstrap3 provides renderings of GWT widgets that are compatible with bootstrap css. It does not rewrite the jQuery code into GWT-JavaScript code.
In other words, doesn't "gwtbootstrap3" module provide us with all widgets we need?
I wouldn't say "provide." It enables using the widgets more easily from GWT.
Take a look at https://github.com/gwtbootstrap3/gwtbootstrap3/blob/master/gwtbootstrap3/src... line 521 on down.
It simply wraps everything for ease-of-use from GWT / UIBinder.
You are correct. So gwtbootstrap3 requires jQuery. I didn't know this, just realized this now after looking at Tooltip.java code. So gwtbootstrap3 is just a thin GWT wrapper to bootstrap.js which implies the need for jQuery. (Originally I thought it's not just a thin wrapper.) Considering above, I'm OK with adding jQuery to GWT UI host page. BTW, we could do this via <script> in GwtCommon.gwt.xml which will cause the script to be automatically injected into GWT compilation (permutation) output, so we wouldn't need to modify host page HTML. However, question is, how/where to maintain jQuery script file(s).
Greg
Thanks, Greg
Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com

----- Original Message -----
From: "Vojtech Szocs" <vszocs@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 10:49:45 AM Subject: Re: jQuery?
----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: "Vojtech Szocs" <vszocs@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 3:44:14 PM Subject: Re: jQuery?
----- Original Message -----
From: "Vojtech Szocs" <vszocs@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 9:26:19 AM Subject: Re: jQuery?
----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: devel@ovirt.org Cc: "Alexander Wels" <awels@redhat.com>, "Vojtech Szocs" <vszocs@redhat.com> Sent: Wednesday, June 4, 2014 3:19:23 AM Subject: jQuery?
Does anyone see an issue with adding jQuery to GwtHostPage? Some PatternFly widgets require bootstrap.min.js which requires jQuery.
My understanding is that PatternFly is essentially a "skin" of Bootstrap CSS, which doesn't imply the need for using Bootstrap _JavaScript_ library (which needs jQuery) to deal with widgets in JavaScript runtime.
Any JavaScript-enabled widgets (like tooltips) do require bootstrap.js and jquery.js.
I'm not sure this is the only way. gwtbootstrap3 could do the same thing, after all its code becomes JavaScript in the end. I think there is no real difference (conceptually) between bootstrap.js vs gwtbootstrap3, each one can use JavaScript to implement widgets like tooltips. In the end it boils down to styling DOM elements with CSS classes, so Bootstrap CSS framework is the lowest common denominator.
The only reason I didn't add them in the main PatternFly patch is that we didn't need them back then. But now we need them.
Hm, I assume you mean this:
http://getbootstrap.com/javascript/#tooltips
these are jQuery plugins, apparently bootstrap.js builds on top of jQuery to ease the work with DOM elements. For example:
$('#example').tooltip(options)
will register mouse listeners on given element that control the tooltip.
Anyway, the tooltip behavior is just JavaScript + setting CSS classes, not really related to jQuery.
However, I found this:
https://github.com/gwtbootstrap3/gwtbootstrap3/blob/master/gwtbootstrap3/src...
so it seems that gwtbootstrap3 _does_ support things like tooltips.
EDIT: see my comment below, Tooltip.java depends on jQuery, you're right.
I thought that the purpose of "gwtbootstrap3" GWT module (integration with Bootstrap CSS framework) was to provide such widgets in context of GWT app. If not, what is then the purpose of "gwtbootstrap3" module?
gwtbootstrap3 provides renderings of GWT widgets that are compatible with bootstrap css. It does not rewrite the jQuery code into GWT-JavaScript code.
In other words, doesn't "gwtbootstrap3" module provide us with all widgets we need?
I wouldn't say "provide." It enables using the widgets more easily from GWT.
Take a look at https://github.com/gwtbootstrap3/gwtbootstrap3/blob/master/gwtbootstrap3/src... line 521 on down.
It simply wraps everything for ease-of-use from GWT / UIBinder.
You are correct. So gwtbootstrap3 requires jQuery. I didn't know this, just realized this now after looking at Tooltip.java code.
So gwtbootstrap3 is just a thin GWT wrapper to bootstrap.js which implies the need for jQuery. (Originally I thought it's not just a thin wrapper.)
Considering above, I'm OK with adding jQuery to GWT UI host page.
BTW, we could do this via <script> in GwtCommon.gwt.xml which will cause the script to be automatically injected into GWT compilation (permutation) output, so we wouldn't need to modify host page HTML.
Noted, thanks.
However, question is, how/where to maintain jQuery script file(s).
I have to RPM package gwtbootstrap3 and patternfly, so I'll just add it in one of those RPMs. Probably the patternfly one. It'll be an additional Source in the spec. Sound ok?
Greg
Thanks, Greg
Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com

----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: "Vojtech Szocs" <vszocs@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 4:58:51 PM Subject: Re: jQuery?
----- Original Message -----
From: "Vojtech Szocs" <vszocs@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 10:49:45 AM Subject: Re: jQuery?
----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: "Vojtech Szocs" <vszocs@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 3:44:14 PM Subject: Re: jQuery?
----- Original Message -----
From: "Vojtech Szocs" <vszocs@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 9:26:19 AM Subject: Re: jQuery?
----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: devel@ovirt.org Cc: "Alexander Wels" <awels@redhat.com>, "Vojtech Szocs" <vszocs@redhat.com> Sent: Wednesday, June 4, 2014 3:19:23 AM Subject: jQuery?
Does anyone see an issue with adding jQuery to GwtHostPage? Some PatternFly widgets require bootstrap.min.js which requires jQuery.
My understanding is that PatternFly is essentially a "skin" of Bootstrap CSS, which doesn't imply the need for using Bootstrap _JavaScript_ library (which needs jQuery) to deal with widgets in JavaScript runtime.
Any JavaScript-enabled widgets (like tooltips) do require bootstrap.js and jquery.js.
I'm not sure this is the only way. gwtbootstrap3 could do the same thing, after all its code becomes JavaScript in the end. I think there is no real difference (conceptually) between bootstrap.js vs gwtbootstrap3, each one can use JavaScript to implement widgets like tooltips. In the end it boils down to styling DOM elements with CSS classes, so Bootstrap CSS framework is the lowest common denominator.
The only reason I didn't add them in the main PatternFly patch is that we didn't need them back then. But now we need them.
Hm, I assume you mean this:
http://getbootstrap.com/javascript/#tooltips
these are jQuery plugins, apparently bootstrap.js builds on top of jQuery to ease the work with DOM elements. For example:
$('#example').tooltip(options)
will register mouse listeners on given element that control the tooltip.
Anyway, the tooltip behavior is just JavaScript + setting CSS classes, not really related to jQuery.
However, I found this:
https://github.com/gwtbootstrap3/gwtbootstrap3/blob/master/gwtbootstrap3/src...
so it seems that gwtbootstrap3 _does_ support things like tooltips.
EDIT: see my comment below, Tooltip.java depends on jQuery, you're right.
I thought that the purpose of "gwtbootstrap3" GWT module (integration with Bootstrap CSS framework) was to provide such widgets in context of GWT app. If not, what is then the purpose of "gwtbootstrap3" module?
gwtbootstrap3 provides renderings of GWT widgets that are compatible with bootstrap css. It does not rewrite the jQuery code into GWT-JavaScript code.
In other words, doesn't "gwtbootstrap3" module provide us with all widgets we need?
I wouldn't say "provide." It enables using the widgets more easily from GWT.
Take a look at https://github.com/gwtbootstrap3/gwtbootstrap3/blob/master/gwtbootstrap3/src... line 521 on down.
It simply wraps everything for ease-of-use from GWT / UIBinder.
You are correct. So gwtbootstrap3 requires jQuery. I didn't know this, just realized this now after looking at Tooltip.java code.
So gwtbootstrap3 is just a thin GWT wrapper to bootstrap.js which implies the need for jQuery. (Originally I thought it's not just a thin wrapper.)
Considering above, I'm OK with adding jQuery to GWT UI host page.
BTW, we could do this via <script> in GwtCommon.gwt.xml which will cause the script to be automatically injected into GWT compilation (permutation) output, so we wouldn't need to modify host page HTML.
Noted, thanks.
However, question is, how/where to maintain jQuery script file(s).
I have to RPM package gwtbootstrap3 and patternfly, so I'll just add it in one of those RPMs. Probably the patternfly one. It'll be an additional Source in the spec. Sound ok?
gwtbootstrap3-0.6.jar actually contains CSS/JS/fonts of Bootstrap plus jquery-1.11.0.min.js, its NoThemeResources.gwt.xml module exposes all of these files as public resources of the GWT application: <public path="resource"> <include name="css/*.css"/> <include name="js/*.js"/> <include name="fonts/*"/> </public> (Note: GwtBootstrap3NoTheme inherits NoThemeResources.) All public resources should be copied into final WAR output during GWT application build. This means we could use jquery-1.11.0.min.js bundled within gwtbootstrap3. What do you think?
Greg
Thanks, Greg
Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com

----- Original Message -----
From: "Vojtech Szocs" <vszocs@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 12:19:34 PM Subject: Re: jQuery?
----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: "Vojtech Szocs" <vszocs@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 4:58:51 PM Subject: Re: jQuery?
----- Original Message -----
From: "Vojtech Szocs" <vszocs@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 10:49:45 AM Subject: Re: jQuery?
----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: "Vojtech Szocs" <vszocs@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 3:44:14 PM Subject: Re: jQuery?
----- Original Message -----
From: "Vojtech Szocs" <vszocs@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: devel@ovirt.org, "Alexander Wels" <awels@redhat.com> Sent: Thursday, June 5, 2014 9:26:19 AM Subject: Re: jQuery?
----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: devel@ovirt.org Cc: "Alexander Wels" <awels@redhat.com>, "Vojtech Szocs" <vszocs@redhat.com> Sent: Wednesday, June 4, 2014 3:19:23 AM Subject: jQuery?
Does anyone see an issue with adding jQuery to GwtHostPage? Some PatternFly widgets require bootstrap.min.js which requires jQuery.
My understanding is that PatternFly is essentially a "skin" of Bootstrap CSS, which doesn't imply the need for using Bootstrap _JavaScript_ library (which needs jQuery) to deal with widgets in JavaScript runtime.
Any JavaScript-enabled widgets (like tooltips) do require bootstrap.js and jquery.js.
I'm not sure this is the only way. gwtbootstrap3 could do the same thing, after all its code becomes JavaScript in the end. I think there is no real difference (conceptually) between bootstrap.js vs gwtbootstrap3, each one can use JavaScript to implement widgets like tooltips. In the end it boils down to styling DOM elements with CSS classes, so Bootstrap CSS framework is the lowest common denominator.
The only reason I didn't add them in the main PatternFly patch is that we didn't need them back then. But now we need them.
Hm, I assume you mean this:
http://getbootstrap.com/javascript/#tooltips
these are jQuery plugins, apparently bootstrap.js builds on top of jQuery to ease the work with DOM elements. For example:
$('#example').tooltip(options)
will register mouse listeners on given element that control the tooltip.
Anyway, the tooltip behavior is just JavaScript + setting CSS classes, not really related to jQuery.
However, I found this:
https://github.com/gwtbootstrap3/gwtbootstrap3/blob/master/gwtbootstrap3/src...
so it seems that gwtbootstrap3 _does_ support things like tooltips.
EDIT: see my comment below, Tooltip.java depends on jQuery, you're right.
I thought that the purpose of "gwtbootstrap3" GWT module (integration with Bootstrap CSS framework) was to provide such widgets in context of GWT app. If not, what is then the purpose of "gwtbootstrap3" module?
gwtbootstrap3 provides renderings of GWT widgets that are compatible with bootstrap css. It does not rewrite the jQuery code into GWT-JavaScript code.
In other words, doesn't "gwtbootstrap3" module provide us with all widgets we need?
I wouldn't say "provide." It enables using the widgets more easily from GWT.
Take a look at https://github.com/gwtbootstrap3/gwtbootstrap3/blob/master/gwtbootstrap3/src... line 521 on down.
It simply wraps everything for ease-of-use from GWT / UIBinder.
You are correct. So gwtbootstrap3 requires jQuery. I didn't know this, just realized this now after looking at Tooltip.java code.
So gwtbootstrap3 is just a thin GWT wrapper to bootstrap.js which implies the need for jQuery. (Originally I thought it's not just a thin wrapper.)
Considering above, I'm OK with adding jQuery to GWT UI host page.
BTW, we could do this via <script> in GwtCommon.gwt.xml which will cause the script to be automatically injected into GWT compilation (permutation) output, so we wouldn't need to modify host page HTML.
Noted, thanks.
However, question is, how/where to maintain jQuery script file(s).
I have to RPM package gwtbootstrap3 and patternfly, so I'll just add it in one of those RPMs. Probably the patternfly one. It'll be an additional Source in the spec. Sound ok?
gwtbootstrap3-0.6.jar actually contains CSS/JS/fonts of Bootstrap plus jquery-1.11.0.min.js, its NoThemeResources.gwt.xml module exposes all of these files as public resources of the GWT application:
<public path="resource"> <include name="css/*.css"/> <include name="js/*.js"/> <include name="fonts/*"/> </public>
(Note: GwtBootstrap3NoTheme inherits NoThemeResources.)
All public resources should be copied into final WAR output during GWT application build. This means we could use jquery-1.11.0.min.js bundled within gwtbootstrap3.
What do you think?
Yep, this is the best idea. I'll make it so.
Greg
Thanks, Greg
Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com

----- Original Message ----- From: "Greg Sheremeta" <gshereme@redhat.com> Sent: Tuesday, June 3, 2014 9:19:23 PM
Does anyone see an issue with adding jQuery to GwtHostPage? Some PatternFly widgets require bootstrap.min.js which requires jQuery.
apologies in advance for the complete ignorance here: - is there any kind of potential collision that can occur between the gwt javascript and the jQuery javascript? - is jQuery expected to substantially affect performance / loading time on the client side or anything like that?
Thanks, Greg
Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

----- Original Message -----
From: "Einav Cohen" <ecohen@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 5, 2014 11:43:24 AM Subject: Re: [ovirt-devel] jQuery?
----- Original Message ----- From: "Greg Sheremeta" <gshereme@redhat.com> Sent: Tuesday, June 3, 2014 9:19:23 PM
Does anyone see an issue with adding jQuery to GwtHostPage? Some PatternFly widgets require bootstrap.min.js which requires jQuery.
apologies in advance for the complete ignorance here:
- is there any kind of potential collision that can occur between the gwt javascript and the jQuery javascript?
Namespace collision -- no. jQuery registers itself globally as '$' and 'jQuery', and neither GWT itself nor our GWT code use those names anywhere. However, there can be behavior conflicts. I'm currently debugging a problem where tooltips aren't destroyed when grid refreshes happen. The jQuery widget doesn't 'know' that the GWT widget it's attached to was destroyed :(
- is jQuery expected to substantially affect performance / loading time on the client side or anything like that?
First-load time will be negligible and cached. Mass-use of bad selectors could decrease browser performance. I think we should very rarely use jQuery in oVirt. Usages of it should be very justifiable. Greg
Thanks, Greg
Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: "Einav Cohen" <ecohen@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 5, 2014 5:51:08 PM Subject: Re: [ovirt-devel] jQuery?
----- Original Message -----
From: "Einav Cohen" <ecohen@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 5, 2014 11:43:24 AM Subject: Re: [ovirt-devel] jQuery?
----- Original Message ----- From: "Greg Sheremeta" <gshereme@redhat.com> Sent: Tuesday, June 3, 2014 9:19:23 PM
Does anyone see an issue with adding jQuery to GwtHostPage? Some PatternFly widgets require bootstrap.min.js which requires jQuery.
apologies in advance for the complete ignorance here:
- is there any kind of potential collision that can occur between the gwt javascript and the jQuery javascript?
Namespace collision -- no. jQuery registers itself globally as '$' and 'jQuery', and neither GWT itself nor our GWT code use those names anywhere.
+1 this is my understanding as well.
However, there can be behavior conflicts. I'm currently debugging a problem where tooltips aren't destroyed when grid refreshes happen. The jQuery widget doesn't 'know' that the GWT widget it's attached to was destroyed :(
In cases like this one, could we close/destroy the tooltip via GWT JSNI code?
- is jQuery expected to substantially affect performance / loading time on the client side or anything like that?
First-load time will be negligible and cached.
Mass-use of bad selectors could decrease browser performance. I think we should very rarely use jQuery in oVirt. Usages of it should be very justifiable.
Exactly, any direct use of jQuery should be justified by a solid reason.
Greg
Thanks, Greg
Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

----- Original Message -----
From: "Vojtech Szocs" <vszocs@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: "Einav Cohen" <ecohen@redhat.com>, devel@ovirt.org Sent: Thursday, June 5, 2014 12:29:41 PM Subject: Re: [ovirt-devel] jQuery?
----- Original Message -----
From: "Greg Sheremeta" <gshereme@redhat.com> To: "Einav Cohen" <ecohen@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 5, 2014 5:51:08 PM Subject: Re: [ovirt-devel] jQuery?
----- Original Message -----
From: "Einav Cohen" <ecohen@redhat.com> To: "Greg Sheremeta" <gshereme@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 5, 2014 11:43:24 AM Subject: Re: [ovirt-devel] jQuery?
----- Original Message ----- From: "Greg Sheremeta" <gshereme@redhat.com> Sent: Tuesday, June 3, 2014 9:19:23 PM
Does anyone see an issue with adding jQuery to GwtHostPage? Some PatternFly widgets require bootstrap.min.js which requires jQuery.
apologies in advance for the complete ignorance here:
- is there any kind of potential collision that can occur between the gwt javascript and the jQuery javascript?
Namespace collision -- no. jQuery registers itself globally as '$' and 'jQuery', and neither GWT itself nor our GWT code use those names anywhere.
+1 this is my understanding as well.
However, there can be behavior conflicts. I'm currently debugging a problem where tooltips aren't destroyed when grid refreshes happen. The jQuery widget doesn't 'know' that the GWT widget it's attached to was destroyed :(
In cases like this one, could we close/destroy the tooltip via GWT JSNI code?
Yep, that is what I'm trying to do.
- is jQuery expected to substantially affect performance / loading time on the client side or anything like that?
First-load time will be negligible and cached.
Mass-use of bad selectors could decrease browser performance. I think we should very rarely use jQuery in oVirt. Usages of it should be very justifiable.
Exactly, any direct use of jQuery should be justified by a solid reason.
Greg
Thanks, Greg
Greg Sheremeta Red Hat, Inc. Sr. Software Engineer, RHEV Cell: 919-807-1086 gshereme@redhat.com
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel
participants (3)
-
Einav Cohen
-
Greg Sheremeta
-
Vojtech Szocs