abhichabhi / biojs

Automatically exported from code.google.com/p/biojs
0 stars 0 forks source link

Standardization of 3rd Party Library Version (e.g. jQuery) #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
As valuable as these plugins are, when I took a look through the dependencies, 
I found at least four different versions of jQuery present. While there are 
indeed different features available in different versions of jQuery, the 
majority of the functionality is redundant. It detracts from using the BioJS 
library in even small projects where more than BioJS is trying to use jQuery. 

For instance, is the only reason for Biojs.Sequence.js depending upon jQuery 
1.4.2 to have access to the browser detector? 

Original issue reported on code.google.com by mobiuskl...@gmail.com on 20 Jul 2013 at 9:09

GoogleCodeExporter commented 9 years ago
I agree it is annoying to have different components using different versions of 
the same JavaScript dependency. But as far as I understand this is a more 
general problem in software development when trying to use dependencies. 
Component developers in BioJS have the freedom to chose how to develop a 
component as far as they follow the BioJS guidelines. I think it would be quite 
difficult to agree on using one specific version of jQuery, D3js, YUI, etc. In 
my experience when I put together different components reporting different 
versions of the same dependency I find out they normally work choosing one 
version. As you mentioned before there are not many differences between 
versions. In the worst case I remembered I just had to update ajax call methods.

I can count 39 instances of jQuery in the sequence component so I guess jQuery 
is used for something else than detecting the browser ... 
http://www.ebi.ac.uk/Tools/biojs/registry/src/Biojs.Sequence.js

Regards,
Rafael

Original comment by rajido@gmail.com on 26 Jul 2013 at 1:19

GoogleCodeExporter commented 9 years ago
Indeed, Sequence uses jQuery for many things. All of them available in the most 
current stable version, with the exception of jQuery.browser, which was 
deprecated six major releases ago.

While experimenting, I removed the line that called on the browser function, 
and used the most current jQuery version that was present in the dependencies 
directory. My scripts worked in both Chrome and IE 10, and let me build 
extensions to the Sequence component for testing and classifying highlights for 
further jQuery manipulation.

Original comment by mobiuskl...@gmail.com on 26 Jul 2013 at 1:47

GoogleCodeExporter commented 9 years ago
I am glad that worked for you. I think the deprecated "jQuery.browser" could be 
replaced by the feature detection as suggested in here ... 
http://api.jquery.com/jQuery.support/ I will open a ticket with this. Thanks, 
Rafael

Original comment by rajido@gmail.com on 26 Jul 2013 at 2:08