News for hackers. Stuff that matters.
Re:Replacing most of D3.js with pure SVG and AngularJS by kayoone on Sunday December 01, 2013 @04:35PM (#6829451)
i love angular but i dont really like the notion of having to reinvent the wheel with it. I read about how one should ditch jquery plugins and rewrite them the "pure angular way" which makes sense for smaller stuff but there are so many very useful jquery plugins that have been around for years with alot of people working on them.

D3 is not a jquery plugin but why would i want to rewrite it for use in a specific framework ? When the next framework comes along that rewrite is more or less useless..If Angular is going to be the same standard as jQuery has become this is fine, but with current crop of competitors and the fast moving market i doubt it.

Re:Replacing most of D3.js with pure SVG and AngularJS by coldtea on Sunday December 01, 2013 @05:16PM (#6829654)
>I read about how one should ditch jquery plugins and rewrite them the "pure angular way" which makes sense for smaller stuff but there are so many very useful jquery plugins that have been around for years with alot of people working on them.

Actually it's supposed to make sense for the larger stuff -- Angular is not something to just replace a few small bindings in a your page while you do the rest of the stuff in 2005 way.

As for those "jQuery plugins that have been around for years" most of them are badly coded rubbish compared to what you're supposed to write in Angular style.

Re:Replacing most of D3.js with pure SVG and AngularJS by wwweston on Sunday December 01, 2013 @05:37PM (#6829751)
> Angular is not something to just replace a few small bindings in a your page while you do the rest of the stuff in 2005 way.

If we're talking about the jQuery way, let's at least say "2006", since that's when it was released, though it arguably didn't become "the" way for another few years afterwards. The big news in 2005/2006 was still Prototype.js.

> most of them are badly coded rubbish compared to what you're supposed to write in Angular style.

Or we don't have the benefit of 5 years of hindsight about what's problematic (or, "rubbish", if you will) when it comes to Angular style.

Re:Replacing most of D3.js with pure SVG and AngularJS by kayoone on Sunday December 01, 2013 @07:16PM (#6830217)
From my understanding other frameworks like Ember rely heavily on jQuery, unfortunately i havent really worked with them so i dont know what that means for plugins. We can not reuse angular directives in Ember/Backbone/Meteor so it doesnt make sense to spend the effort to reimplment bigger plugins/libraries imo.

It would actually be the other way round, you build your app in angular and for some specific view related code you use a proven and stable jQuery plugin, which imo still makes sense.

Furthermore you are being hyberbolic, jQ wasnt even released in 2005. In reality, when i have a client project with tight deadlines to finish and i need drag and drop functionality (as an example), i have little motivation to rewrite that just to avoid a jquery plugin that does the same thing and is much more mature.

Re:Replacing most of D3.js with pure SVG and AngularJS by benatkin on Sunday December 01, 2013 @06:41PM (#6830062)
Frameworks gonna framework.

A framework tries to take a platform and build another layer of abstraction on top of it. Ideally the developer should never have to cross that layer of abstraction except to learn more about it or to improve it.

A wrapper can keep the layer of abstraction intact for simple uses bit eventually the abstraction leaks, and demand for a replacement that's native to the framework is created.