3 ms·
For those in the know: can you tell me/us how this is superior to working with just Raphael.js?
by BasDirks 14y ago
For those in the know: can you tell me/us how this is superior to working with just Raphael.js?
- tagawa 14y agoPersonally, I don't think it is. For most use cases, Raphael is a better choice for its browser compatibility (namely IE up to 8) and approachable syntax. Having said that, there are times when pure SVG is preferred, such as when JavaScript is not available (although SVG files can contain JS) or when you don't want the processing overhead of a library. For example, SVG is often used to render the UI graphics for navigation menus in TVs which until recently were very low powered. Of course, it's also beneficial (IMO) to have a grasp of how the underlying language works even if you use it through a layer of abstraction. Overall, though, I'd use Raphael unless you have a reason not to. EDIT: I forgot to add that knowledge of SVG is useful for editing images in a text editor, such as when you want fine-grained control or you want to manually remove some of the cruft that graphics software tends to add to files.
- andrewcooke 14y agoyou can get cross-platform compatability with svg using google's svgweb - http://code.google.com/p/svgweb/ http://code.google.com/p/svgweb/
- drhowarddrfine 14y agoI've never used Raphael.js but, looking at the front page, it says it uses the SVG recommendation. But so do browsers and browsers implement it internally. The advantage may be two-fold. 1) It works in all browsers where, as it is with most technology, Internet Explorer didn't support SVG and 2) every object is a DOM object. (But isn't every SVG object a XML object? Been away too long.) Does Raphael draw in a canvas? SVG draws in the browser viewport. Which does a better job of drawing vectors? iow, I don't know.