<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Jaime Rodriguez  : wpfe</title><link>http://blogs.msdn.com/jaimer/archive/tags/wpfe/default.aspx</link><description>Tags: wpfe</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>using wpf/e to create interactive web charts ...</title><link>http://blogs.msdn.com/jaimer/archive/2007/01/24/using-wpf-e-to-create-interactive-web-charts.aspx</link><pubDate>Wed, 24 Jan 2007 11:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1492352</guid><dc:creator>jaimer</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/jaimer/comments/1492352.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jaimer/commentrss.aspx?PostID=1492352</wfw:commentRss><description>&lt;P&gt;First CTP of Windows Presentation Foundation Everywhere (WPF/E) was released last december,&amp;nbsp;&lt;A class="" title="Joe Stegman blogged about the goals for WPF/E v1" href="http://blogs.msdn.com/jstegman/archive/2006/11/12/why-wpf-e.aspx" target=_blank mce_href="http://blogs.msdn.com/jstegman/archive/2006/11/12/why-wpf-e.aspx"&gt;Joe Stegman blogged about the goals for WPF/E&lt;/A&gt;: &lt;EM&gt;".. leverage your existing skills and web assets to create better web experiences." &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Immediately the community created some really cool demos around media &amp;amp; content .. ( amongst my favorites are the&lt;A class="" href="http://channel9.msdn.com/playground/wpfe/ch9player/default.html" mce_href="http://channel9.msdn.com/playground/wpfe/ch9player/default.html"&gt; channeld 9 video player&lt;/A&gt; and this &lt;A class="" href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2006/12/13/9018.aspx" mce_href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2006/12/13/9018.aspx"&gt;video player&lt;/A&gt; )...&amp;nbsp; &lt;BR&gt;Of course, with my enterprise/lob bias, I went a different route.. trying to solve an old, recurring pain: creating rich, interactive graphics for data viz ...&amp;nbsp; A few people have asked about this lately, so here are some my insights from a merely a day or so playing with this before the holidays.. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Results:&lt;BR&gt;&lt;/STRONG&gt;For overall results, I do feel WPLF/E helps to create a better experience, the charts are animated, I can interact with these with out having to round trip to server, etc.... I was very happy.. &lt;BR&gt;[Disclaimer:I did not spend a lot of time creating full, or good looking charts, but here are some of the ones I created. I have others, like bar, leaving that for a later exercise with aspx integration]. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 311px; HEIGHT: 245px" height=245 src="http://jaimersamples.members.winisp.net/images/pie2.jpg" width=311 mce_src="http://jaimersamples.members.winisp.net/images/pie2.jpg"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://jaimersamples.members.winisp.net/images/line2.jpg" mce_src="http://jaimersamples.members.winisp.net/images/line2.jpg"&gt;&lt;/P&gt;
&lt;P&gt;If you have WPF/E installed you can see them live:&amp;nbsp;&lt;A class="" href="http://jaimersamples.members.winisp.net/wpfe/charts/pie.htm" mce_href="http://jaimersamples.members.winisp.net/wpfe/charts/pie.htm"&gt;pie chart&lt;/A&gt;&amp;nbsp; and &lt;A class="" href="http://jaimersamples.members.winisp.net/wpfe/charts/line.htm" mce_href="http://jaimersamples.members.winisp.net/wpfe/charts/line.htm"&gt;line chart..&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;If you parse the results w/ a technical focus, here are my impressions: &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;What does WPF/E bring to this scenario that we did not have before (with HTML)? &lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;WPF/E is cross-platform/crross browser&amp;nbsp;&amp;nbsp;&amp;nbsp; ( so improvement over VML and similar ) that I have tried) &lt;/LI&gt;
&lt;LI&gt;WPF/E is very light weight ( 1 MB download, improvement over say Java, activex, etc) &lt;/LI&gt;
&lt;LI&gt;WPF/E brings vector graphics, good mouse support, a few higher level primitives ( Rectangle, Line, etc.)...&amp;nbsp;&amp;nbsp; Because of the flexibility of Paths, you can pretty easily draw any thing in 2D.. &lt;/LI&gt;
&lt;LI&gt;WPFE also brings a great animation engine to enhance the charts w/ feedback and interactivity..&amp;nbsp; [this is usually a hard thing to code on your own]&lt;/LI&gt;
&lt;LI&gt;An unexpected surprise, was how much I liked the integration/interaction with Javascript..&amp;nbsp; being scriptable gives me a lot of flexibility to create stuff on the fly or serverside from ASP .NET or PHP ...&amp;nbsp; With WPF/E you have an open white-box for you to use. &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;[ I am not a charting expert at all, but wrote a few in my life and I always though the rendering + the animations where the hardest part; and WPF/E stacked quite well there] &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;On skills reuse&amp;nbsp; (or the WPF in WPF/E) : &lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I can leverage all my XAML skills for the charting..&amp;nbsp;&amp;nbsp; I can also reuse XAML assets ( say gradients, vector-based drawings, animations, etc.) .. This is nice, but it does not get you to single code-base between WPF and WPF/E ..&amp;nbsp;&amp;nbsp; Mike harsh, has discussed they are looking into adding more WPF features into WPF/E, amongst it CLR integration; this could increase my code reuse significantly ( guessing to 80% or higher?)...&amp;nbsp; that sounds much better, but won't get you to 100% unless you are careful and code for 'common denominator'. Today WPF/E is missing some WPF features (e.g. Styles, Resources) that you would definitely want to use if you were writing WPF, you can get around these in WPF/E by creating slightly more verbose apps,&amp;nbsp; but there is obviously a little work needed to get around it... &lt;/LI&gt;
&lt;LI&gt;The charting scenario as I scope it is great for ASPX or PHP websites that deal with data today.&amp;nbsp; You can reuse all your back-end code and easily create server-side controls that can generate enough XAML + script to get the front-end working..&amp;nbsp;&amp;nbsp;&amp;nbsp; I did not go there yet, but &lt;A class="" href="http://blogs.msdn.com/sburke/archive/2006/12/05/toolkit-extender-for-creating-wpf-e-components.aspx" mce_href="http://blogs.msdn.com/sburke/archive/2006/12/05/toolkit-extender-for-creating-wpf-e-components.aspx"&gt;Shawn Burke has a sample&lt;/A&gt; already and this is something aspx devs do all the time, so proven practice.. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;On performance/stability of the platform:&lt;BR&gt;&lt;/STRONG&gt;I must admit I did not poke into perf in depth, but so far I was impressed when I saw the shawn's video demo .. wow, these many videos playing simultaneously ... :)&amp;nbsp; &lt;BR&gt;On my line chart, I had 600 points .. I did two 'cursors' an ellipse the follows the mouse on the Left hand side, and a bar on the RHS ...the mouse is quite responsive.. &lt;BR&gt;I am one of those persons that things for pure visualization [not analysis] you can only look at a finite number of data points, so I am pretty confident WPF/E will meet perf the web chart perf requirements; if it does not, you might want to do server-side charts, as you likely have too much data]. &lt;/P&gt;
&lt;P&gt;I was also quite pleased with the platform's stability - the error handling could be better and after this post ( this time I will try to do it soon) I can put a list of the issues I ran into (both bugs and/or featurs not yet complete that can throw you for a loop )...&amp;nbsp; but over all, for being the first CTP, I thought the platform did quite well... &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Again on WPF/E.. &lt;BR&gt;&lt;/STRONG&gt;I was chatting w/ &lt;A class="" href="http://blogs.msdn.com/jcmaslan" mce_href="http://blogs.msdn.com/jcmaslan"&gt;Carter Maslan&lt;/A&gt; recently on WPF/E end-user benefits and I summarized it as "WPF/E, like AJAX, lowers the developer entry point to create better experiences and to reuse existing assets (e.g. video content) " .. I think with my brief charting experiment I was sold on that ...&amp;nbsp; I hope to see a few intranet/enterprise websites leveraging these new technology to improve their end-users visualization, decision making and producitivity ...&amp;nbsp;&amp;nbsp; Try putting these in sidebar too ... these charts work fine there in sidebar.. &lt;/P&gt;
&lt;P mce_keep="true"&gt;PS -- apologies to all my control vendor friends who write hugely complex and professional looking charts for calling the samples above charts; it is the potential that I want to communicate, not my couple of hours of bad javascript hucking; &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1492352" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jaimer/archive/tags/wpfe/default.aspx">wpfe</category></item></channel></rss>