There has been a lot of talk why Kunena switched to MooTools for our Javascript framework needs and why, in particular, with version 1.2.x  that comes default with Joomla 1.5.19+ and 1.6.0.

I'd like to shine some light on the background of the ins and outs, clear up some confusion, and maybe provide some insight into why we believe this is one of the better decisions we have made since the start of Kunena.

When Kunena 1.0 started from the ashes of Fireboard, Joomlaboard, Simpleboard and the like, it came with Javascript based on the very popular jQuery framework. We enhanced and developed more and more features using jQuery, upgraded the libraries and kept moving forward with that direction.

More and more often we would get reports about broken Javascript and loss of the bbcode editor, quickreply and minimizer functionality on various sites. For almost a year, we tried to develop solutions to prevent our jQuery libraries from crashing with other jQuery libraries from various templates and third-party components. As it turns out jQuery (as all other frameworks would probably do) crash when on a given page two different versions of the same library are included.

So we wrote code with that between components like JomSocial and Kunena would result in the load of only a single copy of the libraries.

After dealing with these issues for many months and countless forum threads that last to this very day and after talking to various Joomla core developers and architects we came to the conclusion that we have been at this totally wrong for the longest time.

The thing is that way too many developers (us included) couldn't care less about their use of Javascript. Every component, module, plug-in, template and so on ships with their own copy of Javascript libraries. Well maybe not every, but way too many—including ourselves. Not only do we all conflict with each other, we really create bad websites along the way. Bad in a way of user experience. Some of the best looking websites are performing horribly because of the overuse of various Javascript libraries and the resulting number of files that have to be downloaded with every page view.

Just like we started using CSS sprites for our images, minimize our CSS and Javascript, we should not be shipping our product with yet another library that is redundant and that crashes with the same library but a different version coming from other Joomla software.

Now, we cannot fix all the other software out there and it is certainly clear that there is a lot of low quality modules and plug-ins around. That is not to say people don't mean well, but some pieces are just hacks from lesser experienced developers, or not enough thought has been given to the overall architecture. And by God, we do realize that we inherited a lot of junk ourselves.

What we can do with Kunena 1.6 is to lead by good example in some of the areas that are important for high quality websites. Things like a clear separation of templates and logic, minified CSS and Javascript, CSS sprites and not to ship with yet another Javascript library—to name a few.

It is important to understand that part. Our decision was to make Kunena Javascript library free and we believe strongly that all components, modules and plug-ins should be designed that way. The ONLY ones allowed to ship extra libraries should be templates and I would argue that Joomla should come with the extra jQuery libraries so template designers can choose, but that is my personal opinion). We are clearly far from that and even then a few conflicts will arise when you combine software from different developers.

It has never been about MooTools vs. jQuery. We couldn't care less. Both are outstanding frameworks and, depending on your background, you will prefer one over the other. Once we started investing more into MooTools we certainly learned to love this framework's style and approach to Javascript that makes certain annoying coding elements super easy. But that is totally beside the point.

Once we decided to not ever ship another framework ourselves, we looked to Joomla to provide us the framework we needed. If all developers would do so, there would be way less conflicts and way less page load (as in kB downloaded and # of download requests) as Joomla takes care of de-duping multiple Javascript framework requests.

With the evolution of Kunena 1.6, it was another goal to write it so it will run on both Joomla 1.5 as well as Joomla 1.6—once it is out there in a stable form. That plus the fact that the original Joomla 1.5 came with the now-outdated 1.1 version of it, made us think through how to go about this. Luckily MooTools & Joomla came forward with a legacy module that allows older applications to run on the newer 1.2.x version now shipped with Joomla. Its just like the legacy module for Joomla 1.0 code to run in Joomla 1.5. Even with that legacy module, not all Joomla 1.0 applications would run under Joomla 1.5—as we learned ourselves in the early days of Kunena.

Legacy modules of any kind are just a bridge to gap more and more outdated software in order to run on newer platforms. With Kunena 1.6 as a future solution, our path became pretty clear. It has to run on Joomla 1.5 and 1.6 and we want to base it on the state of the art version of Javascript frameworks. We also realized that some outdated templates, modules and components that still only work in MooTools 1.1 will have issues with the latest libraries. It turns out that most of these issues are only a few lines of code. You just have to invest some time into upgrading your stuff. Just like with Joomla 1.0 legacy mode, some developers will initially resist doing so, but in the end, the ones that support the latest versions will be the clear leaders.

We also watched very closely what other developers were doing and how their products progress. Some of the most prominent names in joomla software and templates have already migrated their code to be native to the new MooTools 1.2.x framework and if you run their software and templates together with Kunena 1.6 you will end up with an awesome out-of-the-box experience. Some other templates (in most cases, outdated menu code) and modules will cling to the older libraries because they believe they can get away with it. Ultimately, those that only work in legacy mode will have the same reputation as components that only ran in 1.0 legacy mode.

We were late getting to Joomla 1.5-native and we have learned our lesson. MooTools 1.2.4 is the future of Joomla 1.5 and 1.6. Kunena is about the future of forums in Joomla and their latest releases. As such we made the decision to invest into the right future for Kunena 1.6.

If, in your case, you are not ready to upgrade your site to the new standards, we will continue to support Kunena 1.5 until a later date when the vast majority of users have upgraded and migrated. Kunena 1.6 is about new features like, for example, a completely rewritten bbcode editor—one we wrote from scratch based on a MooTools editor library and that is one of the most advanced non-WYSIWYG bbcode editor out there. We also invested into multi-file uploads that are super easy to use and feel natural, yet don't require flash and other plugins to work.

Kunena 2.0 is already in the making and will come with a lot of new extra features and even more Javascript and AJAX. We feel we have invested into the right future for this community driven project.

If you are in doubt about whether your site will work with MooTools 1.2.x, you can (in most cases) perform a very simple test. Before you install Kunena 1.6 (if you do, don't forget to backup! ;-) ), make sure you are on the latest Joomla version (as of this article, vesion 1.5.20) and have enabled the MTupgrade system plug-in. Test your site and use tools like Firebug to check for Javascript errors. If you get none, you are probably set to run Kunena 1.6 out-of-the-box. If you do run into errors, you might want to check with your template, component, module or plug-in provider to see if and when they'll have an updated version available.

Hope this explains why we are where we are in regards to MooTools.

Here is some more information about Mootools: Javavascript and Kunena

Log in to comment

gwmbox replied the topic:
13 years 6 months ago
gwmbox's Avatar
Hi guys, sorry to slightly hijack this thread but it is related... in sorts :)

So anyway I have been out of the loop for a little while, so am I correct in that Mootools is now the 'must use' or 'recommended' js language to now use over jQuery for Joomla as a whole with (or without) Kunena?

If so I better get started on converting my site over to Mootools.

Is there a way for me to find out what plug-ins/extensions I have that depend on jQuery?


xreliable replied the topic:
13 years 7 months ago
xreliable's Avatar
thank you. I believe this is the best approach. the jquery mootools argument is beside the point really! the 3pd who approach their product with a "ours is best, adjust to us" make life miserable for their customers and ultimately I agree 100% Bad Websites. Keep up the good work.