<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CodeDread Blog &#187; SVG</title>
	<atom:link href="http://www.codedread.com/blog/archives/category/technology/software/web/svg/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codedread.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 16 Aug 2010 03:18:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SVG/Canvas Marketshare: July 2010</title>
		<link>http://www.codedread.com/blog/archives/2010/08/16/svgcanvas-marketshare-july-2010/</link>
		<comments>http://www.codedread.com/blog/archives/2010/08/16/svgcanvas-marketshare-july-2010/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 03:18:31 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[SVG]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[svg browser]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=917</guid>
		<description><![CDATA[SVGI’ve updated my marketshare spreadsheet for July 2010 charting the percentage of web users who can view SVG and Canvas:  41.82%

Note that this number is lower than last month&#8217;s because I could not include hitslink.com stats (they&#8217;ve put their stats behind a pay-wall now).  If anyone knows of a better source of stats, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.codedread.com/clipart/svg.svgz"><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/svg.svgz">SVG</object></a>I’ve updated my marketshare spreadsheet for July 2010 charting the percentage of web users who can view SVG and Canvas:  <strong>41.82%</strong></p>
<p><iframe width="300" height="360" src="http://spreadsheets.google.com/pub?key=t5TB0_qFXcrkEndedXkKaug&#038;output=html"/></p>
<p>Note that this number is lower than last month&#8217;s because I could not include hitslink.com stats (they&#8217;ve put their stats behind a pay-wall now).  If anyone knows of a better source of stats, let me know.</p>
<p>P.S. This figure does not take into account any user that has a SVG plugin installed or authors who have used the excellent SVG Web or excanvas shims, so this is really a worst-case number.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/08/16/svgcanvas-marketshare-july-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE9: No longer failing</title>
		<link>http://www.codedread.com/blog/archives/2010/06/24/ie9-no-longer-failing/</link>
		<comments>http://www.codedread.com/blog/archives/2010/06/24/ie9-no-longer-failing/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 16:24:26 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[ie9]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=908</guid>
		<description><![CDATA[[clipart]Ok, after getting IE9 preview 3 installed last night, I was able to update my SVG scorechart.  I&#8217;m pleased to say that I would now unequivocally classify IE9 as a browser that supports SVG.  Supporting gradients, patterns, masking, clipping and more actually gained them quite a few points. 
I&#8217;m also pleased to see [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/svg.svgz">[clipart]</object>Ok, after getting IE9 preview 3 installed last night, I was able to update my <a href="http://codedread.com/svg-support.php">SVG scorechart</a>.  I&#8217;m pleased to say that I would now unequivocally classify IE9 as a browser that supports SVG.  Supporting gradients, patterns, masking, clipping and more actually gained them quite a few points. </p>
<p>I&#8217;m also pleased to see that they support conditional processing (the &#60;switch&#62; element) so you can see at a rough glance what feature strings they claim to support by accessing <a href="http://codedread.com/svgtest.svg">this page</a> I made years ago.  Not a bad feature set for first time out! Kudos to the IE team!</p>
<p>And they support &#60;canvas&#62; too!</p>
<p>In my brief look at IE9 while running through the SVG tests, I would say their biggest areas to improve on before final release are text (especially text selection) and DOM.  Though <a href="http://a.deveria.com/">Alexis</a> assures me that they do pass quite a number of <a href="http://svgtorture.googlecode.com/svn/trunk/automated/test.html">SVG torture tests</a>.  </p>
<p>Hey, now that we have all major browsers supporting basic SVG rendering, it&#8217;s really time to ramp up the effort on <a href="http://code.google.com/p/svgtorture/">SVG Torture Tests</a> to ensure DOM coverage and corner cases.  We are looking for someone to lead this activity in the <a href="http://www.w3.org/Graphics/SVG/IG/">SVG Interest Group</a>.</p>
<p>Oh, and I would love to have <a href="http://svg-edit.googlecode.com/">SVG-edit</a> working in IE9.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/06/24/ie9-no-longer-failing/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>SVG Marketshare: May 2010</title>
		<link>http://www.codedread.com/blog/archives/2010/06/07/svg-marketshare-may-2010/</link>
		<comments>http://www.codedread.com/blog/archives/2010/06/07/svg-marketshare-may-2010/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 05:46:05 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[SVG]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=899</guid>
		<description><![CDATA[[clipart]I’ve updated my marketshare spreadsheet for May 2010 charting the percentage of web users who can view SVG:  40.55%

P.S. This figure does not take into account any user that has a SVG plugin installed or authors who have used the excellent SVG Web shim, so this is really a worst-case number.
]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/svg.svgz">[clipart]</object>I’ve updated my marketshare spreadsheet for May 2010 charting the percentage of web users who can view SVG:  <strong>40.55%</strong></p>
<p><iframe width="300" height="360" src="http://spreadsheets.google.com/pub?key=t5TB0_qFXcrkEndedXkKaug&#038;output=html"/></p>
<p>P.S. This figure does not take into account any user that has a SVG plugin installed or authors who have used the excellent SVG Web shim, so this is really a worst-case number.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/06/07/svg-marketshare-may-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SVG Marketshare: April 2010</title>
		<link>http://www.codedread.com/blog/archives/2010/05/06/svg-marketshare-april-2010/</link>
		<comments>http://www.codedread.com/blog/archives/2010/05/06/svg-marketshare-april-2010/#comments</comments>
		<pubDate>Thu, 06 May 2010 19:12:56 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[SVG]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=865</guid>
		<description><![CDATA[[clipart]I’ve updated my marketshare spreadsheet for April 2010 charting the percentage of web users who can view SVG:  40.26%

P.S. This figure does not take into account any user that has a SVG plugin installed or authors who have used the excellent SVG Web shim, so this is really a worst-case number.
]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/svg.svgz">[clipart]</object>I’ve updated my marketshare spreadsheet for April 2010 charting the percentage of web users who can view SVG:  <strong>40.26%</strong></p>
<p><iframe width="300" height="360" src="http://spreadsheets.google.com/pub?key=t5TB0_qFXcrkEndedXkKaug&#038;output=html"/></p>
<p>P.S. This figure does not take into account any user that has a SVG plugin installed or authors who have used the excellent SVG Web shim, so this is really a worst-case number.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/05/06/svg-marketshare-april-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVG/Canvas Marketshare: Mar 2010</title>
		<link>http://www.codedread.com/blog/archives/2010/04/05/svgcanvas-marketshare-mar-2010/</link>
		<comments>http://www.codedread.com/blog/archives/2010/04/05/svgcanvas-marketshare-mar-2010/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 01:16:42 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[RIA]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[canvas]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=804</guid>
		<description><![CDATA[[clipart]I&#8217;ve updated my marketshare spreadsheet for March 2010 charting the percentage of web users who can view SVG/Canvas:  39.99%

Link to spreadsheet
P.S. I should mention that this figure does not take into account any user that has a SVG plugin installed or authors who have used the excellent SVG Web or ExplorerCanvas shims, so this [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/svg.svgz">[clipart]</object>I&#8217;ve updated my marketshare spreadsheet for March 2010 charting the percentage of web users who can view SVG/Canvas:  <b>39.99%</b></p>
<p><iframe width="300" height="350" src="http://spreadsheets.google.com/pub?key=t5TB0_qFXcrkEndedXkKaug&#038;output=html"/><br />
<a href="http://spreadsheets.google.com/pub?key=t5TB0_qFXcrkEndedXkKaug&#038;output=htm">Link to spreadsheet</a></p>
<p>P.S. I should mention that this figure does not take into account any user that has a SVG plugin installed or authors who have used the excellent <a href="http://svgweb.googlecode.com/">SVG Web</a> or <a href="http://excanvas.sourceforge.net/">ExplorerCanvas</a> shims, so this is really a worst-case number.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/04/05/svgcanvas-marketshare-mar-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>To And Fro</title>
		<link>http://www.codedread.com/blog/archives/2010/03/31/to-and-fro/</link>
		<comments>http://www.codedread.com/blog/archives/2010/03/31/to-and-fro/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 13:45:23 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[canvas]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=782</guid>
		<description><![CDATA[[clipart]Issue 70 has been open for awhile now.  In fact it&#8217;s one of just a handful of two-digit bugs left in SVG-edit.  Now that all browsers have heralded support for SVG into the future, one might argue that the need for this bug will evaporate in a couple years.  However, one would [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/recycling.svgz">[clipart]</object><a href="http://code.google.com/p/svg-edit/issues/detail?id=70" title="Convert SVG to PNG">Issue 70</a> has been open for awhile now.  In fact it&#8217;s one of just a handful of two-digit bugs left in <a href="http://code.google.com/p/svg-edit/issues/list">SVG-edit</a>.  Now that all browsers have heralded support for SVG into the future, one might argue that the need for this bug will evaporate in a couple years.  However, one would be wrong.  First, there are lots of mobile browsers out there.  Second, in some cases it could be easier to just tell the browser how to draw a collection of dots rather than mathematical instructions (think thumbnails).  So how to solve it?<span id="more-782"></span></p>
<p>One thought that occurred to me is if I can shove the SVG into a HTML5 Canvas element, I can then call <a href="http://dev.w3.org/html5/canvas-api/canvas-2d-api.html#dom-canvas-todataurl">toDataURI()</a> on it to generate a PNG.  Unfortunately only <a href="http://lists.w3.org/Archives/Public/public-html/2007Oct/0320.html">Opera seems to have experimented</a> with loading SVG into a Canvas directly.  Also, there are many effects that can be done in SVG that cannot be done in Canvas (filters, fonts, and more).</p>
<p>The <a href="http://dev.w3.org/html5/canvas-api/canvas-2d-api.html#section-canvas-interface-element">Canvas2D API</a> does mention that in the future, the svg:image element may support <a href="http://dev.w3.org/html5/canvas-api/canvas-2d-api.html#the-canvas-interface-element">the CanvasElement DOM interface</a>.  I&#8217;m anticipating Microsoft to announce &#60;canvas&#62; support for IE9 later this year and probably to support this interface on svg:image elements.  It&#8217;s one way they can innovate on the web standards front while they continue to catch up to other modern browsers.</p>
<p>This would be good, but why only the <a href="http://www.w3.org/TR/SVG11/struct.html#ImageElement">svg:image element</a>?  I&#8217;d argue that any element that contains some geometry could gain the toDataURI() method (particularly useful would be the &#60;svg&#62; element here).</p>
<p>Until such time as browsers all get in sync, there are other options.  <a href="http://canvg.googlecode.com/">canvg</a> is one such option and I&#8217;ve been dutifully raising bugs and writing teeny patches but there&#8217;s a long ways to go for a robust solution.</p>
<p>Ultimately this is another case of <a href="http://www.codedread.com/blog/archives/2009/06/27/oh-the-things-youll-learn/">why am I doing something in script that all browsers already know how to do</a>?  You really have to think long-term in the web space, don&#8217;t you? <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Other ideas?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/03/31/to-and-fro/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Know The Beast</title>
		<link>http://www.codedread.com/blog/archives/2010/03/22/know-the-beast/</link>
		<comments>http://www.codedread.com/blog/archives/2010/03/22/know-the-beast/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 01:07:09 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[SVG]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[graphics]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=757</guid>
		<description><![CDATA[[clipart]Cameron Adams decided to benchmark Flash, SVG, Canvas and HTML5 using a particle engine he created.  Not surprising (to me anyway), the SVG scores were the worst of the bunch.  This stands to reason:  does each particle really need to be a DOM element?  Nonetheless, I decided to see what I [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/tools.svgz">[clipart]</object><a href="http://www.themaninblue.com/writing/perspective/2010/03/22/">Cameron Adams</a> decided to benchmark Flash, SVG, Canvas and HTML5 using a particle engine he created.  Not surprising (to me anyway), the SVG scores were the worst of the bunch.  This stands to reason:  does each particle really need to be a DOM element?  Nonetheless, I decided to see what I could do to make the SVG scores suck less.  I thought I&#8217;d use it as an opportunity to also teach some techniques.<span id="more-757"></span></p>
<h3>Particle Creation</h3>
<p>Cameron initializes the particles this way:</p>
<pre>
	var domNode = document.createElementNS(SVG_NS, "circle");
	var benchmark = document.getElementById("benchmark");
	benchmark.appendChild(domNode);

	// Set initial position to middle of screen
	domNode.setAttribute("cx", x + PARTICLE_RADIUS);
	domNode.setAttribute("cy", y + PARTICLE_RADIUS);
	domNode.setAttribute("r", PARTICLE_RADIUS);

	// Set colour of element
	domNode.setAttribute("fill", COLORS[Math.floor(Math.random() * COLORS.length)]);
</pre>
<p>That is, he creates a svg:circle element, then appends it to the DOM, then modifies its attributes.  Every time an attribute is changed in the DOM it has the potential to cause a layout/render change.  Thus, it makes more sense (to me) to attach the circle to the DOM only after you&#8217;re done initializing the element (i.e. after all the setAttribute calls).</p>
<p>This doesn&#8217;t affect the frame-rate, since creation only happens at the beginning, but it might affect the startup time of the animation so I thought I&#8217;d drop it in this post.</p>
<h3>DOM Animation &#8211; the Naive Approach</h3>
<p>Next, he has a function that is called as fast as possible to animate the particles.  The animate function does a simple loop over all particles and calls a draw() function.  The particle&#8217;s draw function does this:</p>
<pre>
		// lots of other JS code here
		domNode.setAttribute("cx", nextX + PARTICLE_RADIUS);
		domNode.setAttribute("cy", nextY + PARTICLE_RADIUS);
</pre>
<p>The problem with this again is that each DOM call can cause a re-render.  This means if you have 500 particles, there are 1000 DOM calls affecting the rendering with every call to animate().  Depending on how stupid the browser is, this could be expensive.</p>
<ul>
<li><a href="http://codedread.com/browser-tests/particle/particle.xhtml">Click here to try the original demo</a></li>
</ul>
<table>
<thead>Original Results</thead>
<tr>
<th>Browser</th>
<th>Frame Rate</th>
</tr>
<tr>
<td>Firefox 3.6 (OSX)</td>
<td>1.75 fps</td>
</tr>
<tr>
<td>Firefox 3.7 Nightly (OSX)</td>
<td>1.9 fps</td>
</tr>
<tr>
<td>Opera 10.10 (OSX)</td>
<td>12.5 fps</td>
</tr>
<tr>
<td>Opera 10.50 (OSX)</td>
<td>14.5 fps</td>
</tr>
<tr>
<td>IE9 Preview 1 (Win7 VM)</td>
<td>28 fps</td>
</tr>
<tr>
<td>Safari 4.0.5 (OSX)</td>
<td>32 fps</td>
</tr>
<tr>
<td>Chrome 5 Nightly (OSX)</td>
<td>40 fps</td>
</tr>
</table>
<h3 id="suspendredraw">Suspension</h3>
<p>My first attempt was to use suspendRedraw() and unsuspendRedraw() around the for-loop that calls particle.draw().  This is the SVG-recommended way to do a bunch of operations &#8216;off-screen&#8217; and then have the results updated in one-shot.  This <em>did</em> have an effect on Firefox&#8217;s frame rate.  </p>
<p>But it didn&#8217;t really seem to affect WebKit&#8217;s performance at all.  Looking at the WebKit source (svg/SVGSVGElement.cpp) it&#8217;s pretty easy to see why:</p>
<pre>
unsigned SVGSVGElement::suspendRedraw(unsigned /* maxWaitMilliseconds */)
{
    // FIXME: Implement me (see bug 11275)
    return 0;
}
</pre>
<p>Maybe WebKit will one day implement this and the technique will become more broadly useful.</p>
<ul>
<li><a href="http://codedread.com/browser-tests/particle/particle-suspend.xhtml">Click here to try the demo that uses suspendRedraw</a></li>
</ul>
<table>
<thead>SuspendRedraw Results</thead>
<tr>
<th>Browser</th>
<th>Frame Rate</th>
</tr>
<tr>
<td>Firefox 3.6 (OSX)</td>
<td>3.2 fps</td>
</tr>
<tr>
<td>Firefox 3.7 Nightly (OSX)</td>
<td>3.4 fps</td>
</tr>
<tr>
<td>Opera 10.10 (OSX)</td>
<td>8.2 fps</td>
</tr>
<tr>
<td>Opera 10.50 (OSX)</td>
<td>23.5 fps</td>
</tr>
<tr>
<td>IE9 Preview 1 (Win7 VM)</td>
<td>N/A</td>
</tr>
<tr>
<td>Safari 4.0.5 (OSX)</td>
<td>32 fps</td>
</tr>
<tr>
<td>Chrome 5 Nightly (OSX)</td>
<td>40 fps</td>
</tr>
</table>
<p>NOTE: IE9 Preview 1 has not implemented suspendRedraw() and the demo does not run.</p>
<h3 id="manual-offscreen">Manually Doing Off-Screen Rendering</h3>
<p>I then went and did something crazy.  </p>
<p>I added a svg:g (group) element to the particle test, added all the particles to it.  Then with each call to render, I remove the &#60;g&#62; from the DOM, call all the particle draw() functions, then re-add the &#60;g&#62; to the DOM.  </p>
<p>This had a <em>dramatic</em> effect on Firefox&#8217;s performance, but it seemed to slow down Safari and Opera.  Not sure why that would be, but I guess they have much more sensible ways of updating the rendered state of the DOM than Firefox so that removing and adding an element to the DOM becomes more expensive.</p>
<ul>
<li><a href="http://codedread.com/browser-tests/particle/particle-g.xhtml">Click here to try the demo with manual off-screen rendering</a></li>
</ul>
<table>
<thead>Manual Offscreening Results</thead>
<tr>
<th>Browser</th>
<th>Frame Rate</th>
</tr>
<tr>
<td>Safari 4.0.5 (OSX)</td>
<td>12.75 fps</td>
</tr>
<tr>
<td>Opera 10.10 (OSX)</td>
<td>14 fps</td>
</tr>
<tr>
<td>Firefox 3.6 (OSX)</td>
<td>21.5 fps</td>
</tr>
<tr>
<td>Firefox 3.7 Nightly (OSX)</td>
<td>21.5 fps</td>
</tr>
<tr>
<td>Opera 10.50 (OSX)</td>
<td>23.5 fps</td>
</tr>
<tr>
<td>IE9 Preview 1 (Win7 VM)</td>
<td>25 fps</td>
</tr>
<tr>
<td>Chrome 5 Nightly (OSX)</td>
<td>26.5 fps</td>
</tr>
</table>
<h3>Conclusion</h3>
<p>This blog post is really just an attempt to share the knowledge about some of the challenges in using SVG for high-performance demos.  Basically don&#8217;t change the live DOM if you can avoid it.</p>
<p>Note that I still stand by my original statement that SVG is not the right technology for particle effects unless you need mouse interactivity.  This type of demo is much more suitable for HTML5&#8217;s &#60;canvas&#62; element.  Let&#8217;s hope IE9 also implements a GPU-accelerated version of this element too!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/03/22/know-the-beast/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>SVG-edit: One Year Old</title>
		<link>http://www.codedread.com/blog/archives/2010/02/06/svg-edit-one-year-old/</link>
		<comments>http://www.codedread.com/blog/archives/2010/02/06/svg-edit-one-year-old/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 16:49:41 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[SVG]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[svg-edit]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=663</guid>
		<description><![CDATA[[clipart]One year ago today, Narendra Sisodiya started a tiny project called SVG-edit, with the very first check-in.  He was trying to build a white-boarding application that could be used to facilitate online education.
Wow.
My kids couldn&#8217;t even talk at the age of one!  Slackers&#8230;
It&#8217;s pretty amazing to think that this:

Can turn into this:

over the [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/svgedit.svgz">[clipart]</object>One year ago today, <a href="http://narendra.techfandu.org/">Narendra Sisodiya</a> started a tiny project called SVG-edit, with <a href="http://code.google.com/p/svg-edit/source/detail?r=2">the very first check-in</a>.  He was trying to build a white-boarding application that could be used to facilitate online education.<span id="more-663"></span></p>
<p>Wow.</p>
<p>My kids couldn&#8217;t even talk at the age of one!  Slackers&#8230;</p>
<p>It&#8217;s pretty amazing to think that this:</p>
<p><iframe src="http://svg-edit.googlecode.com/svn/branches/1.0/svg-editor.html" width="600" height="420"/></p>
<p>Can turn into this:</p>
<p><iframe src="http://svg-edit.googlecode.com/svn-history/r1349/trunk/editor/svg-editor.html" width="750" height="700"/></p>
<p>over the course of just one year, built in a lot of people&#8217;s spare time &#8211; but here we are! <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I can&#8217;t wait to see what <a href="http://svg-edit.googlecode.com/">SVG-edit</a> looks like on its 2nd birthday!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/02/06/svg-edit-one-year-old/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SVG 2.0 Wishlist</title>
		<link>http://www.codedread.com/blog/archives/2010/01/29/svg-2-0-wishlist/</link>
		<comments>http://www.codedread.com/blog/archives/2010/01/29/svg-2-0-wishlist/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 13:20:31 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[SVG]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=606</guid>
		<description><![CDATA[[clipart]Robin Berjon posted about what his SVG 2.0 Wishlist would be.  I think he used the hatchet a little too much, so I thought I&#8217;d give some feedback.  Since he doesn&#8217;t support comments (boo!) here we go.
Chopping defs
This was probably my biggest annoyance/concern since, to my knowledge, the &#60;defs&#62; elements causes zero problems. [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/angry-axe.svgz">[clipart]</object><a href="http://berjon.com/blog/2010/01/svg2.0-wishlist.html">Robin Berjon posted</a> about what his SVG 2.0 Wishlist would be.  I think he used the hatchet a little too much, so I thought I&#8217;d give some feedback.  Since he doesn&#8217;t support comments (boo!) here we go.<span id="more-606"></span></p>
<h3><a href="#chopping-defs" id="chopping-defs">Chopping defs</a></h3>
<p>This was probably my biggest annoyance/concern since, to my knowledge, the &#60;defs&#62; elements causes zero problems.  Why would &#60;head&#62; or &#60;g style=&#8221;display:none&#8221;&#62; be preferable to <a href="http://www.w3.org/TR/SVG11/struct.html#DefsElement">&#60;defs&#62;</a>?  The defs elements provides semantics to a SVG document.  Specifically, it acts like Flash IDE&#8217;s &#8220;stage&#8221;, where graphical editors can store and find the re-usable elements in a drawing.  I don&#8217;t see any benefit to getting rid of &#60;defs&#62; nor do I see a problem that it causes.  Why are you using &#60;section&#62; elements when &#60;div&#62; will do just fine on your blog, Robin? <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3><a href="#chopping-smil" id="chopping-smil">Chopping SMIL</a></h3>
<p>I think chopping SMIL at this point would be a bad idea, considering that all native SVG browsers are just coming online with this stuff now.  Yes, SMIL is vastly underused, but frankly SMIL has not had a chance to prove itself &#8211; both in user agents and in graphical editors.  I&#8217;d say now that it&#8217;s been (being) finally implemented, give SMIL a chance and drop it in SVG 3.0 (or whatever comes next) if it is still too under-used.</p>
<p>Your alternatives to SMIL are <a href="http://www.w3.org/TR/css3-animations/">CSS3 Animations</a> for simple cases (sounds good) and JS+DOM for complex cases.  I disagree with the latter as the only way to animate complex SVG.  I think that SMIL still has good uses there.  Out of curiosity Robin, what do you think of <a href="http://www.w3.org/TR/timesheets/">SMIL Timesheets</a>? </p>
<p>What we do need to solve is the DOM interface for SMIL.  I agree baseVal and animVal are truly hated.  In general, I think declarative animations make sense for SMIL, but I don&#8217;t know about the mixture of SMIL + DOM &#8211; that never quite made sense to me.</p>
<p>Maybe move SVG+SMIL out into its own SVG 2.0 Module and see how it fares and provide SVG DOM Core 2.0 that&#8217;s leaner, meaner and leaves out the SMIL?</p>
<h3 id="elems-props"><a href="#attrs-props">Attributes and CSS Properties</a></h3>
<p>What&#8217;s the migration strategy?  If the SVG 2.0-capable browser encounters an attribute that was present in SVG 1.1 and not present in 2.0 &#8211; what should it do?  Ignore?  &#60;circle fill=&#8221;blue&#8221; /&#62; becomes black?  </p>
<p>Not all editors universally love inline style attributes (though the popular ones do).  Inline style attributes are another layer of parsing, another micro-syntax for hand authors, and can actually bloat the markup &#8211; unless you have more than 3 presentational attributes <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>I think removing the CSS properties as attributes will actually end up confusing authors further (what? i can set the radius of the circle using XML but not the stroke-width?).  I think the decision to make presentational attributes was a conscious one based on the fact that SVG is such a visual language.</p>
<p>I guess I don&#8217;t have a better solution for CSS properties as XML attributes, because I admit that it <em>is</em> confusing as it stands, but I&#8217;m not convinced that simply removing them is the answer.</p>
<h3><a href="#slicing-not-chopping" id="slicing-not-chopping">Slicing &#8211; not Chopping</a></h3>
<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/scalpel.svgz">[clipart]</object>I hope that SVG 2.0 <em>does</em> become leaner.  I just think that now that browsers are seemingly rallied around 1.1 Full and people are actually starting to use SVG that we need take a more cautious approach with changes.  To me, carefully and iteratively shaving is a better approach than swinging a hacksaw and see what you end up with.  Sorry to mix up so many blades in my analogies.</p>
<p>Here are some things I wouldn&#8217;t be upset about if they went away:</p>
<ul>
<li>&#60;symbol&#62; &#8211; hardly needed if &#60;use&#62;-referenced elements could have a viewBox, I don&#8217;t think they add considerable semantics like defs does</li>
<li>&#60;tref&#62; &#8211; sure, I&#8217;ve never used it</li>
<li>&#60;view&#62; &#8211; agree with your comments</li>
<li>&#60;audio&#62;, &#60;video&#62; &#8211; agreed that HTML5&#8217;s versions are the future</li>
<li>&#60;switch&#62; &#8211; never lived up to its potential, unfortunately (though I guess this leaves server-side or JS as solutions for localization?</li>
<li>&#60;font&#62; and related &#8211; I agree with your idea to move it out of the &#8216;core&#8217; spec.  Put it into a module and see what happens with WOFF, etc</li>
<li>&#60;foreignObject&#62; &#8211; I agree that this shouldn&#8217;t be necessary to mix HTML in SVG.  If inline HTML can somehow show up directly inline with SVG then we could also do away with &#60;textArea&#62; and others</li>
<li>version and baseProfile &#8211; I think I agree with you on this one, they could be dropped.  But if this is done, we need a good way of marking features non-conforming and obsolete going forward.  HTML5 still has spec text for the &#60;font&#62; element.</li>
</ul>
<h3><a href="#my-wishlist" id="my-wishlist">My Wishlist</a></h3>
<p>I liked your &#8220;Better HTML Inlining&#8221; idea. I think it has merit.</p>
<p>You seem to be extremely focused on paring down the language so that implementers can reduce their &#8220;SVG code footprint&#8221;.  While <a href="http://tech.groups.yahoo.com/group/svg-developers/message/62393?l=1">this is definitely a concern for me</a> as well, I think your proposals for removal do not pay enough attention to authors, tool-makers and existing content.</p>
<p>Personally, I think <em>the</em> major focus for SVG 2.0 should be on one thing:</p>
<p><b>Making the DOM Suck Less</b></p>
<p>This alone could seriously help reduce the SVG code footprint in the long run (though I still don&#8217;t understand how browsers could easily obsolete their SVG 1.1 DOM code yet).  I hope to see the SVG WG hosting a DOM Summit as mentioned by shepazu.  I look forward to reading/seeing concrete examples and spec proposals from attendees there.</p>
<p>Once the SVG DOM is improved and we have interoperable implementations of SVG well-deployed around the web, then I would think about seeing what else needs to be cut in the next-next version of SVG.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/01/29/svg-2-0-wishlist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVG Marketshare: Dec 2009</title>
		<link>http://www.codedread.com/blog/archives/2010/01/26/svg-marketshare-dec-2009/</link>
		<comments>http://www.codedread.com/blog/archives/2010/01/26/svg-marketshare-dec-2009/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 13:25:53 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[SVG]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[canvas]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=616</guid>
		<description><![CDATA[[clipart]I decided to start publishing the percentage of web users who can view SVG/Canvas, starting with December 2009:  35.62%
Spreadsheet
P.S. I should mention that this figure does not take into account any user that has a SVG plugin installed or authors who have used the excellent SVG Web or ExplorerCanvas shims, so this is really [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/svg.svgz">[clipart]</object>I decided to start publishing the percentage of web users who can view SVG/Canvas, starting with December 2009:  <b>35.62%</b></p>
<p><a href="http://spreadsheets.google.com/pub?key=t5TB0_qFXcrkEndedXkKaug&#038;output=html">Spreadsheet</a></p>
<p>P.S. I should mention that this figure does not take into account any user that has a SVG plugin installed or authors who have used the excellent <a href="http://svgweb.googlecode.com/">SVG Web</a> or <a href="http://excanvas.sourceforge.net/">ExplorerCanvas</a> shims, so this is really a worst-case number.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/01/26/svg-marketshare-dec-2009/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
