Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 522089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:19:06+00:00 2026-05-13T08:19:06+00:00

I’ve been using YUI Library to develop websites. YUI 3 came out on september.

  • 0

I’ve been using YUI Library to develop websites. YUI 3 came out on september.

I’m still not convinced if i have to prepare myself for a migration.

What are the advantages of 3rd version over the 2nd ?

Have you been involved in such a migration, lately ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:19:06+00:00Added an answer on May 13, 2026 at 8:19 am

    I have not been involved in a migration, but I have contributed to the YUI 3 gallery, and I also know there is a gallery entry that allows any class from YUI 2 to be used in YUI 3. I guess the main advantage of YUI 3 is the ability to load in what you want on demand. You include 1 javascript file, and then would use the following line to use whatever modules in yui you want.

    YUI().use('dom',function(){
     // your code here
    });
    

    The advantage of this is it laods the DOM module, and makes available ONLY in the scope of that function. This is good because it only loads the modules you want in a specific scope. This will prevent clashes with any other JS frameworks if you use them.

    If you want to add your own custom module you would do something like this

    YUI().add('mycustompackage',function(Y){
        MyCustom.package.SomeClass = function(){}
        MyCustom.package.SomeClass.prototype = {}
    },'1.0.0',{requires:['base','dom','event'],use:['node']});
    

    That will add your module, and register the dependencies, so then you can use it by saying

    YUI().use('mycustompackage',function(){
     // code goes here
    });
    

    I guess from what I can see, the main advantages are a more secure and portable framework. You can make the YUI 3 modules available ONLY within a given function scope. THis frees up the main scope of the page for other things if you wish. Its also more secure, the definition of your functions are in a private scope, so they have no global variable hooks to be exploited by say script injection or what not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.