4 ms·
Why not YUI? I'm so confused at the proliferation of these JS frameworks where everyone literally keeps reinventing the wheel. Excellent as a learning exercise
by namank 14y ago
Why not YUI? I'm so confused at the proliferation of these JS frameworks where everyone literally keeps reinventing the wheel.
Excellent as a learning exercise but other than that, what's the point? YUI has been around for so long compared to these. It's mature, it's under active development, very well documented, it has the option of including so many more things if you want, it's modularized,has a devcon every year, releases architectural videos every so often, has a dedicated CDN.
Why do you still pick ember or backbone or ...?
- ebiester 14y agoLooking at todoMVC, YUI takes ~400 lines of code to do what Angular does in 135, ember does in ~160, jQuery does in ~160, and even Backbone does in ~350 (and is anyone starting a project with backbone today?). Backbone unpacked, however, is only about 900 lines without spaces and comments. How big is YUI? To be fair, the YUI version has more comments, but it's fundamentally harder to follow too, IMHO. Further, YUI did a poor job of getting tutorials out at the quality of those available today for backbone, ember, and angular. As such, I at least found no approachable way to really get a mental model without working on an existing YUI project with a mentor or reading through a lot of documentation. I had done a simple YUI proof of concept with YUI 2, and went, "this is more work than jQuery" and never went back. So people reinvented the wheel, but they made it better. I'm glad that Yahoo blazed the path, but I'm not convinced it's the better option today.
- alistair77 14y agoLOCs aren't a great metric. I'm far more productive with Backbone than with JQuery alone and Angular offers a fundamentally different approach (stuff auto-magically just works) which is brilliant but isn't always easy to customize. I agree about YUI though ;-)
- ebiester 14y agoI get your point about angular -- I tend to think it has a particular use case in mind and does really well for that one. However, my point was that backbone doesn't give you much more than plain javascript itself -- let's not expect to abstract everything away compared to one of the full service frameworks. YUI, however, is aiming to be a full service framework. What is the additional benefit? Now, it's possible that YUI would show itself closer in terms of LOC/complexity to the other frameworks in a larger application. But looking piece by piece, ember and angular just seem to do things more efficiently, more clearly than YUI. And that was my point when discussing LOC.
- KaoruAoiShiho 14y agoHow do you check the loc on todoMVC (without you know, going into the half dozen different files and adding them all up)?
- sant0sk1 14y agoThere's a nifty tool called 'cloc' that makes it really easy. Coincidentally, I wrote about earlier this week: http://blog.jerodsanto.net/2013/02/cloc-counts-lines-of-code/ http://blog.jerodsanto.net/2013/02/cloc-counts-lines-of-code...
- dysoco 14y agoI'll never understand the web world. A couple of months Backbone was all the rage and now no one is using it?
- deleted 14y ago[deleted]
- thefreeman 14y agoI believe they still are. Backbone is a library. Angular and Ember are frameworks based off that library if I understand correctly.
- ebiester 14y agoI should restate: if someone started with backbone on a project, there's no reason to pull it out and restart with ember. It has its advantages for a certain type of project and a certain type of developer today. If you like minimal frameworks, like to make your own design decisions and want to build your own framework on top of a library, backbone is great. If you are just looking for a minimal subset of MVC because you're doing some high-concept app that doesn't fit into the standard web application paradigm, it's worth looking at backbone. Most importantly, if you're retrofitting an existing application, backbone will be invaluable for years. The ideas behind it are solid and relevant today and it's not a bad idea to use it. I just believe that if you are starting a web application today, for 95% of the use cases, you are better off sticking with jQuery or moving to Ember, Knockout or Angular. That isn't to disparage any of the other libraries and frameworks, though.
- 14y ago
- rxcfc 14y agoThis is a great post on why one project chose Ember: http://eviltrout.com/2013/02/10/why-discourse-uses-emberjs.html http://eviltrout.com/2013/02/10/why-discourse-uses-emberjs.h...
- pkulak 14y agohttp://xkcd.com/725/ http://xkcd.com/725/
- jetako 14y agoFunny you mention reinventing the wheel. YUI may have been around for just as long, but jQuery won the DOM abstraction battle years ago. Both Ember and Backbone depend on jQuery, incidentally. Leveraging popular libraries is an important feature of any framework.