<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Waldek Mastykarz</title>
	
	<link>http://blog.mastykarz.nl</link>
	<description>Innovation Matters | SharePoint Server MVP</description>
	<lastBuildDate>Tue, 13 Jul 2010 17:23:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/WaldekMastykarz" /><feedburner:info uri="waldekmastykarz" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Waldek Mastykarz is Microsoft Certified Professional Developer SharePoint 2010</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/cBoG3VKM9aA/</link>
		<comments>http://blog.mastykarz.nl/waldek-mastykarz-is-microsoft-certified-professional-developer-sharepoint-2010/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 17:23:25 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/waldek-mastykarz-is-microsoft-certified-professional-developer-sharepoint-2010/</guid>
		<description><![CDATA[Last May I’ve taken the beta versions of the two SharePoint 2010 Developer exams: 70-573 TS: Microsoft SharePoint 2010, Application Development and 70-576 PRO: Designing and Developing Microsoft SharePoint 2010 Applications. Today I received an e-mail saying that I successfully passed both exams and received the Microsoft Certified Professional Developer SharePoint 2010 status.
It was the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mastykarz.nl/blog/images/aaf0d7b21a0f_10AB6/MCPD.gif"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="" border="0" alt="Microsoft Certified Professional Developer" align="left" src="http://mastykarz.nl/blog/images/aaf0d7b21a0f_10AB6/MCPD_thumb.gif" width="115" height="79" /></a>Last May I’ve taken the beta versions of the two SharePoint 2010 Developer exams: <a href="http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-573">70-573 TS: Microsoft SharePoint 2010, Application Development</a> and <a href="http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-576">70-576 PRO: Designing and Developing Microsoft SharePoint 2010 Applications</a>. Today I received an e-mail saying that I successfully passed both exams and received the Microsoft Certified Professional Developer SharePoint 2010 status.</p>
<p>It was the first time that I participated in beta examination so I didn’t really know what to expect when I signed up for the exams. Doing the exams turned out to be a great experience: although you could feel it was a beta examination, it was great to see the results of hard work of the Microsoft Learning team.</p>
<p>I really like the way the exams are balanced now: while the TS exam covers the basics of SharePoint development, the PRO exam takes the content a step further verifying your knowledge about designing and developing SharePoint Solutions. Another great improvement in my opinion is the fact that there is no more separation based on SharePoint SKU. Being a certified developer for SharePoint 2010 means that you can design and develop solutions on the SharePoint 2010 platform no matter the SKU.</p>
<p>As I was participating in the beta run of the exams, I found it a bit challenging to prepare to the exams. Although I’ve been working with SharePoint 2010 for a while now and have some hands-on real life experience with it, there are so far no official preparation materials. There is the exam preparation guideline but you will have to gather all the content yourself. While preparing for the exams I found very useful the <a href="http://channel9.msdn.com/learn/courses/SharePoint2010Developer/">SharePoint 2010 Developer Training Course</a> on Channel 9.</p>
<p>Having completed both exams I can definitely recommend them to you. The exams are a great way to verify your knowledge of SharePoint 2010 as development platform and if done well you can learn a lot of new things while preparing for the certification.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b05ce472-eb30-4ee2-872c-16c024975f1e" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=cBoG3VKM9aA:b5al0XbKXWw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=cBoG3VKM9aA:b5al0XbKXWw:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=cBoG3VKM9aA:b5al0XbKXWw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=cBoG3VKM9aA:b5al0XbKXWw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=cBoG3VKM9aA:b5al0XbKXWw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=cBoG3VKM9aA:b5al0XbKXWw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=cBoG3VKM9aA:b5al0XbKXWw:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/cBoG3VKM9aA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/waldek-mastykarz-is-microsoft-certified-professional-developer-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/waldek-mastykarz-is-microsoft-certified-professional-developer-sharepoint-2010/</feedburner:origLink></item>
		<item>
		<title>CKS:DEV soon with even more support for Content Types and Site Columns</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/tHt0_ezVyWY/</link>
		<comments>http://blog.mastykarz.nl/cksdev-support-content-types-site-columns/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 12:45:08 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/cksdev-support-content-types-site-columns/</guid>
		<description><![CDATA[Defining custom Site Columns and Content Types is the very basis of almost every SharePoint project. Using Site Columns and Content Types you can define the information architecture of your Solution. And although this process is something that is very important and something you do very often, it is surprising how little support there is [...]]]></description>
			<content:encoded><![CDATA[<p><img style="display: inline" align="left" src="http://mastykarz.nl/blog/images/CKSDEVnowwithsupportforImportingSiteColu_C590/CKS_logo.gif" />Defining custom Site Columns and Content Types is the very basis of almost every SharePoint project. Using Site Columns and Content Types you can define the information architecture of your Solution. And although this process is something that is very important and something you do very often, it is surprising how little support there is for it from the development point of view that would allow you to do it in a productive manner. <a href="http://cksdev.codeplex.com/">CKS:DEV</a> has already had some support around Content Types and Site Columns but still it was far from ideal, so including some improvements in that area was something we couldn’t really leave behind…</p>
<h2>Content Types Groups</h2>
<p>One of the new features in the next release of CKS:DEV is the grouped view of Site Content Types: just as you see them on the Site Settings &gt; Site Content Types page.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="" border="0" alt="Grouped view of Site Content Types in the Visual Studio Server Explorer" src="http://mastykarz.nl/blog/images/CKSDEVwithevenmoresupportforContentTypes_BBD0/00.png" width="327" height="600" /></p>
<p>This view not only allows you to browse through the Content Types more easily and consistent with the SharePoint Web UI, but it also has one very important and useful feature.</p>
<p>One of the features provided with CKS:DEV is the ability of importing existing Content Types into your SharePoint project. This feature allows you to create and configure your Content Types using the SharePoint Web UI, and once you’re done import those Content Types into your project. While this feature was a great improvement of the development process, it was still pretty inconvenient, especially if you had not one but ten or twenty Content Types that had to be imported.</p>
<p>With addition of the Content Types Groups in the next release of CKS:DEV you will be able to import all Content Types from the specific group into your SharePoint Project with a single mouse click!</p>
<p><a href="http://mastykarz.nl/blog/images/CKSDEVwithevenmoresupportforContentTypes_BBD0/01.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="" border="0" alt="Import Content Types menu option on a Content Type Group" src="http://mastykarz.nl/blog/images/CKSDEVwithevenmoresupportforContentTypes_BBD0/01_thumb.png" width="480" height="324" /></a></p>
<p>The only downside here is the limitation of the current extensibility API of the Visual Studio 2010 SharePoint Developer Tools. At this moment you cannot either hide or remove any of the existing nodes, so eventually you will end up with both full and grouped view of available Site Content Types.</p>
<h2>Site Columns Groups</h2>
<p><a href="http://blog.mastykarz.nl/cksdev-support-importing-site-columns/">Just recently we added to CKS:DEV support for importing Fields (Columns) into SharePoint Project</a>. Similar to Content Types, importing Site Columns is a tedious process. The big difference is that when you might have just a few Content Types you will very likely end up with many more Site Columns, so doing all of it manually is just very time consuming.</p>
<p>In the next release of CKS:DEV we will be shipping a new node called <em>Site Columns</em>, which will provide a grouped view of available Site Columns.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="" border="0" alt="New Site Columns node provided with the next release of CKS:DEV" src="http://mastykarz.nl/blog/images/CKSDEVwithevenmoresupportforContentTypes_BBD0/02.png" width="374" height="503" /></p>
<p>Additionally it allows you to import a single Field but also a whole group into your project with a single mouse click!</p>
<p><a href="http://mastykarz.nl/blog/images/CKSDEVwithevenmoresupportforContentTypes_BBD0/03.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="" border="0" alt="Importing Site Columns from a group using CKS:DEV" src="http://mastykarz.nl/blog/images/CKSDEVwithevenmoresupportforContentTypes_BBD0/03_thumb.png" width="466" height="384" /></a></p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="" border="0" alt="Multiple fields automatically added to a SharePoint Project during the Import Site Columns process" src="http://mastykarz.nl/blog/images/CKSDEVwithevenmoresupportforContentTypes_BBD0/04.png" width="268" height="615" /></p>
<h2>Other stuff</h2>
<p>Site Columns and Content Types are not the only area we’ve been improving for the next release. We’ve done some minor bug fixes and included some improvements suggested by the users of CKS:DEV. You can find more information about our work on the CKS:DEV <a href="http://cksdev.codeplex.com/workitem/list/basic">Issue Tracker page</a>. Also if you have any suggestions for future feature that’s the place to add it to.</p>
<p>Although the exact details about the next release are still to come, all I can say now is that it will be very soon and very exciting and if you are developer you should really stay in touch for the updates. Oh, and if you don’t want to wait on the official release, you can always grab <a href="http://cksdev.codeplex.com/SourceControl/list/changesets">the latest source</a> and build your own version of CKS:DEV!</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:11b8dec5-0622-4278-8363-d4e6301b01b1" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/Visual+Studio+2010" rel="tag">Visual Studio 2010</a>,<a href="http://technorati.com/tags/CKS%3aDEV" rel="tag">CKS:DEV</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=tHt0_ezVyWY:Dc9iBWXhH6U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=tHt0_ezVyWY:Dc9iBWXhH6U:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=tHt0_ezVyWY:Dc9iBWXhH6U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=tHt0_ezVyWY:Dc9iBWXhH6U:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=tHt0_ezVyWY:Dc9iBWXhH6U:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=tHt0_ezVyWY:Dc9iBWXhH6U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=tHt0_ezVyWY:Dc9iBWXhH6U:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/tHt0_ezVyWY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/cksdev-support-content-types-site-columns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/cksdev-support-content-types-site-columns/</feedburner:origLink></item>
		<item>
		<title>CKS:DEV now with support for Importing Site Columns</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/Fft9LGYPKAI/</link>
		<comments>http://blog.mastykarz.nl/cksdev-support-importing-site-columns/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 12:52:44 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/cksdev-support-importing-site-columns/</guid>
		<description><![CDATA[Creating custom Site Columns is something you do in almost every single SharePoint Solution. Unfortunately even in spite of great SDK documentation and intellisense for SharePoint XML files, it’s still a tedious process to create new columns directly in the XML. Using the SharePoint web UI is way easier but then again: how would you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mastykarz.nl/blog/images/CKSDEVnowwithsupportforImportingSiteColu_C590/CKS_logo.gif"><img style="border-bottom: 0px; border-left: 0px; margin: 2px 10px 5px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="" border="0" alt="Community Kit for SharePoint logo" align="left" src="http://mastykarz.nl/blog/images/CKSDEVnowwithsupportforImportingSiteColu_C590/CKS_logo_thumb.gif" width="190" height="67" /></a>Creating custom Site Columns is something you do in almost every single SharePoint Solution. Unfortunately even in spite of great SDK documentation and intellisense for SharePoint XML files, it’s still a tedious process to create new columns directly in the XML. Using the SharePoint web UI is way easier but then again: how would you get that out of SharePoint and put into your Solution? There is an answer to that question and it is: use CKS:DEV!</p>
<p>In case you missed the tweets, we’ve recently added support for importing Site Columns right into your SharePoint Project. To do that simply click with right mouse button on a column in the Server Explorer and click on Import.</p>
<p><a href="http://mastykarz.nl/blog/images/CKSDEVnowwithsupportforImportingSiteColu_C590/fieldimport.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="" border="0" alt="Importing Field using the CKS:DEV Import Field option" src="http://mastykarz.nl/blog/images/CKSDEVnowwithsupportforImportingSiteColu_C590/fieldimport_thumb.png" width="358" height="323" /></a></p>
<p>The selected column will get imported to the active SharePoint Project in your Solution.</p>
<p><a href="http://mastykarz.nl/blog/images/CKSDEVnowwithsupportforImportingSiteColu_C590/importedfield.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="" border="0" alt="Imported Field added to the active SharePoint Project" src="http://mastykarz.nl/blog/images/CKSDEVnowwithsupportforImportingSiteColu_C590/importedfield_thumb.png" width="288" height="295" /></a></p>
<p>Importing single Fields is just a little step we made towards simplifying working with Site Columns and Content Types. Right now we’re discussing other possibilities of how we could further improve CKS:DEV and make importing SharePoint artifacts even easier and faster. Don’t hesitate to <a href="http://cksdev.codeplex.com/workitem/list/basic">let us know</a> if you have some great ideas: we do listen and <a href="http://twitter.com/waldekm#status_17348651342">we do make it happen</a>.</p>
<p>Although Importing Fields is not quite enough for a whole new release you can get it right now from <a href="http://www.codeplex.com">CodePlex</a>. Simply <a href="http://cksdev.codeplex.com/SourceControl/list/changesets">download the latest version of the source</a>, and build it, and the Import Field option will appear under the Field menu.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:315fcd4f-20f5-49d7-bbef-28351ce56317" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/Visual+Studio+2010" rel="tag">Visual Studio 2010</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Fft9LGYPKAI:_mgIBQbUmDo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Fft9LGYPKAI:_mgIBQbUmDo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Fft9LGYPKAI:_mgIBQbUmDo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=Fft9LGYPKAI:_mgIBQbUmDo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Fft9LGYPKAI:_mgIBQbUmDo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Fft9LGYPKAI:_mgIBQbUmDo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=Fft9LGYPKAI:_mgIBQbUmDo:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/Fft9LGYPKAI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/cksdev-support-importing-site-columns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/cksdev-support-importing-site-columns/</feedburner:origLink></item>
		<item>
		<title>Dynamically resizing images with Mavention Smart Images</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/uGQ-IIU1CgY/</link>
		<comments>http://blog.mastykarz.nl/dynamically-resizing-images-with-mavention-smart-images/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 05:58:34 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[WCM]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/dynamically-resizing-imageswith-mavention-smart-images/</guid>
		<description><![CDATA[A picture is worth a thousand words. In many situations images help illustrate and explain thoughts. Without images the Web would be boring and colorless. And while we all are convinced about the power of image and how it enhances telling a story, it is surprising how complex it is to get it right on [...]]]></description>
			<content:encoded><![CDATA[<p>A picture is worth a thousand words. In many situations images help illustrate and explain thoughts. Without images the Web would be boring and colorless. And while we all are convinced about the power of image and how it enhances telling a story, it is surprising how complex it is to get it right on the Web. Many large images on your website make it download and display slowly. No matter how great the content is, the odds are high that your visitor will not take the time to wait for it. Large images is not something specific to SharePoint. Many Content Management Systems suffer from not being able to automatically provide resized images. And while in many cases there are solutions to that, they are either complex, expensive or both. However the great thing with SharePoint 2010 is, that using its extensibility capabilities you can easily change this… </p>
<h2>Imagine…</h2>
<p>Let’s have a look at an image inserted on a page using the standard functionality provided with SharePoint 2010.</p>
<p><a href="http://mastykarz.nl/blog/images/OptimizingimageswithMaventionSmartImages_117EA/00.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SharePoint 2010 Team Site with a picture of orange flowers." border="0" alt="SharePoint 2010 Team Site with a picture of orange flowers." src="http://mastykarz.nl/blog/images/OptimizingimageswithMaventionSmartImages_117EA/00_thumb.png" width="480" height="491" /></a> </p>
<p>Look all right, doesn’t it? If you however look beneath the hood you should notice the problem:</p>
<p><a href="http://mastykarz.nl/blog/images/OptimizingimageswithMaventionSmartImages_117EA/01.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Page statistics showing the original large picture loaded in spite of the resized miniature included on the page." border="0" alt="Page statistics showing the original large picture loaded in spite of the resized miniature included on the page." src="http://mastykarz.nl/blog/images/OptimizingimageswithMaventionSmartImages_117EA/01_thumb.png" width="480" height="490" /></a>&#160;</p>
<p>While the picture displayed on the page is 304px x 254px the original picture is loaded: 1693px x 1413px 280KB. Although you can resize a picture using the standard SharePoint functionality, all it does is, it includes the new size as in-line CSS styles. On each request the original picture is requested and resized by the browser. Including multiple of such pictures on your page increases the overall page size and makes the page load slower as more data has to be loaded by the browser.</p>
<p>You could of course resize the image to get this done correctly. You would first upload the original photo, fit it on the page, note the desired dimensions, open the picture in your favorite image editor, resize it, upload it to SharePoint and finally add it on the page. Can you imagine doing this every time you want to insert an image?</p>
<p>The answer is: you shouldn’t. This is where <a href="http://mavention.nl">Mavention</a> Smart Images come really useful.</p>
<h2>Mavention Smart Images</h2>
<p>Mavention Smart Images is a custom Solution that allows you to replace your original picture with a resized one on-the-fly without any manual work. This makes it really convenient to work with images and allows you to optimize your pages so that they can be loaded faster.</p>
<p>After installing the Solution a new Web Application Feature is installed in your Farm. Activating this Feature will enable support for dynamically resized images.</p>
<p><a href="http://mastykarz.nl/blog/images/OptimizingimageswithMaventionSmartImages_117EA/02.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Mavention Smart Images Web Application Feature" border="0" alt="Mavention Smart Images Web Application Feature" src="http://mastykarz.nl/blog/images/OptimizingimageswithMaventionSmartImages_117EA/02_thumb.png" width="480" height="337" /></a> </p>
<p>The next step is to activate the User Interface which will allow you to replace the URL of the original image with the URL of the Smart Image. In order to enable it you have to activate the Mavention Smart Images Site Collection Feature:</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Mavention Smart Images Site Collection Feature" border="0" alt="Mavention Smart Images Site Collection Feature" src="http://mastykarz.nl/blog/images/OptimizingimageswithMaventionSmartImages_117EA/03.png" width="476" height="231" /> </p>
<p>After you activate the Site Collection Feature you can start working with your images. As an example let’s optimize our flower image from the homepage.</p>
<h2>Working with Mavention Smart Images</h2>
<p>If you go to the Edit Mode and select an image, you will notice a new option in the Picture Tools on the Ribbon. The <em>Convert to Smart Image</em> button allows you to replace the original URL of your image with a URL that dynamically generates a resized version of your image.</p>
<p><a href="http://mastykarz.nl/blog/images/OptimizingimageswithMaventionSmartImages_117EA/04.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Convert to Smart Image button highlighted on the Ribbon." border="0" alt="Convert to Smart Image button highlighted on the Ribbon." src="http://mastykarz.nl/blog/images/OptimizingimageswithMaventionSmartImages_117EA/04_thumb.png" width="480" height="461" /></a> </p>
<p>After you click the <em>Convert to Smart Image</em> button, the image’s address changes into a dynamic URL. For example:</p>
<pre>
/SiteAssets/orange_flower.jpg</pre>
<p>becomes:</p>
<pre>
/image.png?img=/SiteAssets/orange_flower.jpg&amp;w=304px&amp;h=254px&amp;f=jpg</pre>
<p><a href="http://mastykarz.nl/blog/images/OptimizingimageswithMaventionSmartImages_117EA/05.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="After clicking the &#39;Convert to Smart Image&#39; button the URL has changed into the Smart Image URL." border="0" alt="After clicking the &#39;Convert to Smart Image&#39; button the URL has changed into the Smart Image URL." src="http://mastykarz.nl/blog/images/OptimizingimageswithMaventionSmartImages_117EA/05_thumb.png" width="480" height="436" /></a> </p>
<p>Let’s have a closer look at the generated URL. The <em>img</em> parameter contains a server-relative URL to the image that you want to resize. The <em>w</em> and <em>h</em> parameters specify respectively the width and height of the resized image. This is very cool since you can specify the new dimensions either absolutely (ie. using both width and height) or relatively by providing either the width or the height. Additionally you can even use percentages to resize the image!</p>
<p>The last parameter called <em>f</em> specifies the output format of the image. Supported formats are <em>png</em>, <em>jpg</em>, <em>jpeg</em> and <em>gif</em>. Depending on your scenario you might want to use different format. The best practice is to check which one of the provides the best quality/size ratio for your image.</p>
<p>So let’s have a look at the results of our work:</p>
<p><a href="http://mastykarz.nl/blog/images/OptimizingimageswithMaventionSmartImages_117EA/06.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Page statistics showing the resized picture loaded using the Mavention Smart Image URL." border="0" alt="Page statistics showing the resized picture loaded using the Mavention Smart Image URL." src="http://mastykarz.nl/blog/images/OptimizingimageswithMaventionSmartImages_117EA/06_thumb.png" width="480" height="539" /></a> </p>
<p>Notice the dimensions of the loaded image but also the size: 16KB instead of 280KB. See the difference?!</p>
<h2>Summary</h2>
<p>Mavention Smart Images is a great solution if you work a lot with images on your SharePoint website. In fact it is something that simplifies your daily work as a content manager on your corporate Internet-facing website. Using Mavention Smart Images you can dynamically resize and optimize your images without any manual work: Make SharePoint work for you!</p>
<p>Download: <a href="http://mavention.codeplex.com/releases/view/47590">Mavention Smart Images</a> (11KB, WSP) from <a href="http://www.codeplex.com">CodePlex</a></p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c8aaa3e0-7346-4347-9f42-e60d98c84009" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint" rel="tag">SharePoint</a>,<a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=uGQ-IIU1CgY:4ljYwNTfenk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=uGQ-IIU1CgY:4ljYwNTfenk:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=uGQ-IIU1CgY:4ljYwNTfenk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=uGQ-IIU1CgY:4ljYwNTfenk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=uGQ-IIU1CgY:4ljYwNTfenk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=uGQ-IIU1CgY:4ljYwNTfenk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=uGQ-IIU1CgY:4ljYwNTfenk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/uGQ-IIU1CgY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/dynamically-resizing-images-with-mavention-smart-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/dynamically-resizing-images-with-mavention-smart-images/</feedburner:origLink></item>
		<item>
		<title>Inconvenient Reusable Content List</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/TdfJuQXIFwg/</link>
		<comments>http://blog.mastykarz.nl/inconvenient-reusable-content-list/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 18:07:19 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Inconvenient SharePoint]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/inconvenient-reusable-content-list/</guid>
		<description><![CDATA[One of the great capabilities of SharePoint Server is the ability of including reusable content: standard snippets of HTML which you can use in different places over and over again without having to copy &#38; paste it. The great thing about Reusable Content is that you have the option to insert a reference instead of [...]]]></description>
			<content:encoded><![CDATA[<p>One of the great capabilities of SharePoint Server is the ability of including reusable content: standard snippets of HTML which you can use in different places over and over again without having to copy &amp; paste it. The great thing about Reusable Content is that you have the option to insert a reference instead of the copy of the content so that if the content snippet ever changes, you won’t have to manually check every single page in your site to ensure that the content is correct: SharePoint will do this for you automatically. While this piece of functionality is really great you wouldn’t believe how inconvenient it is to get to this list to add new content snippets in there.</p>
<h2>Two faces of the Reusable Content List</h2>
<p>From the Content Management point of view, the Reusable Content List is just an ordinary List located in the Root Web of your Site Collection. You can navigate to it using the View All Site Content option. Nothing special about it here.</p>
<p><a href="http://mastykarz.nl/blog/images/InconvenientReusableContentList_11406/reusablecontentlist.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Reusable Content List in the View All Site Content view" border="0" alt="Reusable Content List in the View All Site Content view" src="http://mastykarz.nl/blog/images/InconvenientReusableContentList_11406/reusablecontentlist_thumb.png" width="480" height="591" /></a> </p>
<p>If you enable using Reusable Content on your Site Collection, an option will appear in the Rich Text Editor allowing you to insert snippets of Reusable Content into the editor.</p>
<p><a href="http://mastykarz.nl/blog/images/InconvenientReusableContentList_11406/insertreusablecontent.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Insert Reusable Content option in the Rich Text Editor in SharePoint Server 2010" border="0" alt="Insert Reusable Content option in the Rich Text Editor in SharePoint Server 2010" src="http://mastykarz.nl/blog/images/InconvenientReusableContentList_11406/insertreusablecontent_thumb.png" width="480" height="362" /></a> </p>
<p>Given the benefits Reusable Content gives to the content editors it is a crime not to use it or at least not to educate the users about it.</p>
<p>From the code perspective the Reusable Content List – the List which stores all the snippets of reusable contents resembles a lot a system List – there is no easy way to get it…</p>
<h2>The challenges</h2>
<p>First of all let me note that both the Title and the Name of the Reusable Content List depend on the locale that you are using. So if you’re developing a Solution for a single locale, you might get away with hard coding the name of the list. If you however work on a real Solution that should support you-never-know-which-language, you have some extra work to do.</p>
<p>As I mentioned before the Reusable Content List resembles a hidden List from the code perspective. There is no public method available to retrieve either the instance, the name or the ID of this List. There are some internal properties but as the name says: it’s not something you can use in your code.</p>
<p>So how can you do it in a reliable or an acceptably-reliable way?</p>
<h2>The solution</h2>
<p>Probably the only reliable way of retrieving a reference to the Reusable Content List is by retrieving its ID and then getting a reference to this List using this ID.</p>
<p>The ID of the Reusable Content List is stored in the SPWeb.AllProperties property called <em>_ReusableContentListId</em>:</p>
<pre class="brush: csharp;">string reusableContentListIdPropertyName = &quot;_ReusableContentListId&quot;;
SPWeb rootWeb = SPContext.Current.Site.RootWeb;
if (rootWeb.AllProperties.ContainsKey(reusableContentListIdPropertyName))
{
    Guid reusableContentListId = new Guid(rootWeb.AllProperties[reusableContentListIdPropertyName] as string);
}</pre>
<p>Using the retrieved GUID you can now get a reference to the Reusable Content List to add your custom content snippets.</p>
<p>As I mentioned before this is only an acceptably reliable way as the name of the internal property that stored the ID of the Reusable Content List isn’t publicly available in the API and might be changed in the future versions of SharePoint. So if you’re using this functionality in your Solution, it adds an additional point to your checklist before upgrading to the next version.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1c983fdd-fc84-49d2-89f6-8d7ba30992ac" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint" rel="tag">SharePoint</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TdfJuQXIFwg:D9ATQvXatl0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TdfJuQXIFwg:D9ATQvXatl0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TdfJuQXIFwg:D9ATQvXatl0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=TdfJuQXIFwg:D9ATQvXatl0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TdfJuQXIFwg:D9ATQvXatl0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TdfJuQXIFwg:D9ATQvXatl0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=TdfJuQXIFwg:D9ATQvXatl0:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/TdfJuQXIFwg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/inconvenient-reusable-content-list/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/inconvenient-reusable-content-list/</feedburner:origLink></item>
		<item>
		<title>Inconvenient Pages List Name</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/f75W5tFimbY/</link>
		<comments>http://blog.mastykarz.nl/inconvenient-pages-list-name/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 17:26:55 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[WCM]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Inconvenient SharePoint]]></category>
		<category><![CDATA[Sandbox]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/inconvenient-pages-list-name/</guid>
		<description><![CDATA[While working on Microsoft Office SharePoint Server (MOSS) 2007 Web Content Management (WCM) Solutions you might have relied on the fact that the name of the Pages Library was always Pages. Well almost always, because in some languages, like German, it was translated along with the Title. Given that fact, changed the way we had [...]]]></description>
			<content:encoded><![CDATA[<p>While working on Microsoft Office SharePoint Server (MOSS) 2007 Web Content Management (WCM) Solutions you might have relied on the fact that the name of the Pages Library was always <em>Pages</em>. Well almost always, because in some languages, like German, it was translated along with the Title. Given that fact, changed the way we had to deal with the Pages Library in code. Instead of hard coding the URL part of the Pages Library, all of a sudden we had to retrieve it dynamically, just because someone accidentally translated the URL of the Pages Library. But looking at SharePoint Server 2010 tells us otherwise. Now the URL parts of Pages Libraries in all languages are translated. So was it a mistake in MOSS 2007 that in German the Pages Library was called <em>Seiten</em> or was it a mistake that the Dutch one was called <em>Pages</em> instead of <em>Paginas</em>?</p>
<p>No matter the answer to the above question, there is a lesson learned for the future: to never hard code the name of the Pages Library and always retrieve it when referring to the Pages Library. And it’s a shame, because it adds both extra complexity and performance penalty to your existing code.</p>
<p>Retrieving the name of the Pages Library in code is not difficult and can be done using the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.publishingweb.pageslistname.aspx">PublishingWeb.PagesListName</a> property. However in order to do that you have to have the instance of the PublishingWeb object first:</p>
<pre class="brush: csharp;">SPWeb web = SPContext.Current.Web;
PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(web);
string pagesListName = publishingWeb.PagesListName;</pre>
<p>Then you can use the value of the <em>pagesListName</em> variable to refer to the Pages Library in code.</p>
<p>Next to the complexity and performance penalty the above approach has one more flaw. Remember which namespaces are supported in Sandbox? Microsoft.SharePoint.Publishing is not among them. Unfortunately, if you want to retrieve the name of the Pages Library from within a Sandbox Solution you have to use a rather quirky approach of retrieving the value of the <em>__PagesListId</em> property stored in the SPWeb.AllProperties Property Bag.</p>
<pre class="brush: csharp;">string pagesListIdPropertyName = &quot;__PagesListId&quot;;
if (SPContext.Current.Web.AllProperties.ContainsKey(pagesListIdPropertyName))
{
    Guid pagesListId = new Guid(SPContext.Current.Web.AllProperties[pagesListIdPropertyName] as string);
}</pre>
<p>And while the above does the job, and it works in the Sandbox and with Anonymous users without elevating the privileges, it somehow doesn’t seem very reliable to me…</p>
<p>Having that all said makes me wonder one thing: how many MOSS 2007 WCM Solutions will break after upgrading to SharePoint Server 2010 because we used <em>Pages</em> instead of PublishingWeb.PagesListName?</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:bd26c3a2-24e7-4cc4-a635-ae4f937dbb37" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/WCM" rel="tag">WCM</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=f75W5tFimbY:d_L3nVOcu8c:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=f75W5tFimbY:d_L3nVOcu8c:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=f75W5tFimbY:d_L3nVOcu8c:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=f75W5tFimbY:d_L3nVOcu8c:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=f75W5tFimbY:d_L3nVOcu8c:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=f75W5tFimbY:d_L3nVOcu8c:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=f75W5tFimbY:d_L3nVOcu8c:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/f75W5tFimbY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/inconvenient-pages-list-name/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/inconvenient-pages-list-name/</feedburner:origLink></item>
		<item>
		<title>Creating multilingual Site Definitions with Visual Studio 2010 SharePoint Development Tools</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/gpzywE7mo08/</link>
		<comments>http://blog.mastykarz.nl/creating-multilingual-site-definitions-visual-studio-2010-sharepoint-development-tools/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 15:56:40 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/creating-multilingual-site-definitions-visual-studio-2010-sharepoint-development-tools/</guid>
		<description><![CDATA[When working on SharePoint Solutions one of the common requirements is delivering multilingual solutions. Depending on your scenario you might either need to localize a single Web Part or a complete Solution. Thinking of multiple languages you have to take into account not only the development but also the packaging process for all the different [...]]]></description>
			<content:encoded><![CDATA[<p>When working on SharePoint Solutions one of the common requirements is delivering multilingual solutions. Depending on your scenario you might either need to localize a single Web Part or a complete Solution. Thinking of multiple languages you have to take into account not only the development but also the packaging process for all the different assets in your Solution. One of such assets, where implementing support for multiple languages in SharePoint 2010 might seem complex at first sight, are Site Definitions. However you can easily create a multilingual Site Definition using nothing more than the standard capabilities&#160; of the new Visual Studio 2010 SharePoint Developer Tools.</p>
<p>If you look at the new Visual Studio 2010 SharePoint Developer Tools, it seems like they have no support for localizing custom Site Definitions at first. If you create a custom Site Definition using the standard toolset, you get a Site Definition that is bound to a specific language by the Deployment Location of the WebTemp*.xml file.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Custom Site Definition created using the Visual Studio 2010 SharePoint Developer Tools" border="0" alt="Custom Site Definition created using the Visual Studio 2010 SharePoint Developer Tools" src="http://mastykarz.nl/blog/images/CreatingmultilingualSiteDefinitionswithV_111A0/sd1.png" width="360" height="624" /> </p>
<p>As you might know, localized Site Definitions share all the resources except for the WebTemp*.xml file. The WebTemp*.xml file contains the localized names of the specific Configurations and points to the shared onet.xml file. While the name of the WebTemp*.xml file doesn’t matter that much (as long as it matches the <em>WebTemp*.xml</em> pattern) it is a good practice to append the the identifier of your custom Site Collection to the WebTemp prefix to make it easier to track all Site Definitions installed in the Farm.</p>
<p>If you look at the custom Site Definition that gets created by the Visual Studio 2010 SharePoint Developer Tools you might see one challenge with delivering a multilingual Site Definition. As you can see all files (default.aspx, onet.xml and WebTemp*.xml) are in the same directory. In order to deliver the translated version of your Site Definition in another language you would have to create a copy of the WebTemp*.xml file, but you cannot have two files with the same name in the same directory, can you? So what are the options?</p>
<h2>A few approaches that are not quite what you really want…</h2>
<p>First of all you could create a new Site Definition project for every translation of your Site Definition. By sharing the common files like pages and onet.xml you could get the job done, but it would make the packaging process unnecessarily complex. First of all you would have a few projects with only a couple of files, and additionally you would end up hacking the identifiers to get it all right.</p>
<p>Another thing that you might try is to choose a different name for every WebTemp*.xml file, for example one that includes the locale like: WebTempMySiteDef1033.xml. This would definitely work and it would allow you to get it all done within a single project. It would be quite quirky though with all the different names and definitely not intuitive for someone not involved with the project during the development stage as it doesn’t follow the good practices. But there is however one more approach worth trying…</p>
<h2>Creating multilingual Site Definitions the proper way</h2>
<p>One more thing that you could do is to create a directory named after the locale for every language that your Site Definition should support. That would allow you to use the same names for the WebTemp*.xml files and would prevent you from using hacks and dodgy workarounds.</p>
<p>The first step in this approach is to create a regular Site Definition using the Site Definition SharePoint Project Template.</p>
<p><a href="http://mastykarz.nl/blog/images/CreatingmultilingualSiteDefinitionswithV_111A0/sd1_3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Creating a custom Site Definition using the Site Definition SharePoint Project Template" border="0" alt="Creating a custom Site Definition using the Site Definition SharePoint Project Template" src="http://mastykarz.nl/blog/images/CreatingmultilingualSiteDefinitionswithV_111A0/sd1_thumb.png" width="480" height="332" /></a> </p>
<p>Then you would create a directory named after locale for every locale that your Site Definition must support:</p>
<p><a href="http://mastykarz.nl/blog/images/CreatingmultilingualSiteDefinitionswithV_111A0/sd2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Custom directories created for every locale supported by the Site Definition" border="0" alt="Custom directories created for every locale supported by the Site Definition" src="http://mastykarz.nl/blog/images/CreatingmultilingualSiteDefinitionswithV_111A0/sd2_thumb.png" width="358" height="310" /></a> </p>
<p>The next step is to move the original WebTemp*.xml file to one of the locale directories and copy it to all the other locale directories translating the contents to match the locale:</p>
<p><a href="http://mastykarz.nl/blog/images/CreatingmultilingualSiteDefinitionswithV_111A0/sd3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Site Definition with folders for every locale supported. Each locale folder contains a WebTemp*.xml file named after the Site Definition." border="0" alt="Site Definition with folders for every locale supported. Each locale folder contains a WebTemp*.xml file named after the Site Definition." src="http://mastykarz.nl/blog/images/CreatingmultilingualSiteDefinitionswithV_111A0/sd3_thumb.png" width="360" height="310" /></a> </p>
<p>The final piece of the puzzle is to change the Deployment Location of each of the WebTemp*.xml files so that they are deployed to the location specified by the locale folder. You can do that using the Properties Window of every WebTemp*.xml file:</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Changing the Deployment Location for a WebTemp*.xml file using the Properties Window" border="0" alt="Changing the Deployment Location for a WebTemp*.xml file using the Properties Window" src="http://mastykarz.nl/blog/images/CreatingmultilingualSiteDefinitionswithV_111A0/sd4.png" width="360" height="633" /> </p>
<p>And that’s it. Using this simple solution you can develop and package a multilingual Site Definition using the standard capabilities of the Visual Studio 2010 SharePoint Developer Tools and not a single hack!</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:af5a6ef1-bde7-43b8-a1cd-cbe7b4cae917" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/Visual+Studio+2010" rel="tag">Visual Studio 2010</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=gpzywE7mo08:FHugnPlRSvY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=gpzywE7mo08:FHugnPlRSvY:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=gpzywE7mo08:FHugnPlRSvY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=gpzywE7mo08:FHugnPlRSvY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=gpzywE7mo08:FHugnPlRSvY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=gpzywE7mo08:FHugnPlRSvY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=gpzywE7mo08:FHugnPlRSvY:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/gpzywE7mo08" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/creating-multilingual-site-definitions-visual-studio-2010-sharepoint-development-tools/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/creating-multilingual-site-definitions-visual-studio-2010-sharepoint-development-tools/</feedburner:origLink></item>
		<item>
		<title>Did you know: configuring Solution Dependencies in SharePoint 2010</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/NHJB-9V5UbI/</link>
		<comments>http://blog.mastykarz.nl/configuring-solution-dependencies-sharepoint-2010/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 06:54:02 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/configuring-solution-dependencies-sharepoint-2010/</guid>
		<description><![CDATA[When SharePoint 2007 shipped with the Features and Solutions framework we thought we had it all sorted out. We were able to package our work and deploy it in a structured and repeatable manner. Using Feature Activation Dependencies we were able to ensure that all the functionality that our components require are available prior to [...]]]></description>
			<content:encoded><![CDATA[<p>When SharePoint 2007 shipped with the Features and Solutions framework we thought we had it all sorted out. We were able to package our work and deploy it in a structured and repeatable manner. Using Feature Activation Dependencies we were able to ensure that all the functionality that our components require are available prior to provision our custom functionality. And while Feature Dependencies are definitely a great concept they are unfortunately incomplete. If all the different pieces come from a single Solution then Feature Dependencies are sufficient. However if your resources are spread across different Solution the only piece of feedback you will get from Feature Dependencies is message saying that a Feature with some id is missing in your Farm. Luckily this situation has changed with SharePoint 2010 and the introduction of Solution Dependencies.</p>
<h2>What is?</h2>
<p>Solution Dependencies are a new concept in SharePoint 2010 and are very similar to Feature Dependencies. From the functional point of view they allow you to specify additional resources that are required for your Solution to work properly. Technically there are some differences between Feature and Solution Dependencies.</p>
<p>As you might have known, if you configure the Feature Dependencies in such way, that your Feature depends on another Feature which is hidden, that hidden Feature will be automatically activated if necessary prior to activating your Feature. Visible Features don’t get automatically activated and SharePoint returns an error message saying that another Feature must be activated before you can activate yours. If you specify a Solution Dependency to another Solution which hasn’t been installed/deployed yet, SharePoint will not do anything about it, and all you will get is an error message saying that the particular Solution is missing. This is a great validation mechanism for you to ensure that all resources required by your Solution have been deployed correctly.</p>
<h2>Solution Dependencies 101</h2>
<p>Specifying Solution Dependencies is very easy. You can specify one or more dependencies using the <a href="http://msdn.microsoft.com/en-us/library/ff512761.aspx">ActivationDependency Element</a> in the Solution Manifest, for example:</p>
<pre class="brush: xml;">&lt;Solution&gt;
  &lt;ActivationDependencies&gt;
    &lt;ActivationDependency SolutionId=&quot;00000000-0000-0000-0000-000000000001&quot;/&gt;
  &lt;/ActivationDependencies&gt;
&lt;/Solution&gt;</pre>
<p>Then during the deployment process SharePoint will check if all Solutions specified in the ActivationDependencies section have been deployed and will return an error message if one or more solutions have not been found:</p>
<p><a href="http://mastykarz.nl/blog/images/DidyouknowconfiguringSolutiondependencie_7028/error1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Error message saying that a solution cannot be activated because it depends on another solution which doesn&#39;t exist." border="0" alt="Error message saying that a solution cannot be activated because it depends on another solution which doesn&#39;t exist." src="http://mastykarz.nl/blog/images/DidyouknowconfiguringSolutiondependencie_7028/error1_thumb.png" width="480" height="258" /></a> </p>
<p>As you can see the error message takes you a step further but it’s still not very useful providing only the Solution ID. This is quite useless especially if you’re working with third party Solutions and the only way to get the Solution ID is to extract the Manifest.xml from each Solution Package.</p>
<p>That’s why SharePoint allows you to provide additional information for every Solution Dependency. While SolutionId is the only value required you can also include the name of the Solution file, the Title of the Solution and its url (?). Of all this information only the Solution filename is being included in the error message:</p>
<p><a href="http://mastykarz.nl/blog/images/DidyouknowconfiguringSolutiondependencie_7028/error2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Error message saying that a solution cannot be activated because it depends on another solution that doesn&#39;t exist. Next to the solution Id also the solution filename is being named." border="0" alt="Error message saying that a solution cannot be activated because it depends on another solution that doesn&#39;t exist. Next to the solution Id also the solution filename is being named." src="http://mastykarz.nl/blog/images/DidyouknowconfiguringSolutiondependencie_7028/error2_thumb.png" width="480" height="259" /></a> </p>
<p>At this moment Visual Studio 2010 SharePoint Developer Tools don’t provide any User Interface to specify Solution Dependencies. It can be however easily done by <a href="/extending-solution-manifest-intellisense/">editing the Solution Manifest in the XML Editor</a>.</p>
<h2>Summary</h2>
<p>Solution Dependencies are a new concept introduced with SharePoint 2010. Solution Dependencies allow you to easily check if all resources required by your Solution are available prior to deploying it. By specifying additional information next to the ID of the required Solution you make it easier to track and install the missing resources.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8bd7bbcd-59e9-4526-b6f8-7b768630a077" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=NHJB-9V5UbI:DKLY-7yVCpA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=NHJB-9V5UbI:DKLY-7yVCpA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=NHJB-9V5UbI:DKLY-7yVCpA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=NHJB-9V5UbI:DKLY-7yVCpA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=NHJB-9V5UbI:DKLY-7yVCpA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=NHJB-9V5UbI:DKLY-7yVCpA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=NHJB-9V5UbI:DKLY-7yVCpA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/NHJB-9V5UbI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/configuring-solution-dependencies-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/configuring-solution-dependencies-sharepoint-2010/</feedburner:origLink></item>
		<item>
		<title>Did you know: provisioning AppGlobalResources in SharePoint 2010</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/4OHurLXpcVU/</link>
		<comments>http://blog.mastykarz.nl/provisioning-appglobalresources-sharepoint-2010/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 05:17:59 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Structured and repeatable deployment]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/provisioning-appglobalresources-sharepoint-2010/</guid>
		<description><![CDATA[Developing localized solutions on the SharePoint 2007 platform wasn’t as straight-forward as we wanted it to be. First of all you had to make your code support globalization and then you had to provision the localized Resource files to your Web Application. As SharePoint 2007 didn’t provide any mechanism to do that, you had to [...]]]></description>
			<content:encoded><![CDATA[<p>Developing localized solutions on the SharePoint 2007 platform wasn’t as straight-forward as we wanted it to be. First of all you had to make your code support globalization and then you had to provision the localized Resource files to your Web Application. As SharePoint 2007 didn’t provide any mechanism to do that, you had to use custom Timer Jobs to get this done correctly. Luckily this situation has changed with SharePoint 2010 which introduces the new <a href="http://msdn.microsoft.com/en-us/library/ff595307.aspx">App_GlobalResourceFile</a> element in the Solution Manifest which makes it possible to declaratively deploy Resource files in a structured and repeatable fashion.</p>
<p>Provisioning Resource files to your Web Application is very straight forward. All you have to do is to include your Resource file in the Solution using the App_GlobalResourceFile element, for example:</p>
<pre class="brush: xml;">&lt;Solution&gt;
  &lt;ApplicationResourceFiles&gt;
    &lt;App_GlobalResourceFile Location=&quot;MyResource.resx&quot;/&gt;
  &lt;/ApplicationResourceFiles&gt;
&lt;/Solution&gt;</pre>
<p>Using the snippet above will copy your resource file to the Web Application’s IIS directory\App_GlobalResources during the deployment process.</p>
<p>Provisioning the Resource files in SharePoint 2010 is even easier if you’re using the new Visual Studio 2010 SharePoint Developer Tools. In such case all you have to do is to add an Empty Element SharePoint Project Item to your project and underneath it add your Resource file. As soon as you do that, the Resource file will allow you set additional property called <em>Deployment Type</em>. In order to deploy the Resource file to App_GlobalResources you have to set the value of the <em>Deployment Type</em> property to <em>AppGlobalResource</em>.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Resource file selected in the Solution Explorer window." border="0" alt="Resource file selected in the Solution Explorer window." src="http://mastykarz.nl/blog/images/DidyouknowprovisioningAppGlobalResources_6096/resource.png" width="357" height="542" />&#160;</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:65a7b8fe-a960-4388-ad28-a54f19b43c89" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/Visual+Studio+2010" rel="tag">Visual Studio 2010</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=4OHurLXpcVU:dzyzp_fTYTE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=4OHurLXpcVU:dzyzp_fTYTE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=4OHurLXpcVU:dzyzp_fTYTE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=4OHurLXpcVU:dzyzp_fTYTE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=4OHurLXpcVU:dzyzp_fTYTE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=4OHurLXpcVU:dzyzp_fTYTE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=4OHurLXpcVU:dzyzp_fTYTE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/4OHurLXpcVU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/provisioning-appglobalresources-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/provisioning-appglobalresources-sharepoint-2010/</feedburner:origLink></item>
		<item>
		<title>Did you know: using Developer Dashboard for monitoring performance of your solutions</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/SSguVVzHhTE/</link>
		<comments>http://blog.mastykarz.nl/developer-dashboard-monitoring-performance-solutions/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 18:46:02 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/developer-dashboard-monitoring-performance-solutions/</guid>
		<description><![CDATA[SharePoint 2010 ships with Developer Dashboard which allows you to see how well different pieces of SharePoint are performing. And while it’s extremely useful by itself, it becomes even more important when used to measure the performance of your custom code!
Logging the performance of your custom code to Developer Dashboard is really easy. All you [...]]]></description>
			<content:encoded><![CDATA[<p>SharePoint 2010 ships with Developer Dashboard which allows you to see how well different pieces of SharePoint are performing. And while it’s extremely useful by itself, it becomes even more important when used to measure the performance of your custom code!</p>
<p>Logging the performance of your custom code to Developer Dashboard is really easy. All you have to do is to wrap a block of your code in a using clause and that’s it:</p>
<pre class="brush: csharp;">protected override void CreateChildControls()
{
    using (new SPMonitoredScope(&quot;My code block (WebPart1)&quot;))
    {
        Thread.Sleep(50);
    }
}</pre>
<p>Will log the following message to the Developer Dashboard:</p>
<p><a href="http://mastykarz.nl/blog/images/UsingDeveloperDashboardformonitoringperf_11B1B/simplelogging.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Single messaged logged to the Developer Dashboard." border="0" alt="Single messaged logged to the Developer Dashboard." src="http://mastykarz.nl/blog/images/UsingDeveloperDashboardformonitoringperf_11B1B/simplelogging_thumb.png" width="419" height="474" /></a>&#160; </p>
<p>That’s not all. You can also nest messages to provide some more granular information about your code. All you have to do is to nest the using statements and the Developer Dashboard will do the rest for you:</p>
<pre class="brush: csharp;">protected override void CreateChildControls()
{
    using (new SPMonitoredScope(&quot;My code block (WebPart1)&quot;))
    {
        using (new SPMonitoredScope(&quot;My first block (WebPart1)&quot;))
        {
            Thread.Sleep(10);
        }

        using (new SPMonitoredScope(&quot;My second block (WebPart1)&quot;))
        {
            Thread.Sleep(20);
        }

        using (new SPMonitoredScope(&quot;My third block (WebPart1)&quot;))
        {
            Thread.Sleep(30);
        }
    }
}</pre>
<p>Notice the nested overview in the Developer Dashboard:</p>
<p><a href="http://mastykarz.nl/blog/images/UsingDeveloperDashboardformonitoringperf_11B1B/nestedlogging.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Multiple nested messages logged to the Developer Dashboard." border="0" alt="Multiple nested messages logged to the Developer Dashboard." src="http://mastykarz.nl/blog/images/UsingDeveloperDashboardformonitoringperf_11B1B/nestedlogging_thumb.png" width="425" height="513" /></a>&#160; </p>
<p>One thing to remember about the Developer Dashboard is that you cannot log the performance of your code from Sandbox Solutions. The SPMonitoredScope class responsible for measuring the performance of your code and logging it to the Developer Dashboard doesn’t belong to the types supported in the Sandbox at this moment.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:86995257-7d98-424c-a7e5-a198a210ebe1" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=SSguVVzHhTE:z97ncTRt2_U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=SSguVVzHhTE:z97ncTRt2_U:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=SSguVVzHhTE:z97ncTRt2_U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=SSguVVzHhTE:z97ncTRt2_U:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=SSguVVzHhTE:z97ncTRt2_U:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=SSguVVzHhTE:z97ncTRt2_U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=SSguVVzHhTE:z97ncTRt2_U:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/SSguVVzHhTE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/developer-dashboard-monitoring-performance-solutions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/developer-dashboard-monitoring-performance-solutions/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.550 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-07-25 17:10:55 -->
