Search

I'd go for jQuery. And here lies the problem — going with a standard library won't cater for all developers. And indeed extensions exist that user various libraries, making backwards compatibility a problem. I don't think there should be a singly-adopted library that all developers must use. We each have our preferences, and I would hope that Symphony could cater for this.

Scott, I now understand your proposal, thanks for taking the time to produce a mock up.

I have produced a basic proof of concept by which one installs a JavaScript Libraries extension, and other extensions essentially make a call to this and tell it which libraries to include in the head. If multiple extensions require a specific library, it is included only once. Adding a new library is a trivial task, as is updating the JS assets in future versions.

I imagine that multiple versions of the same library would certainly not work if included on the same page. Therefore there will always be a problem of versioning. But if a single extension governs the versions included, then at least extension developers have a common reference and a benchmark to work at. When a new major release of the JS library is released, it is the responsibility of the extension developers to ensure their extension code is still compatible. The likelihood of it not being compatible is low; especially considering the wealth of existing jQuery plugins which need to be mostly backwards compatible with future releases.

Adding a UI layer on top of this extension to allow for configurable URLs to the library is a fairly trivial task (although beyond my existing knowledge of extensions).

And here lies the problem — going with a standard library won't cater for all developers.

I see it differently - if jQuery is adopted in the core, it will mean it's the recommended library, but it shouldn't stop developers from using MooTools or another library if they so wish. I think some library should be adopted in the core anyway.

I have produced a basic proof of concept by which one installs a JavaScript Libraries extension, and other extensions essentially make a call to this and tell it which libraries to include in the head. If multiple extensions require a specific library, it is included only once. Adding a new library is a trivial task, as is updating the JS assets in future versions.

This sounds very promising. And as you mention, there's no reason why we can't use both solutions together.

Vote 1 jQuery.

jQuery would be awesome!

jquery :)

Using jQuery too.

I'll be releasing a JavaScript Libraries extension that allows other extensions to request a specific library is appended. The impending Symphony 2.0.2 adds a new function which makes this possible.

So jQuery seems to be the choice -
I think we need to found a group for those who need to switch: the Mootools Anonymous ;)

I'll be releasing a JavaScript Libraries extension that allows other extensions to request a specific library is appended. The impending Symphony 2.0.2 adds a new function which makes this possible.

Great! Do you know if jQuery will be bundled with the core distribution or will your extensions handle all JavaScript libraries?

The extension makes no impact on the decision as to whether jQuery is or isn't installed in the core. I see it as a happy medium. It allows libraries to be switched on and off on demand. If in the future the decision is made to include jQuery, then the JS Libraries extension could simply silently fail on appending jQuery as it would already be available.

At the moment I am including:

  • jQuery 1.3.2
  • Prototype 1.6.0.3
  • MooTools 1.2.1
  • SWFObject 2.1

I'll create another thread to discuss this extension when it's released. Best keep this discussion back on topic; debating the inclusion of a specific library within the Symphony core.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details