Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesdnn modules and jquerydnn modules and jquery
Previous
 
Next
New Post
6/29/2013 2:19 AM
 

With the growing popularity of jquery - we have started to encounter some odd situations regarding modules that load jquery extensions - and was interesting in seeing if anyone has come up with viable ways to deal with the issues of duplication and multiple loading of extensions.

There are 2 key issues that we are seeing.

1.  Two modules both require the same jquery extension -  say fancybox  - and are both on the same page.

The system attempts to load the script twice - which can result in issues if the module does not properly encase its javascript in on page loaded wrappers.

2. Two modules both requre the same jquery extension - but they have been coded against different VERSIONS with each module tries to load

Now we have more of a problem - since the two versions may declare methods that vary or collide - resulting in one or both modules now failing to run.

-------------------

Would be interested in hearing how module developers are looking at this issue - are whether there is maybe a need to a way to register jquery  extensions as a part of DNN in some way - so that 1 - the jquery plugins could be installed into a single consistent location for ALL dnn modules to consume ... and secondly a way to indicate that a module wants a specific extension to be loaded onto the current page.

Westa 

 
New Post
7/4/2013 6:49 PM
 
bump
 
New Post
7/5/2013 7:01 AM
 

Hi

We can follow this to avoid jquery conflicts:
http://www.dnngarden.com/Avoiding-jQuery-conflicts-in-DotNetNuke-modules.T129.aspx?EntryId=5

Thanks
Sibabrata Dash
Mindfire Solutions

 
New Post
7/5/2013 10:05 PM
 
Sibabrata,
Its not about avoid jQuery conflicts that is the issue - its about avoiding conflicts with jQuery plugins like say FancyBox or some such.

Where a module developer say for example makes a DNN module that uses version 2.1 of fancybox. And another module developer makes a DNN module that uses version 2.3 of fancybox.

If both DNN modules are installed on the same PAGE we now have issues since there are now 2 different versions of the FancyBox install script being loaded onto the same page.

One or both of the DNN modules now have the potential to not functional properly - since the jQuery plugin in question may very well not run in a way that either module expects.

Westa
 
New Post
11/28/2013 9:10 AM
 

I've experienced an other problem with jquery and DNN:

I've build a module which uses jQuery.  It can't include it's own jQuery as it collides with DNN's. So I don't include jQuery and use the one DNN already includes.

There are 3 problems with that approach:

1) DNN 7.0 used a pretty old version of jQuery. They recently (DNN7.1) included a newer jQuery, which was a huge jump in jQuery version and because the people at jQuery don't seem to care much about backwards compatibility, this broke a lot.

2) I can't upgrade DNN without the risk of having to upgrade my module also. Uncontrolled jquery upgrades aren't fun.

3) When DNN doesn't use jQuery itself (for example when popups are disabled) it doesn't include jQuery either, again breaking my module.

 

My preference is to avoid jQuery completely. It's almost always overkill to use, it has some bad UI concepts in it, but because they are provided, people seems to want to use them (adding slow animations everywhere, just because animations are cool??), readability of the code is a problem (who came up with the idea that writing everything as short as possible would be a good plan?), backwards compatibility, both between jquery versions and gracefull degradation for browsers without javascript) is a big problem,  and of course there are the collisions with other jquery instances as soon as your site becomes a little more complex.

I did save some time building the initial module, but I've spent way more time on fixing jquery issues ever since (and I've still not fixed them all)

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesdnn modules and jquerydnn modules and jquery


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.

Content Layout

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out