I manage a group of programmers. I do value my employees opinion but lately we've been divided as to which framework to use on web projects.
我个人倾向于100,但我的一些团队似乎想迁移到jQuery,因为它被更广泛地采用.这本身不足以让我允许移民.
I have used both jQuery and MooTools. This particular essay tends to reflect how I feel about both frameworks. jQuery is great for DOM Manipulation, but seem to be limited to helping you do that.
就功能而言,100和101都可以轻松实现DOM Selection and Manipulation:
// jQuery
$('#someContainer div[class~=dialog]')
.css('border', '2px solid red')
.addClass('critical');
// MooTools
$('#someContainer div[class~=dialog]')
.setStyle('border', '2px solid red')
.addClass('critical');
100和101都支持轻松的AJAX:
// jQuery
$('#someContainer div[class~=dialog]')
.load('/DialogContent.html');
// MooTools (Using shorthand notation, you can also use Request.HTML)
$('#someContainer div[class~=dialog]')
.load('/DialogContent.html');
100和101都允许轻松DOM Animation:
// jQuery
$('#someContainer div[class~=dialog]')
.animate({opacity: 1}, 500);
// MooTools (Using shorthand notation, you can also use Fx.Tween).
$('#someContainer div[class~=dialog]')
.set('tween', {duration: 500})
.tween('opacity', 1);
100提供以下额外服务:
- Large community of supporters
- Plugin Repository
- 与微软的ASP.NET和VisualStudio
- 由微软、谷歌和其他公司使用
100提供以下额外服务:
- Object Oriented Framework with Classic OOP emulation for JS
- 扩展本机对象
- Higher consistency between browsers for native functions support.
- 更容易实现代码重用
- 由万维网联盟、Palm和其他公司使用.
考虑到这一点,似乎100完成了101所做的一切,甚至更多(有些事情我在101年做不到,在100年我可以做到),但101的学习曲线更小.
So the question is, why did you or your team choose jQuery over another JavaScript framework?
Note:虽然我知道并承认100是一个很好的框架,但也有其他 Select ,我正试图决定为什么100应该是我们的 Select ,而不是我们现在使用的(102)?