tags:

views:

199

answers:

2

My site was based in YUI, but since I plan to upgrade my site to .NET MVC and JQuery is MVC friendly, so I plan to convert my existing YUI scripts to JQuery.

+1  A: 

You'll need to learn the jquery style and syntax so see if it suits you first. I'd go about converting by first commenting the JS heavily to follow exactly what is happening programmatically and then completely rewrite the JS with the new library.

Jquery can be far more compact and short hand than many people realise so you may not have a direct correlation between code using YUI and code using jquery even though you can still achieve the same thing.

sanchothefat
+2  A: 

I use YUI (2 and 3) with all my ASP.NET MVC code, there is nothing not "MVC-Friendly" in YUI.

That said, and assuming you're using YUI2 (YUI3 has more similarity to JQuery), it's not necessarily hard to convert YUI to JQuery, but they do tend to be used differently. I would start by writing new stuff in JQuery until I was familiar with the syntax and the way JQuery was designed, and then start converting the YUI to JQuery.

But to reiterate, if the only reason you're changing from YUI to JQuery is because MS now ships it with ASP.NET MVC, you should probably rethink that decision. It's simply not necessary.

foxxtrot
I use YUI with .NET MVC too and found it to be less cumbersome than jQuery!
Skelly