<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.conchango.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>John Rayner's Blog</title><link>http://blogs.conchango.com/johnrayner/default.aspx</link><description>Brain.Extract&amp;lt;IBloggable&amp;gt;( Where.Author.Is( "John.Rayner" ) );</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Google Chrome: First impressions (and a few benchmarks)</title><link>http://blogs.conchango.com/johnrayner/archive/2008/09/02/google-chrome-first-impressions-and-a-few-benchmarks.aspx</link><pubDate>Tue, 02 Sep 2008 21:13:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:12424</guid><dc:creator>john.rayner</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/12424.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=12424</wfw:commentRss><description>&lt;P&gt;&lt;A class="" href="http://www.google.com/chrome" target=_blank&gt;Google Chrome&lt;/A&gt; has now been released for download - see &lt;A class="" href="http://blogs.conchango.com/derekdunlop/archive/2008/09/02/shiny-and-new-must-be-chrome-google-launches-new-browser-in-24hrs.aspx" target=_blank&gt;Derek's post&lt;/A&gt; for some opinion on this or the &lt;A class="" href="http://googleblog.blogspot.com/2008/09/fresh-take-on-browser.html" target=_blank&gt;"leaked"&lt;/A&gt; &lt;A class="" href="http://www.google.com/googlebooks/chrome/index.html" target=_blank&gt;information from Google&lt;/A&gt;.&amp;nbsp; I've installed it and I have to say that I like it a lot - the minimalist UI is rather nice (although IE7 has drifted in a similar direction), the "omnibox" (was previously the address bar) seems to actually work in terms of how it handles it's auto completion and the initial start page is a great idea.&amp;nbsp; But the thing that really got to me was just how fast it is.&amp;nbsp; And I mean ...&lt;/P&gt;
&lt;P&gt;&lt;IMG title=FAST style="WIDTH:440px;HEIGHT:110px;" height=110 alt=FAST hspace=15 src="http://blogs.conchango.com/photos/conchango_bloggers/images/12423/original.aspx" width=440&gt;&lt;/P&gt;
&lt;P&gt;There's lots of numbers below where I try to measure just how fast Google Chrome is compared to IE 7, but what really impressed me was when my wife (who is non-techie) browsed a few sites using Chrome&amp;nbsp;and noticed the difference in speed.&lt;/P&gt;
&lt;P&gt;To see just how real the speed increase was, I visited a number of benchmarking sites.&amp;nbsp; &lt;A class="" href="http://www.quirksmode.org/" target=_blank&gt;QuirksMode&lt;/A&gt; have a &lt;A class="" href="http://www.quirksmode.org/dom/innerhtml.html" target=_blank&gt;benchmark for creating HTML table elements&lt;/A&gt; via JavaScript.&amp;nbsp; As the following table outlines, IE 7 took 4,652 ms to complete all the tests and Google Chrome took 186 ms.&amp;nbsp; That's literally an order of magnitude faster.&lt;/P&gt;
&lt;P&gt;&lt;IMG style="WIDTH:358px;HEIGHT:259px;" height=259 src="http://blogs.conchango.com/photos/conchango_bloggers/images/12420/original.aspx" width=358&gt;&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://celtickane.com/index.php" target=_blank&gt;Celtic Kane&lt;/A&gt; has a benchmark which attempts to &lt;A class="" href="http://celtickane.com/webdesign/jsspeed.php" target=_blank&gt;measure the core JavaScript engine&lt;/A&gt;.&amp;nbsp; Again, Google Chrome is literally an order of magnitude faster than IE 7 and&amp;nbsp;it looks to me as if Chrome would probably come top of his &lt;A class="" href="http://celtickane.com/webdesign/jsspeedarchive.php" target=_blank&gt;overall performance table&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;IMG style="WIDTH:442px;HEIGHT:224px;" height=224 src="http://blogs.conchango.com/photos/conchango_bloggers/images/12421/original.aspx" width=442&gt;&lt;/P&gt;
&lt;P&gt;As a final test, I loaded up the &lt;A class="" href="http://www2.webkit.org/perf/sunspider-0.9/sunspider.html" target=_blank&gt;SunSpider test&lt;/A&gt; from &lt;A class="" href="http://webkit.org/" target=_blank&gt;WebKit&lt;/A&gt;&amp;nbsp;- this is a test which purports to target real-world usage and avoid "useless" micro-benchmarks.&amp;nbsp; I expected Chrome to do well against this, since Google say that Webkit forms a big part of the Chrome browser, but Chrome managed to beat my already high expectations.&amp;nbsp; It came in 16.9 times faster than IE 7 and some of the differences were simply staggering.&lt;/P&gt;
&lt;P&gt;&lt;IMG style="WIDTH:670px;HEIGHT:937px;" height=937 src="http://blogs.conchango.com/photos/conchango_bloggers/images/12419/original.aspx" width=670&gt;&lt;/P&gt;
&lt;P&gt;Overall, this is quite an amazing first drop of code and I didn't have a single crash or notice any rendering errors.&amp;nbsp; I'll leave others to speculate on exactly what this means for Microsoft's Internet Explorer, but I think it's fair to say that Google have raised the standard of what to expect from a browser quite considerably.&lt;/P&gt;
&lt;P&gt;[EDIT: &lt;A class="" href="http://blogs.conchango.com/rorystreet/default.aspx" target=_blank&gt;Rory&lt;/A&gt; has also &lt;A class="" href="http://blogs.conchango.com/rorystreet/archive/2008/09/02/my-first-look-at-google-chrome.aspx" target=_blank&gt;posted about Google Chrome&lt;/A&gt;.&amp;nbsp; The interesting thing is that he also includes some numbers about memory usage.]&lt;/P&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=12424" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Google+Chrome/default.aspx">Google Chrome</category></item><item><title>ReSharper 4.0 from JetBrains is released</title><link>http://blogs.conchango.com/johnrayner/archive/2008/06/09/resharper-4-0-from-jetbrains-is-released.aspx</link><pubDate>Mon, 09 Jun 2008 22:17:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11405</guid><dc:creator>john.rayner</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/11405.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=11405</wfw:commentRss><description>&lt;P&gt;The &lt;A class="" href="http://blogs.conchango.com/controlpanel/blogs/httP;/www.jetbrains.com" target=_blank&gt;JetBrains&lt;/A&gt; team have been working hard at getting functionality and bug fixes into version 4.0 of ReSharper.&amp;nbsp; I'm very excited to see that it's finally reached RTM status and now fully supports Visual Studio 2008 and all the C# 3.0 goodness!&amp;nbsp; &lt;A class="" href="http://www.jetbrains.com/resharper/download/index.html" target=_blank&gt;Go get it here&lt;/A&gt;.&amp;nbsp; For those who have been involved in the &lt;A class="" href="http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+4.0+Nightly+Builds" target=_blank&gt;EAP program&lt;/A&gt;, it's actually build 819.&lt;/P&gt;
&lt;P&gt;For those who've never tried R#, I strongly suggest that you take it for a spin.&amp;nbsp; The improvements it brings to productivity are just immense.&amp;nbsp; For the full list of features the JetBrains site &lt;A class="" href="http://www.jetbrains.com/resharper/features/index.html" target=_blank&gt;has all the info&lt;/A&gt;, but here are a couple of my favourite features:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Go To File / Member&lt;IMG title="Go To File / Type / Member" style="WIDTH:656px;HEIGHT:374px;" height=374 alt="Go To File / Type / Member" src="http://blogs.conchango.com/photos/conchango_bloggers/images/11406/original.aspx" width=656 align=right&gt;&lt;/STRONG&gt;&lt;BR&gt;This functionality is brilliant at quickly navigating around large solutions.&amp;nbsp; You can type in the full name of the class / method / file that you are after, just the capital letters, you can use wildcards or you can combine all these techniques.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Refactoring Options&lt;/STRONG&gt;&lt;BR&gt;Yes I know that Visual Studio has included some refactoring functionality for a while now, but this one of ReSharper primary strengths.&amp;nbsp; It includes options such as:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;Rename class / method / variable / parameter / field / property (optionally searches within comments and strings)&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Change signature&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Extract / inline a method&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Extract interface / superclass&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Push members up / pull members down&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Introduce parameter&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Introduce field&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Introduce variable (I esp like the way it detects multiple occurrences of an expression of offers to replace them all)&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;Convert anonymous delegates to / from lamdas&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Set field values from constructor arguments&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;There's so many of these - these are just the ones I can think of right now.&amp;nbsp; In fact, there are so many that I always keep a copy of the &lt;A class="" href="http://www.jetbrains.com/resharper/docs/ReSharper40DefaultKeymap.pdf" target=_blank&gt;ReSharper keyboard mappings&lt;/A&gt; on my desk.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Coding in Reverse&lt;/STRONG&gt;&lt;BR&gt;Undoutebdly the most powerful feature available within ReSharper, JetBrains picked it out as &lt;A class="" href="http://resharper.blogspot.com/2007/05/jedi-way-coding-in-reverse.html" target=_blank&gt;the primary skill of the ReSharper Jedi&lt;/A&gt;.&amp;nbsp; This is a technique where you use variables / methods / classes &lt;STRONG&gt;&lt;EM&gt;before they exist&lt;/EM&gt;&lt;/STRONG&gt;.&amp;nbsp; ReSharper will then infer their definition from your usage and allow you to actualize them with a couple of keystrokes.&amp;nbsp; It's immensely powerful, but it's really &lt;A class="" href="http://www.jetbrains.com/resharper/documentation/presentation/codingSession/CodingSession.wmv" target=_blank&gt;got to be seen to be fully appreciated&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;And More&lt;BR&gt;&lt;/STRONG&gt;I strongly ReSharper to all developers who want to improve their productivity ... which should be all developers.&amp;nbsp; I also strongly suggest that you take some time out to learn the featureset and some of the options available within ReSharper.&amp;nbsp; &lt;A class="" href="http://blog.excastle.com/" target=_blank&gt;Joe White's&lt;/A&gt; blog series &lt;A class="" href="http://blog.excastle.com/2007/01/31/blog-event-the-31-days-of-resharper" target=_blank&gt;The 31 Days of ReSharper&lt;/A&gt; is a great place to start this journey.&amp;nbsp; Just be warned that you &lt;A class="" href="http://closed-loop.blogspot.com/2007/08/resharper-to-next-level.html" target=_blank&gt;might&lt;/A&gt; &lt;A class="" href="http://www.peterprovost.org/archive/2005/03/31/3108.aspx" target=_blank&gt;get&lt;/A&gt;&amp;nbsp;&lt;A class="" href="http://www.ayende.com/Blog/archive/2006/03/25/7770.aspx" target=_blank&gt;seriously&lt;/A&gt; &lt;A class="" href="http://andrewconnell.com/blog/archive/2005/03/25/1042.aspx" target=_blank&gt;hooked&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11405" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Development+practices/default.aspx">Development practices</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Engineering+practices/default.aspx">Engineering practices</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/.Net/default.aspx">.Net</category></item><item><title>Design-time perf improvements in Visual Studio 2008</title><link>http://blogs.conchango.com/johnrayner/archive/2008/01/28/Design_2D00_time-perf-improvements-in-Visual-Studio-2008.aspx</link><pubDate>Mon, 28 Jan 2008 16:00:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:9589</guid><dc:creator>john.rayner</dc:creator><slash:comments>12</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/9589.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=9589</wfw:commentRss><description>&lt;p&gt;Some metrics that we captured on my project: (I think the numbers speak for themselves)&lt;/p&gt;&lt;p&gt;&lt;table border="0" cellpadding="0" cellspacing="0" style="width:350pt;border-collapse:collapse;" width="465"&gt;&lt;tbody&gt;&lt;tr style="height:15pt;"&gt;&lt;td class="xl65" style="border-right:#f0f0f0;border-top:black 0.5pt solid;font-weight:700;font-size:10pt;border-left:#f0f0f0;width:142pt;color:black;border-bottom:black 0.5pt solid;font-family:Arial;height:15pt;background-color:transparent;text-decoration:none;text-underline-style:none;text-line-through:none;"&gt;Operation&lt;/td&gt;&lt;td class="xl69" style="border-right:#f0f0f0;border-top:black 0.5pt solid;font-weight:700;font-size:10pt;border-left:#f0f0f0;width:52pt;color:black;border-bottom:black 0.5pt solid;font-family:Arial;background-color:transparent;text-decoration:none;text-underline-style:none;text-line-through:none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VS 2005&lt;/td&gt;&lt;td class="xl69" style="border-right:#f0f0f0;border-top:black 0.5pt solid;font-weight:700;font-size:10pt;border-left:#f0f0f0;width:52pt;color:black;border-bottom:black 0.5pt solid;font-family:Arial;background-color:transparent;text-decoration:none;text-underline-style:none;text-line-through:none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VS 2008&lt;/td&gt;&lt;td class="xl69" style="border-right:#f0f0f0;border-top:black 0.5pt solid;font-weight:700;font-size:10pt;border-left:#f0f0f0;width:104pt;color:black;border-bottom:black 0.5pt solid;font-family:Arial;background-color:transparent;text-decoration:none;text-underline-style:none;text-line-through:none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&amp;nbsp;Improvement&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:15pt;"&gt;&lt;td class="xl66" style="font-weight:400;font-size:10pt;background:#d8d8d8;color:black;font-family:Arial;height:15pt;text-decoration:none;text-underline-style:none;text-line-through:none;border:#f0f0f0;"&gt;Start the IDE&lt;/td&gt;&lt;td align="right" class="xl67" style="font-weight:400;font-size:10pt;background:#d8d8d8;color:black;font-family:Arial;text-decoration:none;text-underline-style:none;text-line-through:none;border:#f0f0f0;"&gt;00:30&lt;/td&gt;&lt;td align="right" class="xl67" style="font-weight:400;font-size:10pt;background:#d8d8d8;color:black;font-family:Arial;text-decoration:none;text-underline-style:none;text-line-through:none;border:#f0f0f0;"&gt;00:09&lt;/td&gt;&lt;td align="right" class="xl68" style="font-weight:400;font-size:10pt;background:#d8d8d8;color:black;font-family:Arial;text-decoration:none;text-underline-style:none;text-line-through:none;border:#f0f0f0;"&gt;70%&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:15pt;"&gt;&lt;td class="xl66" style="height:15pt;background-color:transparent;border:#f0f0f0;"&gt;Load solution&lt;/td&gt;&lt;td align="right" class="xl67" style="background-color:transparent;border:#f0f0f0;"&gt;03:45&lt;/td&gt;&lt;td align="right" class="xl67" style="background-color:transparent;border:#f0f0f0;"&gt;00:45&lt;/td&gt;&lt;td align="right" class="xl68" style="background-color:transparent;border:#f0f0f0;"&gt;80%&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:15pt;"&gt;&lt;td class="xl66" style="font-weight:400;font-size:10pt;background:#d8d8d8;color:black;font-family:Arial;height:15pt;text-decoration:none;text-underline-style:none;text-line-through:none;border:#f0f0f0;"&gt;Get Latest (no changes)&lt;/td&gt;&lt;td align="right" class="xl67" style="font-weight:400;font-size:10pt;background:#d8d8d8;color:black;font-family:Arial;text-decoration:none;text-underline-style:none;text-line-through:none;border:#f0f0f0;"&gt;00:13&lt;/td&gt;&lt;td align="right" class="xl67" style="font-weight:400;font-size:10pt;background:#d8d8d8;color:black;font-family:Arial;text-decoration:none;text-underline-style:none;text-line-through:none;border:#f0f0f0;"&gt;00:05&lt;/td&gt;&lt;td align="right" class="xl68" style="font-weight:400;font-size:10pt;background:#d8d8d8;color:black;font-family:Arial;text-decoration:none;text-underline-style:none;text-line-through:none;border:#f0f0f0;"&gt;62%&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:15pt;"&gt;&lt;td class="xl66" style="height:15pt;background-color:transparent;border:#f0f0f0;"&gt;Rebuild solution&lt;/td&gt;&lt;td align="right" class="xl67" style="background-color:transparent;border:#f0f0f0;"&gt;02:21&lt;/td&gt;&lt;td align="right" class="xl67" style="background-color:transparent;border:#f0f0f0;"&gt;01:58&lt;/td&gt;&lt;td align="right" class="xl68" style="background-color:transparent;border:#f0f0f0;"&gt;16%&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:15pt;"&gt;&lt;td class="xl66" style="font-weight:400;font-size:10pt;background:#d8d8d8;color:black;font-family:Arial;height:15pt;text-decoration:none;text-underline-style:none;text-line-through:none;border:#f0f0f0;"&gt;Run all tests&lt;/td&gt;&lt;td align="right" class="xl67" style="font-weight:400;font-size:10pt;background:#d8d8d8;color:black;font-family:Arial;text-decoration:none;text-underline-style:none;text-line-through:none;border:#f0f0f0;"&gt;05:29&lt;/td&gt;&lt;td align="right" class="xl67" style="font-weight:400;font-size:10pt;background:#d8d8d8;color:black;font-family:Arial;text-decoration:none;text-underline-style:none;text-line-through:none;border:#f0f0f0;"&gt;03:44&lt;/td&gt;&lt;td align="right" class="xl68" style="font-weight:400;font-size:10pt;background:#d8d8d8;color:black;font-family:Arial;text-decoration:none;text-underline-style:none;text-line-through:none;border:#f0f0f0;"&gt;32%&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:15pt;"&gt;&lt;td class="xl66" style="border-right:#f0f0f0;border-top:#f0f0f0;font-weight:400;font-size:10pt;border-left:#f0f0f0;color:black;border-bottom:black 0.5pt solid;font-family:Arial;height:15pt;background-color:transparent;text-decoration:none;text-underline-style:none;text-line-through:none;"&gt;Start the application&lt;/td&gt;&lt;td align="right" class="xl67" style="border-right:#f0f0f0;border-top:#f0f0f0;font-weight:400;font-size:10pt;border-left:#f0f0f0;color:black;border-bottom:black 0.5pt solid;font-family:Arial;background-color:transparent;text-decoration:none;text-underline-style:none;text-line-through:none;"&gt;00:19&lt;/td&gt;&lt;td align="right" class="xl67" style="border-right:#f0f0f0;border-top:#f0f0f0;font-weight:400;font-size:10pt;border-left:#f0f0f0;color:black;border-bottom:black 0.5pt solid;font-family:Arial;background-color:transparent;text-decoration:none;text-underline-style:none;text-line-through:none;"&gt;00:18&lt;/td&gt;&lt;td align="right" class="xl68" style="border-right:#f0f0f0;border-top:#f0f0f0;font-weight:400;font-size:10pt;border-left:#f0f0f0;color:black;border-bottom:black 0.5pt solid;font-family:Arial;background-color:transparent;text-decoration:none;text-underline-style:none;text-line-through:none;"&gt;5%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;FYI our solution has 33 projects in it (including a database project, a web&amp;nbsp;application project, numerous DLLs, an EXE and a WiX installer) and there are almost 1,600 unit and integration tests.&lt;/p&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=9589" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Development+practices/default.aspx">Development practices</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Engineering+practices/default.aspx">Engineering practices</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>Altnetconf UK: First round of registration is closed</title><link>http://blogs.conchango.com/johnrayner/archive/2008/01/03/Altnetconf-UK_3A00_-First-round-of-registration-is-closed.aspx</link><pubDate>Thu, 03 Jan 2008 22:20:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:9415</guid><dc:creator>john.rayner</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/9415.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=9415</wfw:commentRss><description>Registration to the first &lt;a href="http://www.altnetpedia.com/" target="_blank"&gt;ALT.Net&lt;/a&gt; UK conference was recently &lt;a href="http://blogs.conchango.com/michelleflynn/archive/2008/01/02/Conchango-hosts-Alt.Net.UK-Conference.aspx" target="_blank"&gt;announced by Michelle&lt;/a&gt;.&amp;nbsp; Unfortunately it&amp;#39;s already full, so if you&amp;#39;re name isn&amp;#39;t on &lt;a href="http://www.altnetuk.com/Participants.aspx" target="_blank"&gt;the participants list&lt;/a&gt; of people who have registered then I&amp;#39;m afraid you&amp;#39;re a bit late for this round.&amp;nbsp; Ian Cooper says that &lt;a href="http://codebetter.com/blogs/ian_cooper/archive/2008/01/03/altnetconf-uk-first-release-of-tickets-sold-out.aspx" target="_blank"&gt;another batch of registrations will&amp;nbsp;open soon&lt;/a&gt;, so those who watch closely may still be able to attend.&amp;nbsp; I&amp;#39;m pleased to announce that I will be attending the conference as a Conchango representative.&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=9415" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/johnrayner/archive/tags/ALT.Net/default.aspx">ALT.Net</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/altnetconf/default.aspx">altnetconf</category></item><item><title>Exploring quality in software architecture</title><link>http://blogs.conchango.com/johnrayner/archive/2007/10/19/Exploring-quality-in-software-architecture.aspx</link><pubDate>Thu, 18 Oct 2007 23:39:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:8821</guid><dc:creator>john.rayner</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/8821.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=8821</wfw:commentRss><description>&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Strength, utility and beauty.&lt;span&gt;&amp;nbsp; &lt;/span&gt;Here we will be exploring a number of the traditional &amp;ldquo;ilities&amp;rdquo; of software architecture and seeing how they can be related to these three architectural qualities.&amp;nbsp; &lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;These three qualities have been around for quite a while, under their Latin names of firmitas, utilitas and venustas, and were first written about by &lt;a href="http://en.wikipedia.org/wiki/Vitruvius" target="_blank"&gt;Vitruvius&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Now architecture is always created with the intention of supporting something, e.g. an application (in the case of application architecture) or a business (in the case of enterprise architecture).&lt;span&gt;&amp;nbsp; &lt;/span&gt;For brevity, I&amp;rsquo;ll refer to &amp;ldquo;the thing which the architecture supports&amp;rdquo; as &amp;ldquo;the system&amp;rdquo;, although I believe that my points here relate to all types of software architecture.&lt;/span&gt;&lt;/p&gt;&lt;strong&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="line-height:115%;font-family:'Arial','sans-serif';"&gt;Utilitas, or Utility: Functional and &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="line-height:115%;font-family:'Arial','sans-serif';"&gt;behavioural&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="line-height:115%;font-family:'Arial','sans-serif';"&gt; &lt;span&gt;aspects of the architecture&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;/span&gt;&lt;/strong&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;The architecture needs to guarantee that the system can perform operations in a certain manner.&amp;nbsp; Architectural aspects which achieve this are:&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;&lt;p class="MsoListParagraphCxSpFirst" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Availability &amp;ndash; &lt;em&gt;expected&lt;/em&gt; &lt;em&gt;levels of uptime that the architecture can provide&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Auditability &amp;ndash; &lt;em&gt;keeping a log of changes and operations within the system.&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Correctness and verifiability &amp;ndash; &lt;em&gt;sometimes operations within the system can be externally verified.&lt;span&gt;&amp;nbsp; &lt;/span&gt;The architecture needs to support and pass such verification.&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Environmental compatibility &amp;ndash; &lt;em&gt;the architecture needs to fit into its environment, e.g. there may be a high latency network which needs to be considered&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Performance &amp;ndash; &lt;em&gt;how quickly operations can be performed&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Security and confidentiality &amp;ndash; &lt;em&gt;authentication and &lt;/em&gt;&lt;/span&gt;&lt;em&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;authorisation&lt;/span&gt;&lt;/em&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpLast" style="margin:0cm 0cm 10pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Transactionality &amp;ndash; &lt;em&gt;the architecture needs to ensure that operations are atomic&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;A person can only really be called an architect if they can design an architecture that works, i.e. displays these aspects.&lt;/span&gt;&lt;/p&gt;&lt;strong&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;strong&gt;&lt;span style="line-height:115%;font-family:'Arial','sans-serif';"&gt;&lt;font size="3"&gt;Firmitas, or Strength: Non-functional aspects of the architecture&lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/span&gt;&lt;/strong&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;In addition to supporting the operations of the system, there are a number of further considerations for architecture:&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpFirst" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Adaptability &amp;ndash; &lt;em&gt;how well the architecture can cope to evolving situations without being changed&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Efficiency &amp;ndash; &lt;em&gt;how well does the architecture use its resources such as CPU, memory, bandwidth, etc&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Extensibility &amp;ndash; &lt;em&gt;how easily can the architecture be extended and changed&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Maintainability &amp;ndash; &lt;em&gt;this is really just a combination of extensibility and understandability.&lt;span&gt;&amp;nbsp; &lt;/span&gt;If an architecture is easy to understand and easy to change, then it is easy to maintain.&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Recoverability &amp;ndash; &lt;em&gt;is it possible to reconstitute the state of the system after a disaster&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Reliability &amp;ndash; &lt;em&gt;how stable is the architecture under normal circumstances&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Resiliance &amp;ndash; &lt;em&gt;how stable is the architecture under abnormal circumstances&lt;/em&gt; &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Scalability &amp;ndash; &lt;em&gt;can the throughput of the system be increased without requiring changes&lt;/em&gt; &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpLast" style="margin:0cm 0cm 10pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Understandability &amp;ndash; &lt;em&gt;how easy is it to comprehend the architecture&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Really good architects manage to incorporate these aspects into architecture they design.&lt;/span&gt;&lt;/p&gt;&lt;strong&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;strong&gt;&lt;span style="line-height:115%;font-family:'Arial','sans-serif';"&gt;&lt;font size="3"&gt;Venustas, or Beauty: Aesthetic aspects of the architecture&lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/span&gt;&lt;/strong&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Beauty, as a quality, is practically impossible to define objectively.&lt;span&gt;&amp;nbsp; &lt;/span&gt;&amp;ldquo;Beauty is in the eye of the beholder&amp;rdquo;, as the saying goes.&lt;span&gt;&amp;nbsp; &lt;/span&gt;However, you do know beauty when you see it.&lt;span&gt;&amp;nbsp; &lt;/span&gt;Here are some points which I think contribute to making architecture beautiful:&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpFirst" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Conceptual integrity &amp;ndash; &lt;em&gt;sometimes called the principle of least surprise, there should be an underlying theme or vision that unifies the design of the architecture at all levels&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0cm 0cm 0pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Elegance &amp;ndash; &lt;em&gt;closely related to simplicity, elegance implies a certain understated effortlessness&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpLast" style="margin:0cm 0cm 10pt 36pt;text-indent:-18pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:Symbol;"&gt;&lt;span&gt;&amp;middot;&lt;span style="font:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;Simplicity &amp;ndash; &lt;em&gt;an architecture should be as simple as possible, but not simplistic&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;An architect that can incorporate these aspects into a design that also displays utility and strength, is really one of the greats.&lt;/span&gt;&lt;/p&gt;&lt;strong&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;strong&gt;&lt;span style="line-height:115%;font-family:'Arial','sans-serif';"&gt;&lt;font size="3"&gt;And so what?&lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/span&gt;&lt;/strong&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;And so we have a bit of a framework for inspecting the quality of architecture.&lt;span&gt;&amp;nbsp; &lt;/span&gt;I don&amp;rsquo;t regard all of these aspects as quantitative, but at least we can discuss architecture in qualitative terms.&amp;nbsp; &lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Arial','sans-serif';"&gt;In my next post, I&amp;rsquo;ll be discussing some of the specific considerations of&amp;nbsp;iterative development of software and how these points here should influence that process.&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=8821" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Technical+Architect+Role/default.aspx">Technical Architect Role</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Architecture/default.aspx">Architecture</category></item><item><title>What makes a good (software) architecture</title><link>http://blogs.conchango.com/johnrayner/archive/2007/09/11/What-makes-a-good-_2800_software_2900_-architecture.aspx</link><pubDate>Tue, 11 Sep 2007 22:30:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:8434</guid><dc:creator>john.rayner</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/8434.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=8434</wfw:commentRss><description>&lt;p&gt;Lately I&amp;#39;ve been investigating software architecture with regard to how it can impact on an agile development project.&amp;nbsp;I recently&amp;nbsp;read&amp;nbsp;(&lt;a href="http://softwarecreation.org/2007/do-we-need-software-architects-10-reasons-why-not/" title="Do we need software architects? 10 reasons why not." target="_blank"&gt;here&lt;/a&gt;) a&amp;nbsp;very short list that resonated really powerfully with me and describes key architectural virtues (explanations are mine):&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Strength&lt;/strong&gt; - reliable, secure, resilient to change&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Utility&lt;/strong&gt; - must deliver&amp;nbsp;either business value or (more likely) developer&amp;nbsp;productivity&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Beauty&lt;/strong&gt; - easy to understand and communicate, clean design, minimal&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;It turns out that these ideas &lt;a href="http://en.wikipedia.org/wiki/Vitruvius" title="Vitruvius, an architect in the Roman Empire" target="_blank"&gt;have been around for quite a while&lt;/a&gt;, under their Latin names of &lt;em&gt;firmitas&lt;/em&gt;, &lt;em&gt;utilitas&lt;/em&gt; and &lt;em&gt;venustas&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;I hope to produce a series of blog posts detailing my thoughts and expanding on some of these points, including why I think this question is especially relevant to iterative development.&lt;/p&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=8434" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Technical+Architect+Role/default.aspx">Technical Architect Role</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Architecture/default.aspx">Architecture</category></item><item><title>SAPI: Speech synthesis on Vista</title><link>http://blogs.conchango.com/johnrayner/archive/2007/05/10/SAPI_3A00_-Speech-synthesis-on-Vista.aspx</link><pubDate>Thu, 10 May 2007 00:11:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:6933</guid><dc:creator>john.rayner</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/6933.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=6933</wfw:commentRss><description>&lt;p&gt;The &lt;a href="http://www.visitmix.com/" target="_blank"&gt;MIX07 Keynote&lt;/a&gt; includes a brief screen&amp;nbsp;capture&amp;nbsp;from the &lt;a href="http://blogs.conchango.com/ciaranhanway/archive/2007/02/21/Conchango_2C00_-Daily-Mail-and-Vista.aspx" target="_blank"&gt;Daily Mail eReader&lt;/a&gt;&amp;nbsp;and reminded me that I had meant to blog about the speech synthesis portion of the app.&amp;nbsp; It&amp;#39;s something which many users might not have seen, because it&amp;#39;s only available on Windows Vista.&amp;nbsp; Vista includes the&amp;nbsp;Speech API (SAPI) version 5.3 which provides a text-to-speech (TTS) engine which is greatly superior to SAPI 5.2 which shipped with Windows XP.&lt;/p&gt;&lt;p&gt;&lt;img align="right" alt="Speak the News with the Daily Mail eReader" height="412" hspace="20" src="http://blogs.conchango.com/photos/conchango_bloggers/images/6932/original.aspx" style="width:309px;height:412px;" title="Speak the News with the Daily Mail eReader" width="309" /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;How it looks&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The way the UI works is pretty straightforward - it&amp;#39;s meant to mimic an autocue.&amp;nbsp; So a user will trigger the functionality and the window you see on the right will appear.&amp;nbsp; As the user&amp;#39;s computer begins speaking the news story, the text will slowly scroll up.&amp;nbsp; The word currently being spoken will always be bold and will always appear in the letterbox.&lt;/p&gt;&lt;p&gt;I&amp;#39;m presonally a bit tickled that this bit of UI made it into Ray Ozzie&amp;#39;s keynote presentation (even if it was only for about a quarter of a second) because I developed this part of the eReader and wrote this UI.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Getting SAPI to produce speech&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The TTS functionality is actually quite easy to kick off.&amp;nbsp; All it takes is a call to the appropriate function, passing in a string holding the text to be read, and SAPI will begin to speak.&amp;nbsp; Specifically, .Net 3.0&amp;nbsp;provides a System.Speech assembly which does all the hard work for you.&amp;nbsp; This assembly includes the class &lt;font face="Courier New,serif"&gt;System.Speech.Synthesis.&lt;span style="color:teal;"&gt;SpeechSynthesizer&lt;/span&gt;&lt;/font&gt; which has a method &lt;font face="Courier New,serif"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;font size="2"&gt; Speak(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; textToSpeak)&lt;/font&gt;&lt;/font&gt;.&amp;nbsp; This is easy to use if all you want is text-to-speech.&lt;/p&gt;&lt;p&gt;The problem is that this is a synchronous call.&amp;nbsp; So the call will block until the speech rendering is complete.&amp;nbsp; To get around this, the &lt;span style="color:teal;"&gt;&lt;font face="Courier New"&gt;SpeechSynthesizer&lt;/font&gt;&lt;/span&gt; class also includes a method &lt;font face="Courier New"&gt;SpeakAsync&lt;/font&gt;.&amp;nbsp; This does pretty much what you&amp;#39;d expect and runs the TTS activity on a background thread.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Getting updated with TTS progress&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Now the &lt;span style="color:teal;"&gt;&lt;font face="Courier New"&gt;SpeechSynthesizer&lt;/font&gt;&lt;/span&gt; class even provides &lt;a href="http://msdn2.microsoft.com/en-us/library/system.speech.synthesis.speechsynthesizer_events.aspx" target="_blank"&gt;some helpful events&lt;/a&gt; relating to the progress of the speech rendering.&amp;nbsp; However, it turns out that the SAPI libraries regard these events as sort of incidental to their main job - i.e. they will raise the events when they can.&amp;nbsp; So there is every possibility that these events will occur some time after the actual speech rendering of a word (or phoneme, etc) has started.&amp;nbsp; The SAPI library also seems to stop raising the events altogether, if the event handlers are consuming too much time.&amp;nbsp; This was probably a design decision made by Microsoft that the quality of the speech shouldn&amp;#39;t be affected by calls to user code.&lt;/p&gt;&lt;p&gt;This last point means that you need to be very careful how you write your event handlers.&amp;nbsp; I suspect that a fair amount of time is consumed with the transition from the unmanaged SAPI libraries back into the System.Speech assembly, which doesn&amp;#39;t leave much time for your C# code to do anything useful.&amp;nbsp; It certainly doesn&amp;#39;t leave enough time to update a XAML UI.&amp;nbsp; The initial approach I used would update the UI with about 2 or 3 words and then UI updating would cease altogether.&lt;/p&gt;&lt;p&gt;The solution was (a) to be very, very careful to write efficient code; (b) use the Output window for debug info rather than trying to break into the running code; and (c) make good use of asynchronous delegates.&amp;nbsp; The SAPI events are called on a background thread, which means that a &lt;font face="Courier New"&gt;Dispatcher.Invoke&lt;/font&gt; call is needed before code can update the UI at all.&amp;nbsp; So the simplest solution was to replace this with a &lt;font face="Courier New"&gt;Dispatcher.BeginInvoke&lt;/font&gt; call which then updated the UI asynchronously to the event handler.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Constructing the UI&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;It took a little bit of trial and error to get a XAML UI that could efficiently update without continually doing a lot of layout work.&amp;nbsp; Ironically, the grey letterbox with its opacity and the opacity gradient of the textual content were the easy bits!&amp;nbsp; And getting a thick window border of Vista glass was also pretty trivial.&amp;nbsp;The part which took some effort was working out that to display the content I needed to use a &lt;font face="Courier New"&gt;ScrollViewer&lt;/font&gt; control with three separate &lt;font face="Courier New"&gt;Run&lt;/font&gt; elements - one for the text which had been read, one for the text being read and one for the text which is still to be read.&amp;nbsp; The updates from the TTS engine can then simply be translated into shuffling characters between the various &lt;font face="Courier New"&gt;Run&lt;/font&gt; elements.&lt;/p&gt;&lt;p&gt;Getting the highlighted word to stay in the letterbox also took some trial and error.&amp;nbsp; The solution lay in the following line of code:&lt;/p&gt;&lt;div style="font-size:10pt;background:white;color:black;font-family:Courier New;"&gt;&lt;p style="margin:0px;"&gt;&lt;span style="color:teal;"&gt;Rect&lt;/span&gt; screenPosition = CurrentlyReadingRun.ContentStart.GetCharacterRect(&lt;span style="color:teal;"&gt;LogicalDirection&lt;/span&gt;.Forward);&lt;/p&gt;&lt;/div&gt;&lt;p&gt;This gave me&amp;nbsp;the screen co-ordinates of the currently bold word, which I then used like so:&lt;/p&gt;&lt;div style="font-size:10pt;background:white;color:black;font-family:Courier New;"&gt;&lt;p style="margin:0px;"&gt;_scrollViewer.ScrollToVerticalOffset(screenPosition.Top + _scrollViewer.VerticalOffset - _paddingHeight);&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=6933" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/johnrayner/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/SAPI/default.aspx">SAPI</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Vista/default.aspx">Vista</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/TTS/default.aspx">TTS</category></item><item><title>MOSS: Error "The handle is invalid" when starting Windows SharePoint Services (WSS) Search service</title><link>http://blogs.conchango.com/johnrayner/archive/2007/02/16/MOSS_3A00_-Error-_2200_The-handle-is-invalid_2200_-when-starting-Windows-SharePoint-Services-_2800_WSS_2900_-Search-service.aspx</link><pubDate>Fri, 16 Feb 2007 09:22:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:5999</guid><dc:creator>john.rayner</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/5999.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=5999</wfw:commentRss><description>&lt;p&gt;If you attempt to start Windows SharePoint Services Search service and receive the following message:&lt;/p&gt;&lt;p align="center"&gt;&lt;img alt="Could not start the Windows SharePoint Services Search service on Local Computer. Error 6: The handle is invalid" height="125" src="http://blogs.conchango.com/photos/conchango_bloggers/images/5998/original.aspx" style="width:478px;height:125px;" title="Could not start the Windows SharePoint Services Search service on Local Computer. Error 6: The handle is invalid" width="478" /&gt;&lt;/p&gt;&lt;p&gt;Try modifying the Log On Identity of the service.&amp;nbsp; In my case, it was setup to log on&amp;nbsp;as &amp;quot;Local Service&amp;quot;.&amp;nbsp; After I changed this to &amp;quot;Local System&amp;quot;, the service started without any errors.&lt;/p&gt;&lt;p&gt;Note that this error message was received from the Services Administrative Tool.&amp;nbsp; The WSS web front-end simply hung when attempting to start the WSS Search service.&lt;/p&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=5999" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/johnrayner/archive/tags/MOSS/default.aspx">MOSS</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/WSS3/default.aspx">WSS3</category></item><item><title>TFS: Automating unit tests as part of the Team Build</title><link>http://blogs.conchango.com/johnrayner/archive/2007/02/13/TFS_3A00_-Automating-unit-tests-as-part-of-the-Team-Build.aspx</link><pubDate>Tue, 13 Feb 2007 15:42:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:5953</guid><dc:creator>john.rayner</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/5953.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=5953</wfw:commentRss><description>&lt;p&gt;In my new project, we&amp;#39;re using Team Foundation Server (TFS) as our source code repository and also as our continuous integration (CI) engine.&amp;nbsp; The CI aspect is handled neatly by &lt;a href="http://www.codeplex.com/automation" target="_blank"&gt;Automaton&lt;/a&gt; which leaves me to setup the build process (or the Team Build Type, as it is referred to in TFS parlance).&amp;nbsp; Automated unit tests form the backbone of any decent CI process.&amp;nbsp; It wasn&amp;#39;t entirely straightforward to set these up, so I thought I&amp;#39;d share my experience with the community.&lt;/p&gt;&lt;p&gt;It&amp;#39;s worth noting that&amp;nbsp;we are&amp;nbsp;using MS Test for unit tests, i.e. the unit tests built into Visual Studio Team System (VSTS), and not Nunit.&amp;nbsp; I expected that this would simplify the build process since I wouldn&amp;#39;t be integrating Nunit results back into the build report.&amp;nbsp; This has been the case, but there are a few gotchas.&lt;/p&gt;&lt;p&gt;As stated on MSDN &amp;quot;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms181712(VS.80).aspx" target="_blank"&gt;How to setup a build server&lt;/a&gt;&amp;quot;:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;In order to run tests during build, Team Edition for Testers must be installed on the build computer. In order to run unit testing, code coverage or code analysis, Team Edition for Developers must be installed on the build computer.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;I find it quite suprising that I need a Visual Studio installation on the server, but the docs are pretty clear on this point.&amp;nbsp; Are there any licence implications of this?&amp;nbsp; The &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=1FA86E00-F0A3-4290-9DA9-6E0378A3A3C5&amp;amp;displaylang=en" target="_blank"&gt;Visual Studio 2005 Team System licensing white paper&lt;/a&gt; states:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;As part of the build process, Team Foundation Server may run quality tests and/or analysis on the precompiled or compiled code. These tests rely on functionality found within Team System client products, typically within the Team Edition for Software Developers or Team Edition for Software Testers products. These products may be installed on the build machine by licensed users of those products, as long as they are not directly used by any individuals who are not licensed for those products.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;In short, licencing is not a problem.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now unit tests really are just a type of test, so I&amp;#39;m not entirely clear whether I need VS TE for Testers or VS TE for Developers.&amp;nbsp; I&amp;#39;m planning to do some automated system testing and so I&amp;#39;ve installed the relevant bits from both editions on our build server.&amp;nbsp; I&amp;#39;d guess that you really only need VS TE for Developers.&lt;/p&gt;&lt;p&gt;So you would think that now our build server ought to be fully setup and we now ought to be able to execute unit tests.&amp;nbsp; Well you can, but only if they are part of a test list.&amp;nbsp; VSTS groups tests into lists and you need to specify (in the TfsBuild.proj file) the name of a test list containing unit tests to execute.&amp;nbsp; This is clear in the TfsBuild.proj file, where you need:&lt;/p&gt;&lt;div style="font-size:10pt;background:white;color:black;font-family:Courier New;"&gt;&lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;MetaDataFile&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;Include&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;$(SolutionRoot)\Main\Src\Solutions\Server1.vsmdi&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;TestList&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;List of Unit Tests&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;TestList&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;MetaDataFile&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;I don&amp;#39;t think this is good enough.&amp;nbsp; It&amp;#39;s enough of a problem for me to get developers to write unit tests.&amp;nbsp; I don&amp;#39;t want to have to then get hold of a VS TE for Testers installation (which is the edition that allows you to edit test lists)&amp;nbsp;and then add these unit tests into the appropriate list to get executed.&amp;nbsp; And it seems that I&amp;#39;m not the only one.&amp;nbsp; Enough people have complained about this that Buck Hodges (the dev lead for Team Build) has posted &lt;a href="http://blogs.msdn.com/buckh/archive/2006/11/04/how-to-run-tests-without-test-metadata-files-and-test-lists-vsmdi-files.aspx" target="_blank"&gt;some modifications to TFS that allow you to execute all unit tests in a DLL&lt;/a&gt;.&amp;nbsp; These take the form of a DLL containing an updated MS Build task and a revised Microsoft.TeamFoundations.Build.targets file (plus some docs).&amp;nbsp; Both of these files need to be installed on your build server.&amp;nbsp; Having done that, you can get rid of the&amp;nbsp;&lt;span style="color:maroon;"&gt;MetaDataFile&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;nbsp;&lt;/span&gt;element in TfsBuild.proj and replice it with:&lt;/p&gt;&lt;div style="font-size:10pt;background:white;color:black;font-family:Courier New;"&gt;&lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;TestContainerInOutput&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;Include&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;%2a%2a\%2a.UnitTests.dll&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;This (rather odd) syntax translates into **\*.UnitTests.dll.&amp;nbsp; In other words, you can just specify which DLLs contain your unit tests and the Team Build will now execute them all.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=5953" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Continuous+integration/default.aspx">Continuous integration</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Continuous+build/default.aspx">Continuous build</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Engineering+practices/default.aspx">Engineering practices</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/TFS/default.aspx">TFS</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Team+Foundation+Server/default.aspx">Team Foundation Server</category></item><item><title>MOSS: Programmatically modifying a shared webpart</title><link>http://blogs.conchango.com/johnrayner/archive/2007/01/22/MOSS_3A00_-Programmatically-modifying-a-shared-webpart.aspx</link><pubDate>Mon, 22 Jan 2007 13:07:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:5631</guid><dc:creator>john.rayner</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/5631.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=5631</wfw:commentRss><description>&lt;p&gt;On my current project, we create&amp;nbsp;SharePoint&amp;nbsp;sites in response to calls to a particular webservice and&amp;nbsp;there is&amp;nbsp;one site per domain entity.&amp;nbsp;&amp;nbsp;In this webservice, there is a certain amount of customisation of the site homepage which needs to be done.&amp;nbsp; In particular, we have an RSS Aggregator web part and we want this to point to a different URL for each site.&lt;/p&gt;&lt;p&gt;I couldn&amp;#39;t find anywhere on the web that had a sample of doing this, so I thought I&amp;#39;d blog the solution:&lt;/p&gt;&lt;div style="font-size:10pt;background:white;color:black;font-family:Courier New;"&gt;&lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// Reconfigure the RSS Reader to query against the company name&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0px;"&gt;&lt;span style="color:teal;"&gt;SPLimitedWebPartManager&lt;/span&gt; WPMgr = NewSite.GetLimitedWebPartManager(&lt;span style="color:maroon;"&gt;&amp;quot;default.aspx&amp;quot;&lt;/span&gt;, &lt;span style="color:teal;"&gt;PersonalizationScope&lt;/span&gt;.Shared);&lt;/p&gt;&lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color:teal;"&gt;WebPart&lt;/span&gt; wp &lt;span style="color:blue;"&gt;in&lt;/span&gt; WPMgr.WebParts)&lt;/p&gt;&lt;p style="margin:0px;"&gt;{&lt;/p&gt;&lt;p style="margin:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:teal;"&gt;RSSAggregatorWebPart&lt;/span&gt; RssPart = wp &lt;span style="color:blue;"&gt;as&lt;/span&gt; &lt;span style="color:teal;"&gt;RSSAggregatorWebPart&lt;/span&gt;;&lt;/p&gt;&lt;p style="margin:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (RssPart != &lt;span style="color:blue;"&gt;null&lt;/span&gt;)&lt;/p&gt;&lt;p style="margin:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;string&lt;/span&gt; QueryString = &lt;span style="color:teal;"&gt;HttpContext&lt;/span&gt;.Current.Server.UrlEncode(person.Company);&lt;/p&gt;&lt;p style="margin:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; RssPart.FeedUrl = RssPart.FeedUrl.Replace(&lt;span style="color:maroon;"&gt;&amp;quot;company&amp;quot;&lt;/span&gt;, QueryString);&lt;/p&gt;&lt;p style="margin:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; WPMgr.SaveChanges(RssPart);&lt;/p&gt;&lt;p style="margin:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin:0px;"&gt;}&lt;/p&gt;&lt;/div&gt;&lt;p style="margin:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0px;"&gt;Clearly &lt;span style="font-size:10pt;font-family:Courier New;"&gt;NewSite&lt;/span&gt; and &lt;span style="font-size:10pt;font-family:Courier New;"&gt;person.Company&lt;/span&gt; are defined higher up in my code, but you can do whatever you want with the &lt;span style="font-size:10pt;font-family:Courier New;"&gt;FeedUrl&lt;/span&gt; property.&amp;nbsp; To get this to work you need to have references to:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin:0px;"&gt;System.Web [for &lt;span style="font-size:10pt;font-family:Courier New;"&gt;System.Web.&lt;span style="color:teal;"&gt;WebPart&lt;/span&gt;&lt;/span&gt; and &lt;span style="font-size:10pt;font-family:Courier New;"&gt;System.Web.UI.WebControls.WebParts.&lt;span style="color:teal;"&gt;PersonalizationScope&lt;/span&gt;&lt;/span&gt;]&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin:0px;"&gt;Microsoft.SharePoint [for &lt;font face="Courier New"&gt;Microsoft.SharePoint.WebPartPages.&lt;span style="color:teal;"&gt;SPLimitedWebPartManager&lt;/span&gt;&lt;/font&gt;]&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin:0px;"&gt;Microsoft.SharePoint.Portal [for &lt;font face="Courier New"&gt;Microsoft.SharePoint.Portal.WebControls.&lt;span style="color:teal;"&gt;RSSAggregatorWebPart&lt;/span&gt;&lt;/font&gt;]&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The list above also shows which&amp;nbsp;namespaces I import through using declarations.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;PS.&lt;/strong&gt; Apologies to anyone who&amp;#39;s disappointed at the lack of WPF/E content in&amp;nbsp;my latest posts.&amp;nbsp; I hope to play some more&amp;nbsp;with that technology soon, but there&amp;#39;ll probably be a pre-dominance of MOSS posts in the coming months.&amp;nbsp; If you are really uninterested in MOSS posts, then make sure you only subscribe to a tagged feed and not to the main one.&lt;/p&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=5631" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/johnrayner/archive/tags/MOSS/default.aspx">MOSS</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/WSS3/default.aspx">WSS3</category></item><item><title>MOSS: Custom commands for the stsadm.exe utility</title><link>http://blogs.conchango.com/johnrayner/archive/2007/01/22/MOSS_3A00_-Custom-commands-for-the-stsadm.exe-utility.aspx</link><pubDate>Mon, 22 Jan 2007 09:18:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:5627</guid><dc:creator>john.rayner</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/5627.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=5627</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m doing some work with Microsoft Office SharePoint Server (MOSS) and I recently discovered that with MOSS (and WSS v3) the administration utility is extensible.&amp;nbsp; Stsadm.exe is something that I have a love-hate relationship with, but it&amp;#39;s interesting that it&amp;#39;s commands work on a provider model.&amp;nbsp; &lt;a href="http://sharepointsolutions.blogspot.com/2006/09/extending-stsadmexe-with-custom.html" target="_blank"&gt;Tony Bierman has posted all the details&lt;/a&gt; on the &lt;a href="http://sharepointsolutions.blogspot.com/" target="_blank"&gt;SharePoint Solutions Blog&lt;/a&gt;&amp;nbsp;and &lt;a href="http://www.andrewconnell.com/blog/articles/MossStsadmWcmCommands.aspx" target="_blank"&gt;Andrew Connell&lt;/a&gt; has some real-world examples of custom commands.&lt;/p&gt;&lt;p&gt;I can see these custom commands being really useful in many MOSS deployment scenarios - anyone who has ever tried to write an MSI or a batch file deployment for a SharePoint site will know how invaluable stsadm.exe really is.&amp;nbsp; Of course it does raise a bootstrapping issue, in&amp;nbsp;that you have to get your custom commands deployed before you can use them for the rest of your deployment.&amp;nbsp; However, this shouldn&amp;#39;t be an insurmountable problem.&lt;/p&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=5627" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/johnrayner/archive/tags/MOSS/default.aspx">MOSS</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Installers/default.aspx">Installers</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/MSI/default.aspx">MSI</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/WSS3/default.aspx">WSS3</category></item><item><title>WPF/E: A glass button</title><link>http://blogs.conchango.com/johnrayner/archive/2006/12/22/WPF_2F00_E_3A00_-A-glass-button.aspx</link><pubDate>Fri, 22 Dec 2006 00:19:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:5427</guid><dc:creator>john.rayner</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/5427.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=5427</wfw:commentRss><description>&lt;p&gt;Apologies to my readers, but my blog has a been little quiet of late.&amp;nbsp; Hopefully I&amp;#39;ll be able to share the reasons for this with everyone soon!&amp;nbsp; In the meantime, &lt;a href="http://blogs.conchango.com/johnrayner/attachment/5427.ashx"&gt;here&amp;#39;s a WPF/E sample&lt;/a&gt; I&amp;#39;ve been meaning to post for some time.&lt;/p&gt;&lt;p&gt;Essentially it&amp;#39;s a button that looks like it&amp;#39;s made of glass.&amp;nbsp; The button pulsates when you hover over it and glows when it&amp;#39;s pressed.&amp;nbsp; A picture is worth a thousand words so here it is:&lt;/p&gt;&lt;p align="center"&gt;&lt;img height="180" src="http://blogs.conchango.com/photos/conchango_bloggers/images/5426/original.aspx" style="width:315px;height:180px;" width="315" /&gt;&lt;/p&gt;&lt;p&gt;I couldn&amp;#39;t get a reasonable screen capture of the hover-over effect, so you&amp;#39;ll have to take my word for it (or download and run the attached files).&lt;/p&gt;&lt;p&gt;There are a number of XAML elements which go into making up the button.&amp;nbsp; They are clearly commented in the XAML but the list is as follows:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Drop-shadow: an ellipse with a radial gradient of black&amp;nbsp;fading to&amp;nbsp;tranparent&lt;/li&gt;&lt;li&gt;Button surround: a white ellipse slightly bigger than the green one&lt;/li&gt;&lt;li&gt;Black button background: only visible round the edges of the green when the button is pressed&lt;/li&gt;&lt;li&gt;Main button colour: the green (or whatever color you want) of the button.&amp;nbsp; This ellipse is clipped to its initial outline, thus allowing us to move the ellipse slightly for the button press without it overlapping the button surround&lt;/li&gt;&lt;li&gt;Top glow: an ellipse with a linear gradient background of white (at the top) fading to transparent.&amp;nbsp; Smaller than the main button colour and positioned so that the tops are the same&lt;/li&gt;&lt;li&gt;Bottom glow: an ellipse the same size as the main button colour but with a linear gradient background of white (at the bottom) fading to transparent.&amp;nbsp; This is also clipped as per the main button colour.&lt;/li&gt;&lt;li&gt;Hover-over glow: an ellipse the same size as the main button colour with a radial gradient background of white (at the centre of the ellipse) fading to transparent.&amp;nbsp; This is initially transparent.&lt;/li&gt;&lt;li&gt;Transparent element for catching mouse events: on top of all of this is a transparent ellipse the same size as the white button surround for catching MouseEnter, MouseLeave, MouseLeftButtonDown and MouseLeftButtonUp events.&amp;nbsp; This element also contains the Storyboard for the pulsating hover-over effect (although this could be in any XAML element).&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Who would&amp;#39;ve thought a button could be so complex?&amp;nbsp; I am quite proud of the fact that the actual button colour only appears once in all of the above XAML elements.&amp;nbsp; So it&amp;#39;s a single change if you fancy a red button rather than a green one.&lt;/p&gt;&lt;p&gt;Now all of this is in a canvas and the Loaded event of the canvas calls a JavaScript function.&amp;nbsp; The other mouse handlers are attached through script.&amp;nbsp; The script itself is pretty straightforward, but a bit fiddly in places.&amp;nbsp; The MouseEnter and MouseLeave event handlers just call Begin() and Stop() methods on&amp;nbsp;the Storyboard.&amp;nbsp; The MouseLeftButtonDown handler has to adjust the position of a number of elements, as well as moving the clipping geometry on a couple of elements so that the clip geometry doesn&amp;#39;t move with the element.&amp;nbsp; The MouseLeftButtonUp handler reverses these effects.&lt;/p&gt;&lt;p&gt;If you want to make this into a proper button (i.e. one that actually does something) then you need to add some script into the MouseLeftButtonUp event handler.&amp;nbsp; This script could call other script (for client-side actions), make an ASP.Net postback (for server-side actions), trigger an AJAX call (for AJAX apps) or doing anything else you fancy.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Issues I hit&lt;/strong&gt;: It&amp;#39;s not possible to use the RoutedEvent on an EventTrigger to catch anything other than a Loaded event (&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1006129&amp;amp;SiteID=1" target="_blank"&gt;confirmed by Joe Stegman&lt;/a&gt; in the forums).&amp;nbsp; This is why I need script to call the Begin and Stop methods on my Storyboard.&amp;nbsp; As a result of this, animations tend to start running as soon as everything is loaded.&amp;nbsp; This is why one of the first things I do is to stop the animation.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Future enhancements&lt;/strong&gt;: It&amp;#39;s fiddly to put more than one of these on a Canvas.&amp;nbsp; They can share the script, but not the XAML.&amp;nbsp; The way forward here&amp;nbsp;may be for the script to create the XAML elements, but this sort of code always looks ugly.&amp;nbsp; It&amp;#39;s also a bit poor that you need to hack an event handler to get the button to do anything.&amp;nbsp; It would be much better to be able to pass a JavaScript function into the object constructor and have this called appropriately.&lt;/p&gt;&lt;p&gt;As ever, it would be great to hear from anyone who uses this code.&lt;/p&gt;&lt;p&gt;[PS.&amp;nbsp; I had wanted to post this as a sample you could run, but our blogging software is preventing me from doing this.&amp;nbsp; Sorry but you&amp;#39;ll have to download and run this in order to see it in action.&amp;nbsp; &lt;a href="http://blogs.conchango.com/johnrayner/archive/2006/12/05/WPF_2F00_E_3A00_-Security-is-setup-by-default-only-for-an-HTTP-location.aspx"&gt;As I mentioned previously&lt;/a&gt;, IE users need to ensure that load this via HTTP and not directly from the filesystem.]&lt;/p&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=5427" width="1" height="1"&gt;</description><enclosure url="http://blogs.conchango.com/johnrayner/attachment/5427.ashx" length="5802" type="application/x-zip-compressed" /><category domain="http://blogs.conchango.com/johnrayner/archive/tags/WPFE/default.aspx">WPFE</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/WPF_2F00_E/default.aspx">WPF/E</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Silverlight/default.aspx">Silverlight</category></item><item><title>WPF/E: Running side-by-side with WPF Designer (a.k.a "Cider")</title><link>http://blogs.conchango.com/johnrayner/archive/2006/12/08/WPF_2F00_E_3A00_-Running-side_2D00_by_2D00_side-with-WPF-Designer-_2800_a.k.a-_2200_Cider_22002900_.aspx</link><pubDate>Fri, 08 Dec 2006 14:00:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:5321</guid><dc:creator>john.rayner</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/5321.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=5321</wfw:commentRss><description>&lt;p&gt;There are two main ways to develop WPF/E within Visual Studio 2005 - one is to edit the XAML in the XML Editor, and the other is to use &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=f54f5537-cc86-4bf5-ae44-f5a1e805680d&amp;amp;DisplayLang=en"&gt;Cider, the XAML WPF designer&lt;/a&gt;.&amp;nbsp; There are pros and cons to each approach, and some configuration for each.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Using Cider&lt;/strong&gt;&lt;br /&gt;&lt;img align="right" alt="Cider" height="263" hspace="10" src="http://blogs.conchango.com/photos/conchango_bloggers/images/5317/original.aspx" style="width:350px;height:263px;" title="Cider" width="350" /&gt;Cider is the Visual Studio designer for WPF and XAML and is shown to the right.&amp;nbsp; It is available in CTP (there are &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=929870&amp;amp;SiteID=1"&gt;no plans for an RTM version for VS 2005&lt;/a&gt;).&amp;nbsp; You&amp;nbsp;can edit in a&amp;nbsp;design view or a XAML view and they are synchronised.&lt;/p&gt;&lt;p&gt;This sounds great.&amp;nbsp; The only problem is that you have to be very careful to limit yourself to the WPF/E subset of XAML.&amp;nbsp; Cider targets the full set of XAML and WPF, so you may find that you end up developing something that doesn&amp;#39;t work in WPF/E.&amp;nbsp; If you&amp;#39;ve developed anything with WPF/E, you&amp;#39;ll know that the runtime errors are not particularly informative and so you might not want to go down this route.&lt;/p&gt;&lt;p&gt;Also, for Cider to work your XAML document needs to be in the namespace &lt;font color="#0000ff" size="2"&gt;&lt;a href="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&gt;http://schemas.microsoft.com/winfx/2006/xaml/presentation&lt;/a&gt;&lt;/font&gt;. This isn&amp;#39;t the WPF/E namespace.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Using the XML Editor&lt;/strong&gt;&lt;br /&gt;&lt;img align="right" alt="WPF/E Intellisense" height="263" hspace="10" src="http://blogs.conchango.com/photos/conchango_bloggers/images/5319/original.aspx" style="width:350px;height:263px;" title="WPF/E Intellisense" width="350" /&gt;I was very disappointed when&amp;nbsp;I&amp;#39;d installed the WPF/E SDK and Visual Studio didn&amp;#39;t give me Intellisense on my WPF/E XAML.&amp;nbsp; It turns out that this isn&amp;#39;t very difficult to enable.&amp;nbsp; All you have to do is copy the file &amp;quot;wpfe.xsd&amp;quot; from the WPF/E SDK Schema directory into the Visual Studio schema directory.&amp;nbsp; In my case, I copied the file from&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;C:\Program Files\Microsoft SDKs\WPFE\Help\XSD&lt;/em&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; to&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;em&gt;C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;These are the default directories so your system is likely to be the same.&lt;/p&gt;&lt;p&gt;It&amp;#39;s worth noting that the default namespace on your XAML document needs to be&amp;nbsp;&lt;font color="#0000ff" size="2"&gt;&lt;a href="http://schemas.microsoft.com/client/2007"&gt;http://schemas.microsoft.com/client/2007&lt;/a&gt;&lt;/font&gt;&amp;nbsp;for Visual Studio to associate the schema.&amp;nbsp; This &lt;u&gt;is&lt;/u&gt; the proper WPF/E namespace.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Getting Visual Studio to Use the XML Editor&lt;/strong&gt;&lt;br /&gt;If you have installed Cider, you will find that Visual Studio wants to open all XAML documents using this and not using the XML editor.&amp;nbsp; If you do want to use the XML Editor, you need to inform Visual Studio of this.&amp;nbsp; To open XAML files in the XML editor by default you can go to the Tools / Options window and under Text Editor / File Extensions set .xaml files to open in the XML Editor.&amp;nbsp; A screenshot of this is below.&amp;nbsp; If you then want to open a XAML file in Cider, you will need to right-click from the Solution Explorer and choose &amp;quot;Open With ...&amp;quot;.&lt;/p&gt;&lt;p&gt;And this is the other way of getting XAML files to open in the XML Editor (i.e. without modifying your options).&amp;nbsp; You can always right-click on your XAML file and go through the &amp;quot;Open With ...&amp;quot; dialog.&amp;nbsp; Personally, I prefer just to double-click.&lt;/p&gt;&lt;p align="center"&gt;&lt;img alt="Configuring Visual Studio to open XAML files in the XML editor" height="297" hspace="10" src="http://blogs.conchango.com/photos/conchango_bloggers/images/5320/500x297.aspx" style="width:500px;height:297px;" title="Configuring Visual Studio to open XAML files in the XML editor" width="500" /&gt;&lt;/p&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=5321" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Development+practices/default.aspx">Development practices</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/WPFE/default.aspx">WPFE</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/WPF_2F00_E/default.aspx">WPF/E</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Silverlight/default.aspx">Silverlight</category></item><item><title>WPF/E: Setting up your workstation for development</title><link>http://blogs.conchango.com/johnrayner/archive/2006/12/05/WPF_2F00_E_3A00_-Setting-up-your-workstation.aspx</link><pubDate>Tue, 05 Dec 2006 13:47:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:5301</guid><dc:creator>john.rayner</dc:creator><slash:comments>12</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/5301.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=5301</wfw:commentRss><description>&lt;p&gt;So you&amp;#39;ve installed the &lt;a href="http://msdn2.microsoft.com/en-us/asp.net/bb187358.aspx"&gt;WPF/E&lt;/a&gt; &lt;a href="http://go.microsoft.com/fwlink/?linkid=77792&amp;amp;clcid=0x409"&gt;runtime&lt;/a&gt; and played with a few &lt;a href="http://channel9.msdn.com/playground/wpfe/Sprawl/default.html"&gt;samples&lt;/a&gt;.&amp;nbsp; You&amp;#39;ve probably also installed the &lt;a href="http://go.microsoft.com/fwlink/?linkid=77791&amp;amp;clcid=0x409"&gt;WPF/E&amp;nbsp;SDK&lt;/a&gt; and opened up some of the &lt;a href="http://go.microsoft.com/fwlink/?linkid=77794&amp;amp;clcid=0x409"&gt;sample source code&lt;/a&gt;.&amp;nbsp; What next?&amp;nbsp; Write your own WPF/E code, of course!&amp;nbsp; &lt;/p&gt;&lt;p&gt;Adam Kinney has posted a video on Channel 9 about &lt;a href="http://channel9.msdn.com/Showpost.aspx?postid=263365"&gt;Getting Started with WPF/E&lt;/a&gt;.&amp;nbsp;It&amp;#39;s worth a listen (I say listen because the code on his screen is illegible, but it&amp;#39;s interesting anyway).&amp;nbsp; In this video he opens up a WPF/E project template and uses that as a starting point.&amp;nbsp; So where is this template and how can you get it?&amp;nbsp; Well,&amp;nbsp;there&amp;#39;s a hard way and an easy way to get&amp;nbsp;it ...&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The Hard Way&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;img align="right" height="142" hspace="20" src="http://blogs.conchango.com/photos/conchango_bloggers/images/5298/640x142.aspx" style="width:640px;height:142px;" width="640" /&gt;If you&amp;#39;ve installed the WPF/E SDK there is a link in there&amp;#39;s a link in your Start Menu which should look like the image to the right.&amp;nbsp; This links to an installer which will get the WPF/E project template loaded.&lt;/p&gt;&lt;p&gt;Not too hard, you think?&amp;nbsp; Well it&amp;#39;s not that simple.&lt;/p&gt;&lt;p&gt;This installer requires some additional Visual Studio bits.&amp;nbsp; Specifically you need to download and install the following:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=63636"&gt;Visual Studio 2005&amp;nbsp;Update to support VS2003-style web application projects&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx"&gt;Visual Studio 2005 web application add-in&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This is a bit of a bother as it will affect your Visual Studio installation outside of your WPF/E development.&amp;nbsp; But if you liked the VS2003 web projects and you miss them&amp;nbsp;then go ahead.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The Easy Way&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Project templates are really just specially constructed zip files and Visual Studio 2005 has a special folder where you can add your own.&amp;nbsp; This is configured on Tools / Options / Projects and Solutions, but it defaults to &amp;quot;[My Documents]\Visual Studio 2005\Templates\ProjectTemplates&amp;quot;.&amp;nbsp; So if you go to this folder, open up the &amp;quot;Visual C#&amp;quot; folder (or whichever sub-folder you prefer) you can copy in &lt;a href="http://blogs.conchango.com/johnrayner/attachment/5301.ashx"&gt;the project template which I&amp;#39;ve attached to this post&lt;/a&gt;.&amp;nbsp; Then you&amp;#39;ll get the WPF/E template showing up in your New Project window as follows without installing anything else:&lt;/p&gt;&lt;p align="center"&gt;&lt;img height="363" src="http://blogs.conchango.com/photos/conchango_bloggers/images/5300/500x363.aspx" style="width:500px;height:363px;" width="500" /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;EDIT [2006-12-06]:&lt;/strong&gt; I&amp;#39;ve modified the attached template for:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;My Visual Studio didn&amp;#39;t like the namespace in the XAML file.&amp;nbsp; I&amp;#39;ve changed it from&amp;nbsp;&lt;font color="#0000ff" size="2"&gt;&lt;a href="http://schemas.microsoft.com/client/2007"&gt;http://schemas.microsoft.com/client/2007&lt;/a&gt;&lt;/font&gt; to &lt;font color="#0000ff" size="2"&gt;&lt;a href="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&gt;http://schemas.microsoft.com/winfx/2006/xaml/presentation&lt;/a&gt;&lt;/font&gt;.&lt;/li&gt;&lt;li&gt;Following the other WPF/E samples, I&amp;#39;ve moved the XAML file into a &amp;quot;xaml&amp;quot; folder.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;EDIT [2006-12-08]:&lt;/strong&gt; I modified the namespace back to &lt;a href="http://schemas.microsoft.com/client/2007"&gt;http://schemas.microsoft.com/client/2007&lt;/a&gt;.&amp;nbsp; Once you&amp;#39;ve copied the wpfe.xsd file correctly, Visual Studio will then give you Intellisense.&amp;nbsp; See &lt;a href="http://blogs.conchango.com/johnrayner/archive/2006/12/08/WPF_2F00_E_3A00_-Running-side_2D00_by_2D00_side-with-WPF-Designer-_2800_a.k.a-_2200_Cider_22002900_.aspx" target="_blank"&gt;my next post&lt;/a&gt; for more info.&lt;/p&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=5301" width="1" height="1"&gt;</description><enclosure url="http://blogs.conchango.com/johnrayner/attachment/5301.ashx" length="5153" type="application/x-zip-compressed" /><category domain="http://blogs.conchango.com/johnrayner/archive/tags/WPFE/default.aspx">WPFE</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/WPF_2F00_E/default.aspx">WPF/E</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Visual+Studio+project+templates/default.aspx">Visual Studio project templates</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Silverlight/default.aspx">Silverlight</category></item><item><title>WPF/E: Only HTTP locations work by default </title><link>http://blogs.conchango.com/johnrayner/archive/2006/12/05/WPF_2F00_E_3A00_-Security-is-setup-by-default-only-for-an-HTTP-location.aspx</link><pubDate>Tue, 05 Dec 2006 09:28:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:5290</guid><dc:creator>john.rayner</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.conchango.com/johnrayner/comments/5290.aspx</comments><wfw:commentRss>http://blogs.conchango.com/johnrayner/commentrss.aspx?PostID=5290</wfw:commentRss><description>&lt;p&gt;Trying out some of the WPF/E samples, I noticed some rather odd behaviour.&amp;nbsp; I loaded a sample directly off my file system and was rewarded with a blank security and a notice that Internet Explorer was blocking some active content.&amp;nbsp; I then setup a virtual directory on my local IIS instance and everything was fine.&amp;nbsp; You can see the two&amp;nbsp;redenderings here:&lt;/p&gt;&lt;p align="center"&gt;&lt;img height="277" src="http://blogs.conchango.com/photos/conchango_bloggers/images/5291/425x277.aspx" style="width:425px;height:277px;" width="425" /&gt;&lt;/p&gt;&lt;p&gt;&lt;img align="left" height="425" hspace="8" src="http://blogs.conchango.com/photos/conchango_bloggers/images/5292/350x425.aspx" style="width:350px;height:425px;" width="350" /&gt;Now this sounded to me like a security problem, and that&amp;#39;s exactly what it is.&amp;nbsp; When you load the page via HTTP then Internet Explorer will work out which Internet Zone you are in (Intranet, Trusted Sites, Internet, etc) and the configured security.&amp;nbsp; Below to the right is a screenshot of the default WPF/E security settings and you can see that it will run content, even for the Internet zone.&lt;/p&gt;&lt;p&gt;&lt;img align="right" height="425" hspace="5" src="http://blogs.conchango.com/photos/conchango_bloggers/images/5293/338x425.aspx" style="width:338px;height:425px;" width="338" /&gt;However thes settings&amp;nbsp;only applies to pages loaded via HTTP.&amp;nbsp;&amp;nbsp;If you are loading some HTML directly from your file system (like I was) then there are some different security settings.&amp;nbsp; The defaults are shown below and you&amp;#39;ll notice that they prohibit active content, which includes WPF/E XAML files.&lt;/p&gt;&lt;p&gt;So strangely enough, as far as XAML and WPF/E go, your local file system is a more restrictive location than the Internet.&amp;nbsp; Work that out if you can!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=5290" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/WPFE/default.aspx">WPFE</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/WPF_2F00_E/default.aspx">WPF/E</category><category domain="http://blogs.conchango.com/johnrayner/archive/tags/Silverlight/default.aspx">Silverlight</category></item></channel></rss>