News for hackers. Stuff that matters.
Re:Replacing most of D3.js with pure SVG and AngularJS by 1wheel on Sunday December 01, 2013 @02:50PM (#6828905)
This is interesting, but I'm not really sure what you get from it.

d3 and direct manipulation of SVGs are both so low level that make a decent looking chart requires a bit of boilerplate. That boilerplate should get wrapped inside of a directive and once you've done that, the specifics of how the directive is implemented don't matter too much.

It would be nice to use one language for data binding; I think angular would end up being a lot more verbose and prevent some of the nice things you can do with .call() and .transition() though. Additionally, I don't think 'creating a hole in the DOM' is necessary a bad thing. Sending graphs only the information that they need separates concerns nicely, resulting in more modular and maintainable code.

If you haven't read it, http://bleedingedgepress.com/our-books/developing-a-d3-js-ed... is pretty good.

Re:Replacing most of D3.js with pure SVG and AngularJS by alexandros on Sunday December 01, 2013 @03:20PM (#6829100)
Even if it all gets buried under high-level visualisations, it's better to have fewer moving parts and a smaller cognitive model in case you do need to dive in. But the premise of d3 is that you tweak your visualisations. There are other libraries like raphael that are supposed to be higher level.

But there are many times you need to create something new. At least I've had to, maybe I'm atypical. And when that time comes, I prefer manipulating familiar HTML and AngularJS that I also already know, than needing to understand yet another toolkit's approach to bindings.