I’m going to preface this by saying two things:
1. I am very new to MODx
2. I love MODx
Okay, with that out of the way, here are my questions.
1. Why does MODx use so many javascript libraries? We have mootools, prototype, scriptaculous and jquery all as part of the basic install.
2. Why is MODx still using mootools 1.11? (1.2.3 has a "built-in" noConflict mode for other Libraries/Frameworks that use the $)
I’ve been trying to implement a jQuery slideshow in conjunction with MaxiGallery. It’s taken some time to sort out the conflicts and my own bugs, but it’s working... as long as I’m not logged in as an admin. I’ll sort that out... I hope! LOL. I’m no javascript and certainly not with any of these libraries. I use jQuery because I’ve picked up enough of it that it makes sense to me.
I’m not complaining, just curious as to why we use so many and wondering if anyone has come up with any efficient method of eliminating further conflicts.
-
MODX Staff
- 12,272 Posts
Evo only uses Mootools, albeit it’s still 1.11. It should be upgraded in the future.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
MODX Staff
- 10,725 Posts
Many folks have contributed their own work as Add-Ons to MODx. In Evolution, the most useful and commonly used of these user-contributed Add-Ons have been included in the basic installation. Most are used and demonstrated in the sample site that also is distributed with the Evolution core. Unfortunately, every contributor has different preferences on the front-end Javascript libraries they choose to employ, and it is difficult to get individual contributors to change their preferences. Our hope is that as more developers adopt the platform, they will start to develop and release sets of Add-Ons which use common JS and/or other developer libraries. We do not want to prescribe which ones they should use however.
That makes sense. So some of the additions to the core installation (like QuickManager) were developed as add-ons, which is why is uses jQuery instead of MooTools.
I am glad you don’t want to reign in developers by requiring development in only on library. One of the great things about MODx is it’s flexibility. What about my other question - is there a best practice or most efficient way of including another library without conflicting with any of the previously installed libraries or is it really just a matter of what you’re trying to do that determines their use?