<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Adam Kinney posts tagged with 'dojo'</title><description>Adam Kinney blog posts filtered by a specific tag</description><link>http://adamkinney.com/blog/tags/dojo/default.aspx</link><language>en-us</language><pubDate>Tue, 02 Dec 2008 23:13:43 GMT</pubDate><generator>Oxite</generator><item><title>Dojo GFX and Silverlight test</title><description>&lt;p&gt;Reading the release notes for &lt;a href="http://dojotoolkit.org/"&gt;Dojo 1.0&lt;/a&gt;, I found a line item that said &amp;quot;dojox.gfx now includes Silverlight support&amp;quot;.&lt;/p&gt;  &lt;p&gt;For those in the know this was actually added &lt;a href="http://ajaxian.com/archives/dojo-09-final-version-released"&gt;back in v0.9&lt;/a&gt;, but it was a new to me and I've been wanting to give it a test drive since I read about it.&lt;/p&gt;  &lt;p&gt;From the &lt;a href="http://dojotoolkit.org/book/dojo-book-0-9/part-3-programmatic-dijit-and-dojo/drawing-gfx"&gt;Dojo docs&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;What is dojox.gfx?      &lt;br /&gt;dojox.gfx is a cross-platform declarative interactive graphics package. It follows SVG loosely as the underlying model. At present time SVG and VML back-ends are implemented.&lt;/p&gt;    &lt;p&gt;What does it do?      &lt;br /&gt;The dojox.gfx package provides graphics rendering and manipulation. Under Firefox, Opera and Safari dojox.gfx renders the final product as SVG, under IE it renders as VML.&lt;/p&gt;    &lt;p&gt;Potentially the gfx package can allow you to create live and interactive graphing, a web based vector drawing program, view svg files in IE.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Basically you use the GFX API to create a surface and then you can add 2D shapes to that surface to render graphs, visuals or perhaps even Channel 9 guy heads.&lt;/p&gt;  &lt;p&gt;Dojo was very simple to get started with and once I read through the &lt;a href="http://docs.google.com/View?docid=d764479_1hnb2tn"&gt;GFX documentation&lt;/a&gt; I was up and running.&amp;#xA0; In order to use Silverlight as the rendering model you need to follow these steps:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Before adding the reference to the dojo.js file, set the gfxRenderer collection to enforce Silverlight as the output by adding this line:      &lt;br /&gt;&lt;code&gt;var djConfig = { gfxRenderer:&amp;quot;silverlight&amp;quot; }; &lt;/code&gt;&lt;/li&gt;    &lt;li&gt;Add a script reference to the Microsoft maintained Silverlight.js file that comes with the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=FB7900DB-4380-4B0F-BB95-0BAEC714EE17&amp;amp;displaylang=en"&gt;Silverlight 1.0 SDK&lt;/a&gt;.&amp;#xA0; Dojo uses variables within the script to validate Silverlight as an available render type. &lt;/li&gt;    &lt;li&gt;Include the gfx module as a requirement:      &lt;br /&gt;&lt;code&gt;dojo.require(&amp;quot;dojox.gfx&amp;quot;);&lt;/code&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;div style="float: right; margin-bottom: 10px; margin-left: 10px"&gt;&lt;a href="http://adamkinney.com/studios/dojoTest/"&gt;&lt;img id="id" src="http://adamkinney.com/images/blog/sl_nine9guys.jpg" /&gt;&lt;/a&gt; &lt;/div&gt;  &lt;p&gt;&lt;a href="http://adamkinney.com/studios/dojoTest/"&gt;My test application&lt;/a&gt; renders nine randomly positioned 9 Guy heads which are draggable thanks to the added dojox.gfx.move module.&amp;#xA0; &lt;a href="http://adamkinney.com/studios/dojoTest/source.zip"&gt;The source is posted&lt;/a&gt; and includes a single .htm file with references to the Dojo and Silverlight js files.&lt;/p&gt;  &lt;p&gt;Its nice to have the graphic api as a level of abstraction, but since its targeting multiple output types I'm wondering if I'll be stuck with the lowest common denominator.&amp;#xA0; The next test might be a dynamic chart, something like the &lt;a href="http://www.flickr.com/photos/jannejanne/1397327096/in/pool-483574@N20/"&gt;JellyBar&lt;/a&gt; but Dojo driven.&amp;#xA0; This should cover a few areas of investigation such as event handling, text and interactivity.&lt;/p&gt;  &lt;p&gt;Overall, Dojo looks very well done and like something I would enjoy using.&amp;#xA0; I may just have to work it into my blog code with the next update.&lt;/p&gt;&lt;img src="http://adamkinney.com/blog/284/aggviewbug/default.aspx" alt="" /&gt;</description><comments>http://adamkinney.com/blog/284/default.aspx</comments><link>http://adamkinney.com/blog/284/default.aspx</link><pubDate>Mon, 12 Nov 2007 08:58:00 GMT</pubDate><guid isPermaLink="true">http://adamkinney.com/blog/284/default.aspx</guid><dc:creator>Adam Kinney</dc:creator><slash:comments>7</slash:comments><trackback:ping>http://adamkinney.com/blog/284/trackback/default.aspx</trackback:ping><category>Channel 9</category><category>demo</category><category>Dojo</category><category>Silverlight</category></item></channel></rss>