Jacopo,

The Google API works by calling the available library from Google, rather than from your instance of OFBiz. So rather that including javascript like OFBiz current does, instead it would pull in the library in this method:

<script src="http://www.google.com/jsapi"; type="text/javascript"></ script> <script type="text/javascript">google.load("prototype", "1.6.0.3");</ script> <script type="text/javascript">google.load("scriptaculous", "1.8.2");</ script>

You would simply substitute prototype and scriptaculous with jquery (or dojo or mootools, depending on your preference).

There are several advantages to this approach, with one big disadvantage, which you alluded to:

PRO: It taps into Google's existing server network, with the JS being served up by the server that is closest to you, which in many cases may allow the library to load faster. PRO: If the user previously visited a site that was also using the Google API, then the library would simply be loaded in for the users cache instead of the server, making the load time tremendously faster PRO: No need to maintain the library in the trunk. As a new version is released and becomes available from the Google API, you simply update the version number. PRO: Availability of all major Javascript Frameworks. Dojo, Mootools, Prototype/Scriptaculous, and YUI are supported.

CON: Lack of availability if the user does not have an internet connection.

That last one is obviously a big one, and may be a deal breaker since OFBiz instances in Internal LANs would not be able to use this option. But maybe we could try a hybrid approach; try requesting the library from Google first, and if not available, request from the trunk. Or, make it a configurable user option, allowing the user to turn the Google API feature on or off at install/implementation.


Ryan Foster
HotWax Media
801.671.0769
ryan.fos...@hotwaxmedia.com




On Jun 3, 2009, at 2:22 AM, Jacopo Cappellato wrote:

Hi Ryan,

this is interesting, and maybe I didn't fully get how Google JS API works, but what about OFBiz instances that are in internal lan with no access to the Internet? What about the license?

Cheers,

Jacopo

On Jun 3, 2009, at 9:02 AM, Ryan Foster wrote:

Jquery and Prototype can and do live relatively easily along side each other...
http://docs.jquery.com/Using_jQuery_with_Other_Libraries

As for what to maintain in the trunk, I would like to offer option C: none of the above, but rather suggest using the Google JS API to load in the library of the users choosing:

http://code.google.com/apis/ajaxlibs/

Ryan Foster
HotWax Media
801.671.0769
ryan.fos...@hotwaxmedia.com




On Jun 3, 2009, at 12:19 AM, Raj Saini wrote:

Hi Ashish,
Raj, Thanks for sharing your thoughts on this. I haven't looked too much
details about JQuery.
What about your vote? Which one is good to become part of OFBiz trunk
Prototype or JQuery ?

--
Ashish


I would like go with JQuery as it is light weight, modular and feature rich. Dojo is good but some time it is a overkill. I have not worked much with Prototype though.

Thanks,

Raj




Reply via email to