Mixing jQuery and YUI together in an app, is it easily possible?

15,884

Solution 1

Speaking from some experience in developing a small tool myself, I've used YUI's rich control set with Prototype for DOM manipulation in the past and experienced no issues. Admittedly, this was a small tool that didn't use a wide array of the controls.

Even so, I'm always hesitant to use multiple frameworks on my web projects; however, if you're only using jQuery's DOM functionality and YUI's control functionality, then I think you're fine - there's not really a conflict of interest there. Plus, with jQuery's noConflict() mode and YUI's namespacing, the two frameworks really shouldn't trump one another.

Solution 2

This is an old question, but wanted to add a link to jQuery's doc on this topic...

http://docs.jquery.com/Using_jQuery_with_Other_Libraries

Solution 3

I regularly use jQuery with YUI (jQuery for most things, YUI for the UI elements) with no trouble.

Note that YUI 3 will introduce jQuery style selectors and chaining:

http://developer.yahoo.com/yui/3/

Share:
15,884
Jerph
Author by

Jerph

In my spare time when not working as a software developer, I contribute to a couple open source projects that I am quite proud of: ELMAH (Error Logging Modules and Handlers) is an application-wide error logging facility that is completely pluggable. URL Rewriter a .NET module which mimics the Apache mod_rewrite syntax for support in IIS and Casini Fluent Cassandra a .NET client for accessing the NoSQL Apache Cassandra database. Oh yeah and I also wrote a book: Co-authors of ASP.NET MVC 1.0 Website Programming: Problem - Design - Solution published by Wrox and released in June 2009.

Updated on June 25, 2022

Comments

  • Jerph
    Jerph about 2 years

    I have to preface this with the fact that I love jQuery as a JavaScript language extension and YUI as a rich set of free controls. So here is my question, is there going to be any problems down the line if I mix jQuery and YUI together in an MVC app I am working on.

    I want to use jQuery for the heavy lifting on the DOM and I want to use YUI for the rich user control set. This is an internal application and will never see the light of day outside of the organization I work for.

    If anybody has experience with mixing these two frameworks I would love to hear what your experience has been.