<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Molten Core</title>
	<atom:link href="http://mcore.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mcore.wordpress.com</link>
	<description>Commenting Sitecore...</description>
	<lastBuildDate>Thu, 12 Nov 2009 20:58:03 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='mcore.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/1c7460a0a1c24eed57fdab5b9dd721fd?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Molten Core</title>
		<link>http://mcore.wordpress.com</link>
	</image>
			<item>
		<title>Will dynamics in .NET 4 change the way we do Sitecore?</title>
		<link>http://mcore.wordpress.com/2009/11/12/will-dynamics-in-net-4-change-the-way-we-do-sitecore/</link>
		<comments>http://mcore.wordpress.com/2009/11/12/will-dynamics-in-net-4-change-the-way-we-do-sitecore/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 20:20:04 +0000</pubDate>
		<dc:creator>Eldblom</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[New releases]]></category>
		<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[TechEd]]></category>

		<guid isPermaLink="false">http://mcore.wordpress.com/?p=208</guid>
		<description><![CDATA[I am spending my time these days walking the halls of Berlin Messe at the Microsoft TechEd 2009. One of the interesting upcoming features of .NET 4 is the introduction of dynamic language support in the .NET Language Runtime. This does not only mean that you can write your .NET code in dynamic languages such as Python (IronPython) and Ruby (IronRuby), but also that you can use some of the dynamic features from C#. <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=208&subd=mcore&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I am spending my time these days walking the halls of Berlin Messe at the <a href="http://www.microsoft.com/europe/TechEd/">Microsoft TechEd 2009</a>. One of the interesting upcoming features of .NET 4 is the introduction of dynamic language support in the .NET Language Runtime. This does not only mean that you can write your .NET code in dynamic languages such as Python (<a href="http://www.codeplex.com/wikipage?ProjectName=IronPython">IronPython</a>) and Ruby (<a href="http://ironruby.net/">IronRuby</a>), but also that you can use some of the dynamic features from C#. With the introduction of the <em>dynamic</em> type keyword, method calls and member access can be evaluated at runtime instead of at compile time (previously known as late-binding). This does not mean that C# is no longer a type safe language, it merely means that the language now provides a more &#8220;syntax correct&#8221; way of accessing those dynamic types of data, we previously used to access via strings, invokation, reflection etc. Examples of dynamic data models includes COM, the HTML DOM and XML.
</p>
<p>Another one of the dynamic types of data we all works with each day, is Sitecore. The structure, i.e. templates and fields, we are coding up against changes constantly, and Sitecore provides a string based way to access specific items and fields and values in fields. Some of these dynamic types are exposed via classes in the Sitecore API, e.g. the fields type classes in the Sitecore.Data.Fields namespace.  In Pentia we have a concept we call Sitecore wrapper classes, i.e. classes which we custom write to provide a proper interface to items of a given template. Writing these classes are tedious and potentially error-prone, which is why we are working on code generator for generating these classes (similar to e.g. LINQ to SQL). But with dynamics in .NET 4, we have a way of eliminating these classes completely, while still maintaining a proper syntax &#8211; and hopefully Sitecore will implement this to our common advantage. Here is an example of how code from the current version could look in a future version of Sitecore:
</p>
<pre class="brush: csharp;">

//BEFORE: .NET 3.5 Framework, Sitecore 6
public string GetContextItemDocumentImage() {
  Item item = Sitecore.Context.Item;
  ImageField field = ((ImageField)item.Fields[&quot;DocumentImage&quot;]);
  return field.Src;
}

//AFTER .NET 4 Framework, Sitecore 7?
public string GetContextItemDocumentImage()
{
  dynamic item = Sitecore.Context.Item;
  return item.DocumentImage.Src;
}
</pre>
<p>Note that although the syntax differs, the actual functionality executed in both example would be the same. So, what does it require from Sitecore to do this? The secret lies in the <a href="http://msdn.microsoft.com/en-us/library/system.dynamic.idynamicmetaobjectprovider(VS.100).aspx">System.Dynamics. IDynamicMetaObjectProvider</a> interface or more easily, the <a href="http://msdn.microsoft.com/en-us/library/system.dynamic.dynamicobject(VS.100).aspx">DynamicObject</a> class. This interface and class allows the derived class to provide its own resolving to e.g. members access and method calls via a number of virtual methods. The methods are Try based, which means that you should return false if the functionality is not supported, or e.g. a method with an invalid method is called. Some of the most important virtual methods which can be implemented via DynamicObject are:
</p>
<div>
<table style="border-collapse:collapse;" border="0">
<col>
<col>
<tbody valign="top">
<tr>
<td style="padding-left:7px;padding-right:7px;border-top:solid black .5pt;border-left:solid black .5pt;border-bottom:solid black .5pt;border-right:solid black .5pt;">
<p>TryConvert</p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:solid black .5pt;border-left:none;border-bottom:solid black .5pt;border-right:solid black .5pt;">
<p>A cast is attempted, trying to convert the dynamic type to a static.</p>
</td>
</tr>
<tr>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid black .5pt;border-bottom:solid black .5pt;border-right:solid black .5pt;">
<p>TryGetIndex</p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid black .5pt;border-right:solid black .5pt;">
<p>An indexer is called, trying to get a value with a given id or index.</p>
</td>
</tr>
<tr>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid black .5pt;border-bottom:solid black .5pt;border-right:solid black .5pt;">
<p>TryGetMember</p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid black .5pt;border-right:solid black .5pt;">
<p>There is an attempt to get the value of a named member (e.g. a field or property)</p>
</td>
</tr>
<tr>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid black .5pt;border-bottom:solid black .5pt;border-right:solid black .5pt;">
<p>TryInvokeMember</p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid black .5pt;border-right:solid black .5pt;">
<p>A method with a given name and parameters is invoked.</p>
</td>
</tr>
<tr>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid black .5pt;border-bottom:solid black .5pt;border-right:solid black .5pt;">
<p>TrySetIndex</p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid black .5pt;border-right:solid black .5pt;">
<p>There is an attempt to set the value in an indexer with the given id or index.</p>
</td>
</tr>
<tr>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid black .5pt;border-bottom:solid black .5pt;border-right:solid black .5pt;">
<p>TrySetMember</p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid black .5pt;border-right:solid black .5pt;">
<p>There is an attempt to get the value of a named member (e.g. a field or property)</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
 </p>
<p>An example of the above Sitecore 7 (:-)) implementation could therefore be:
</p>
<pre class="brush: csharp;">
namespace Sitecore.Data.Items
{
  public class Item : DynamicObject //...and other interfaces
  {
    //...
    public override bool TryGetMember(GetMemberBinder binder, out object result)
    {
      dynamic field = Fields[binder.Name];
      if (field != null) {
        result = field;
        return true;
      }
     	return base.TryGetMember(binder, out result);
    }
    //...
  }
}
</pre>
<p>Let this be an inspiration to Sitecore for the next version – I for one truly hope we see something like this in the product.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcore.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcore.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcore.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcore.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcore.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcore.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcore.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcore.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcore.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcore.wordpress.com/208/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=208&subd=mcore&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcore.wordpress.com/2009/11/12/will-dynamics-in-net-4-change-the-way-we-do-sitecore/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9ebef7d147872a290a73b7d8d0f4ab52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Eldblom</media:title>
		</media:content>
	</item>
		<item>
		<title>Dedicated image server and Sitecore</title>
		<link>http://mcore.wordpress.com/2009/11/02/dedicated-image-server-and-sitecore/</link>
		<comments>http://mcore.wordpress.com/2009/11/02/dedicated-image-server-and-sitecore/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 23:56:00 +0000</pubDate>
		<dc:creator>Jens Mikkelsen</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Sitecore modules]]></category>
		<category><![CDATA[Software Architecture]]></category>

		<guid isPermaLink="false">http://mcore.wordpress.com/?p=202</guid>
		<description><![CDATA[A lot of sites which have a large amount of visitors use a dedicated image server.  There are several reasons for this, but mostly it is because that most browsers only allow a few simultaneous connections to the same domain, which stalls the download of a page that has more than two resources. For instance [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=202&subd=mcore&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A lot of sites which have a large amount of visitors use a dedicated image server.  There are several reasons for this, but mostly it is because that most browsers only allow a few simultaneous connections to the same domain, which stalls the download of a page that has more than two resources. For instance imagine you have a page consisting of multiple images, stylesheets and javascript files. As the clients only allows a few simultaneous downloads, the browser won’t download all the resources at the same time, but wait for each download to complete and first then start the next download.</p>
<p>The reason of this behavior is that the HTTP standard says that only two simultaneous connections between a client and a server should be allowed. This was specified to save servers from heavy IO load, when files where requested. Browsers like IE7 and Firefox 2 lives up to this standard and only allow 2 connections, while new browsers like IE8 and Firefox 3 allows 6 connections.<br />
To ensure that the HTML can be fully loaded independently and without waiting for other downloads and to remove the load from the primary web server; a dedicated image server can be used. This server holds all files and uses a different domain (for instance images.mydomain.com). All files used on the page can then be fully referenced and thereby be downloaded from a different domain. Eg &lt;img src=”http://images.mydomain.com/image1.jpg alt=”image1”/&gt;. As the images are now on a different domain, these can be requested independently of the server providing the HTML and more simultaneous connections can be opened.</p>
<p>But how is this possible in Sitecore where the media library controls all the images?</p>
<p>One of the easiest ways is to have another publishing target for the media. In that way you will have two frontend servers: One serving the normal requests and one serving all media items. You can easily set up another publishing target and for instance use the staging module to clear the cache. <a title="SDN guide" href="http://sdn.sitecore.net/Articles/Administration/Sitecore%20Publishing%20Operations/Publishing%20Targets.aspx" target="_blank">Read more on SDN </a>if you want to know how to set it up.</p>
<p>The remaining problem is: How do we ensure that all media items gets prefixed with another domain? Unfortunately there isn’t a simple setting for this (it will probably come in a future a release of Sitecore &#8211; I hope <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ). However there is a simple solution to the problem as links are expanded by the LinkProvider, which can be overridden. More precisely the links are expanded in the LinkProvider.ExpandDynamicLink method, so we need to override this replacing the media path:</p>
<p>namespace TestApplication<br />
{<br />
  public class CustomLinkProvider : LinkProvider<br />
  {<br />
    public const string MEDIA_PATH = &#8220;~/media/&#8221;;</p>
<p>    public override string ExpandDynamicLinks(string text, bool resolveSites)<br />
    {<br />
      string baseExpands = base.ExpandDynamicLinks(text, resolveSites);<br />
      return baseExpands.Replace(MEDIA_PATH, &#8220;<a href="http://images.pentia.dk/">http://images.pentia.dk/</a>&#8221; + MEDIA_PATH);<br />
    }<br />
  }<br />
}</p>
<p>Here I override the ExpandDynamicLinks in the inherited class CustomLinkProvider. I replace all media paths (identified by the prefix ~/media/) and replace it with the full path to the image server. The remaining thing to do is to replace the LinkProvider type in the web.config:</p>
<p>&lt;linkManager defaultProvider=&#8221;sitecore&#8221;&gt;<br />
  &lt;providers&gt;<br />
    &lt;clear /&gt;<br />
    &lt;add name=&#8221;sitecore&#8221; type=&#8221;<strong><em>TestApplication.CustomLinkProvider, TestApplication</em></strong>&#8221; addAspxExtension=&#8221;true&#8221; alwaysIncludeServerUrl=&#8221;false&#8221; encodeNames=&#8221;true&#8221; languageEmbedding=&#8221;asNeeded&#8221; languageLocation=&#8221;filePath&#8221; shortenUrls=&#8221;true&#8221; useDisplayName=&#8221;false&#8221; /&gt;<br />
  &lt;/providers&gt;<br />
&lt;/linkManager&gt;</p>
<p>Here I just point the LinkProvider type to my own implementation.</p>
<p>Now that this is set up, all requests for media items will be handled by the image server. This does not just allow faster load times for the client, but will put less pressure on the main server. Further you can tune the media server to handling media items by increasing the media cache, setting the prefetch cache etc.</p>
<p>Enjoy your new Sitecore media server <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcore.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcore.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcore.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcore.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcore.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcore.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcore.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcore.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcore.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcore.wordpress.com/202/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=202&subd=mcore&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcore.wordpress.com/2009/11/02/dedicated-image-server-and-sitecore/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/df4c1f864ec5c9c21f8e21c6a7cc07d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jens Mikkelsen</media:title>
		</media:content>
	</item>
		<item>
		<title>Why can’t I download the latest version of Sitecore?</title>
		<link>http://mcore.wordpress.com/2009/09/27/why-can%e2%80%99t-i-download-the-latest-version-of-sitecore/</link>
		<comments>http://mcore.wordpress.com/2009/09/27/why-can%e2%80%99t-i-download-the-latest-version-of-sitecore/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 21:51:44 +0000</pubDate>
		<dc:creator>Jens Mikkelsen</dc:creator>
				<category><![CDATA[New releases]]></category>
		<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[release management]]></category>

		<guid isPermaLink="false">http://mcore.wordpress.com/?p=194</guid>
		<description><![CDATA[I have earlier questioned Sitecores way of releasing new versions. You can read the full discussion here: http://sdn.sitecore.net/SDN5/Forum/ShowPost.aspx?PostID=17750. The whole notion of Sitecore having “recommended” and “not recommended” releases are to me rather strange. Especially considering the frequency of when new versions gets to the “recommended” level. For instance it is at the moment not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=194&subd=mcore&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have earlier questioned Sitecores way of releasing new versions. You can read the full discussion here: <a href="http://sdn.sitecore.net/SDN5/Forum/ShowPost.aspx?PostID=17750">http://sdn.sitecore.net/SDN5/Forum/ShowPost.aspx?PostID=17750</a>. The whole notion of Sitecore having “recommended” and “not recommended” releases are to me rather strange. Especially considering the frequency of when new versions gets to the “recommended” level. For instance it is at the moment not possible to use a recommended version of Sitecore which supports Sitecore OMS!</p>
<p>In Pentia we finally got to that point, where we just decided to ignore the recommended label and upgrade and use the latest released version, as it seems rather arbitrary whether a version is recommended or not. This means that I wanted to download the latest version of Sitecore… But guess what. That is not possible. You have to download the release 090630; install it and then afterward download and install <em>two</em> updates.</p>
<p>So I couldn’t help but wonder… Why can’t I download a package containing the latest release of Sitecore?</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcore.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcore.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcore.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcore.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcore.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcore.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcore.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcore.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcore.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcore.wordpress.com/194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=194&subd=mcore&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcore.wordpress.com/2009/09/27/why-can%e2%80%99t-i-download-the-latest-version-of-sitecore/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/df4c1f864ec5c9c21f8e21c6a7cc07d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jens Mikkelsen</media:title>
		</media:content>
	</item>
		<item>
		<title>Google Search Appliance, cool API&#8217;s</title>
		<link>http://mcore.wordpress.com/2009/09/25/google-search-appliance-cool-apis/</link>
		<comments>http://mcore.wordpress.com/2009/09/25/google-search-appliance-cool-apis/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 14:53:10 +0000</pubDate>
		<dc:creator>Eldblom</dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://mcore.wordpress.com/?p=188</guid>
		<description><![CDATA[
Me and my colleague Brian Pedersen have been spending time in London (thx to Google London and Dave Gallerizzo of Fig Leaf) this week looking into the Google Search Appliance (GSA) &#8211; which is a really cool search product which I hope we will implement in a lot of future solutions. By the way, Pentia [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=188&subd=mcore&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img src="http://www.google.com/enterprise/gsa/images/gsa2.jpg" alt="Google Search Appliance" /></p>
<p>Me and my colleague <a href="http://briancaos.wordpress.com/">Brian Pedersen</a> have been spending time in London (thx to Google London and Dave Gallerizzo of <a href="http://www.figleaf.com/Company/Executive_Team.cfm#CP_JUMP_651">Fig Leaf</a>) this week looking into the Google Search Appliance (GSA) &#8211; which is a really cool search product which I hope we will implement in a lot of future solutions. By the way, <a href="http://www.pentia.net">Pentia</a> is now a Google Enterprise Partner <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The GSA though, is a double edged knife &#8211; on one hand, it provides really good value out of the box (best of class in search relevance), and has a lot of nice features and configuration possibilities. On the other hand, the configuration interface on the GSA sucks! yes, it sucks! I would never expect any end-users to understand what happens in the UI, and in worst case, they will mess up the nice out-of-the-box functionality. Said in other words: the summer intern who wrote the config UI should be definately find work in a non-computer related sector.<br />
This said, the GSA has some really cool API&#8217;s, which will allow you to provide nice functionality for your users:</p>
<p><strong>Admin API</strong><br />
If you consider integrating a GSA in a Sitecore (or any CMS) solution, you should consider integrating some of the configuration directly in the CMS backend. Imagine users being able to tweak the biasing of content, or adding content to the &#8220;recommended&#8221; box in the top of the results directly in Sitecore. This is all available through the Admin API &#8211; which is nicely wrapped in .NET assemblies.<br />
<a href="http://code.google.com/apis/searchappliance/documentation/60/gdata/acapi_cs.html">You can find the Admin API here</a>.</p>
<p><strong>Feeds API</strong><br />
The Feeds API allows you to insert content directly into the crawler queue. There are three options: web feeds, which simply adds URLs you want the GSA to crawl, url-and-metadata feeds, which allows you to add additional metadata to URLs being crawled (think adding metadata to PDF files), and content feeds which actually insert the html or binary data directly into the GSA.<br />
<a href="http://code.google.com/apis/searchappliance/documentation/60/feedsguide.html">You can find the feeds API here.</a></p>
<p><strong>Policy ACL API</strong><br />
One of the strong sides of the GSA is the possibility to crawl and serve secure content, e.g. on your extranet or intranet. The problem though, is how to determine which URLs the individual users in your custom security solution has access to. This is where the Policy ACL (access control list) API comes handy. In short, it allows you to insert access lists in the GSA and map them to URLs &#8211; which again allows you to have fast secure queries &#8211; simple and wrapped in .NET.<br />
<a href="http://code.google.com/apis/searchappliance/documentation/60/gdata/acapi_policy_acls.html">Find the Policy ACL API here.</a></p>
<p>There are tons of other APIs and <a href="http://code.google.com/apis/searchappliance/documentation/60/index.html">documentation on the Google Search Appliance on code.google.com</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcore.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcore.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcore.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcore.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcore.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcore.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcore.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcore.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcore.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcore.wordpress.com/188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=188&subd=mcore&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcore.wordpress.com/2009/09/25/google-search-appliance-cool-apis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9ebef7d147872a290a73b7d8d0f4ab52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Eldblom</media:title>
		</media:content>

		<media:content url="http://www.google.com/enterprise/gsa/images/gsa2.jpg" medium="image">
			<media:title type="html">Google Search Appliance</media:title>
		</media:content>
	</item>
		<item>
		<title>Composite Layouts – keeping your stuff together</title>
		<link>http://mcore.wordpress.com/2009/07/22/composite-layouts-%e2%80%93-keeping-your-stuff-together/</link>
		<comments>http://mcore.wordpress.com/2009/07/22/composite-layouts-%e2%80%93-keeping-your-stuff-together/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 19:28:02 +0000</pubDate>
		<dc:creator>Eldblom</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[best practise]]></category>
		<category><![CDATA[composite layout]]></category>

		<guid isPermaLink="false">http://mcore.wordpress.com/?p=170</guid>
		<description><![CDATA[I&#8217;ve always been a big fan of keeping things that belongs together, together. This might be an obvious fact, but I sometimes find that in Sitecore, it&#8217;s not so easy to follow. If you read my post on agile Sitecore design, you&#8217;ll get my drift. But this post is on something much more practical, i.e. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=170&subd=mcore&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve always been a big fan of keeping things that belongs together, together. This might be an obvious fact, but I sometimes find that in Sitecore, it&#8217;s not so easy to follow. If you read my post on <a href="http://mcore.wordpress.com/2009/05/27/agile-sitecore-design/">agile Sitecore design</a>, you&#8217;ll get my drift. But this post is on something much more practical, i.e. composing your layouts in Sitecore, and how something I choose to call <em>composite layouts</em> can help you make your practice better.
</p>
<p>When it comes to putting your pages together in Sitecore, you have two choices:<br />
<br />You can choose to build up your entire page composition on your templates in Sitecore, i.e. choose a layout and putting <span style="text-decoration:underline;">all</span> sublayouts, renderings etc. on a template (which is naturally the __standard values of the template). This method is in my book the most correct, as it allows you, your fellow developers and the administrators to see the complete structure of a page, without leaving Sitecore. Unfortunately Sitecore does not deliver any layout inheritance etc., so this way requires a lot of hard work and mouse clicking (&#8220;try adding a rendering to all pagetypes late in the process – phew&#8221;) and is potential place for mistakes. Also, the page designer and Webforms module copies the layout from the template, locally to the item – and trust me, you do not want your layout with 20 renderings spread over your 15 pagetypes <span style="text-decoration:underline;">and</span> 356 local items (&#8220;try adding a rendering to all pagetypes late in the process – double-phew&#8221;).
</p>
<p>So, unless you are committed to keeping your page composition in one place, and choose not to use the page designer and webforms, you are left with the second option – putting page composition in sublayouts. This is where you put renderings and other sublayouts directly in the .ascx file, either through Visual Studio or the Sitecore layout designer. The big problem I have with this option, is that you separate page composition into two places – Sitecore and the ascx files. This forces you to use two different systems to setup caching etc. and makes it difficult to overview the complete page composition.
</p>
<p>Enter Composite Layouts:
</p>
<p>Composite Layouts is a new type of rendering I developed for a large project, which bridges the gap between the two options. It utilizes the fact that even rendering items in Sitecore have a Layout field, and it merges a layout set directly on a composite layout item into the layout set on a template. I.e. a composite layout is pretty much like a sublayout, in that it allows you to group renderings and place them on a page as a unit. The exception is that all configuration is done in Sitecore and the renderings on a composite layout can be placed in all placeholders – even placeholders outside the composite layout.
</p>
<p>Our Form pagetype is a standard document page (with the usual header, topmenu, title, leftmenu, footer, spots etc.) which renders a selected form (which is incidentally created using Webform for Marketeers) in the content area:
</p>
<p><img src="http://mcore.files.wordpress.com/2009/07/072209_1928_compositela1.png"></p>
<p>The DocumentPage rendering is a composite layout which is defined with the following layout:
</p>
<p><img src="http://mcore.files.wordpress.com/2009/07/072209_1928_compositela2.png"></p>
<p>Note that the layout has a NullLayout selected – this is merely because the Sitecore UI forces us to select a layout before saving the layout on the item. The NullLayout is naturally never rendered.
</p>
<p>Just to make the point; in turn, here&#8217;s how what the HeaderBlocks composite layout contains:
</p>
<p><img src="http://mcore.files.wordpress.com/2009/07/072209_1928_compositela3.png">
<p>As you can see, composite layouts uses standard Sitecore UI with no addition, and all I&#8217;ve had to do at this point is to create a <em>Composite Layout</em> template and add it to the insert options of the <em>Sublayout Folder</em> template. The template has no fields whatsoever.
</p>
<p>So how do you get it to merge the layouts? First you create a class – let&#8217;s call it InsertCompositeLayoutRenderings – derive it from Sitecore.Pipelines.RenderLayout.RenderLayoutProcessor and insert it into the renderLayout pipeline in the web.config. The entry needs to be right below the InsertRenderings entry, as this unfolds all the renderings in the current item and fills the Sitecore.Context.Page.Renderings list.
</p>
<p><img src="http://mcore.files.wordpress.com/2009/07/072209_1928_compositela4.png"></p>
<p>Second, you implement the Process() method of your InsertCompositeLayoutRenderings class, run through the Sitecore.Context.Page.Renderings and detects any composite layouts in the list, parse the layout field in the composite layout item and call Sitecore.Context.Page.AddRendering for each rendering found. If you want recursive support, you merely give the renderings on each composite the same treatment.
</p>
<p><img src="http://mcore.files.wordpress.com/2009/07/072209_1928_compositela5.png">
	</p>
<p>Granted, the design has some flaws – e.g. all renderings are added to the end of the layout (theres no InsertRendering method), so you have to be careful about the placeholders you use and order of the composite layouts – but I still consider the solution to be much better than the two options first mentioned.
</p>
<p>We could all hope Sitecore reads this post and implements something similar in a future version, but until then if anyone is interested, I&#8217;ll consider posting the code on the Sitecore shared source network.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcore.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcore.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcore.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcore.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcore.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcore.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcore.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcore.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcore.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcore.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=170&subd=mcore&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcore.wordpress.com/2009/07/22/composite-layouts-%e2%80%93-keeping-your-stuff-together/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9ebef7d147872a290a73b7d8d0f4ab52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Eldblom</media:title>
		</media:content>

		<media:content url="http://mcore.files.wordpress.com/2009/07/072209_1928_compositela1.png" medium="image" />

		<media:content url="http://mcore.files.wordpress.com/2009/07/072209_1928_compositela2.png" medium="image" />

		<media:content url="http://mcore.files.wordpress.com/2009/07/072209_1928_compositela3.png" medium="image" />

		<media:content url="http://mcore.files.wordpress.com/2009/07/072209_1928_compositela4.png" medium="image" />

		<media:content url="http://mcore.files.wordpress.com/2009/07/072209_1928_compositela5.png" medium="image" />
	</item>
		<item>
		<title>Sitecore learning portal launched</title>
		<link>http://mcore.wordpress.com/2009/07/08/sitecore-learning-portal-launched/</link>
		<comments>http://mcore.wordpress.com/2009/07/08/sitecore-learning-portal-launched/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 21:34:23 +0000</pubDate>
		<dc:creator>Jens Mikkelsen</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[New releases]]></category>
		<category><![CDATA[Sitecore]]></category>

		<guid isPermaLink="false">http://mcore.wordpress.com/?p=163</guid>
		<description><![CDATA[My cooworker Jimmi Lyhne Andersen and I are glad to announce that we have finally finished a project we have been working on for quite a while now; a complete learning site for Sitecore. Check it out at http://learnsitecore.cmsuniverse.net/
 
So what is it all about? Well we have been working with Sitecore for quite a while [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=163&subd=mcore&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>My cooworker Jimmi Lyhne Andersen and I are glad to announce that we have finally finished a project we have been working on for quite a while now; a complete learning site for Sitecore. Check it out at <a title="Learn Sitecore" href="http://learnsitecore.cmsuniverse.net/" target="_blank">http://learnsitecore.cmsuniverse.net/</a></p>
<p> </p>
<p>So what is it all about? Well we have been working with Sitecore for quite a while now, and we found that documentation was somewhat limited. Documentation revolves around SDN which is great as a reference (especially if the search functionality worked probably) and blog post by enthusiastic Sitecore developers. This leaves quite a gap, as there are no in depth article base and nowhere to go, if you want to start learning about Sitecore. Further there is only limited documentation for editors, server administrators and architects.</p>
<p>Therefore our vision was to create a site, which matches these target groups and goes in depth with the topics. Our mission is not to compete with SDN, as it is quite resourceful for snippets and references. Our mission is neither to compete with the blogs, as these are quite resourceful when you want biased opinions on Sitecore or new and interesting tweaks.</p>
<p>So in short learnsitecore.com is the place to go if you want to learn Sitecore or read in depth articles on different technologies which Sitecore uses. Right now there are a limited number of articles, but we hope to get some contributors and of cause write a lot of articles our self.</p>
<p> </p>
<p>We hope you&#8217;ll find it resourceful and that you might be motivated to write an article or two.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcore.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcore.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcore.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcore.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcore.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcore.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcore.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcore.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcore.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcore.wordpress.com/163/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=163&subd=mcore&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcore.wordpress.com/2009/07/08/sitecore-learning-portal-launched/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/df4c1f864ec5c9c21f8e21c6a7cc07d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jens Mikkelsen</media:title>
		</media:content>
	</item>
		<item>
		<title>Content and presentation separated – part 2</title>
		<link>http://mcore.wordpress.com/2009/06/18/content-and-presentation-separated-%e2%80%93-part-2/</link>
		<comments>http://mcore.wordpress.com/2009/06/18/content-and-presentation-separated-%e2%80%93-part-2/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 22:31:29 +0000</pubDate>
		<dc:creator>Jens Mikkelsen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mcore.wordpress.com/?p=158</guid>
		<description><![CDATA[Following up on my previous post about content and presentation separation , I realized that separating presentation and content is extremely important, if you want to utilize some of the new features in Sitecore such as the page editor and the new rule engine . These features let the end user meddle with the presentation [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=158&subd=mcore&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Following up on my previous post about <a href="http://mcore.wordpress.com/2009/02/09/content-and-presentation-separated-does-it-make-sense/">content and presentation separation</a> , I realized that separating presentation and content is extremely important, if you want to utilize some of the new features in Sitecore such as the page editor and the <a href="http://sitecorejohn.spaces.live.com/blog/cns!960125F1D4A59952!399.entry">new rule engine</a> . These features let the end user meddle with the presentation which gives quite a few nice features. For instance an editor can add a rendering to a given page in a rich and intuitive GUI and set up rules for a visualization of a certain rendering.</p>
<p>The problem, as earlier discussed, is what to do with “presentation content”. With presentation content I mean settings or similar. For instance take a rendering where you want to present a list of news, which are all descendants of a specified root item. This rendering needs the following settings: How many news items to show, a root item, a read more link etc. Normally I would put these properties on a template as fields. However this would bind the presentation to content and the sublayout or rendering would only work on an item, which is derived from that template. As the end user can now meddle with the renderings and add or remove them at will, he will have to know the dependencies to different templates, which is practically impossible. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p> </p>
<p>So what is the solution to this problem? Well as fare as I can figure out, you need to use the datasource and parameter properties on the rendering instead. However this introduces some issues when it comes to usability, as it is now the end user who needs to set these properties. Sitecore has a really rich and user friendly interface for altering content, but for some reason the UI for setting properties on a rendering/sublayout is rather hopeless. There is only one field type – a simple text field. So when you need to set an external or internal link you need to enter it as simple text. No lookups, nothing. Further there is no way, to my knowledge, to create validators for these fields, so you aren’t able to help the editor.</p>
<p>So for this to work Sitecore needs to implement a better UI or use the content editor to allow editors to configure renderings. I sort of figure it would be quite nifty, if there was created an item, whenever you add a rendering. The item should be based on a specific template for the rendering type, which would mean you could create different templates for different types of renderings and thereby control which parameters would be needed. This should be completely transparent for the editor, which wouldn’t notice that an actual item was created, except he would get the user friendly interface of the content editor.</p>
<p>This would give better usability and thereby allow a better separation of content and presentation (and the content needed by the presentation).</p>
<p> </p>
<p>The end user issue doesn’t stand alone. Recently I implemented a sublayout, which should read some parameters. If I have done this in a best practice way, I must admit, that the API for reading parameters is completely hopeless. <a href="http://sdn5.sitecore.net/FAQ/Archive/API/Get%20DataSource%20Code%20and%20Parameters%20for%20Sublayout%20via%20Code-behind.aspx">Check it out on SDN</a>. What? Is this really the easiest way? Further the parameters data type is a concatenation of strings much like query parameters. This is quite frustrating as you have to parse the string or use the .net UrlString class to extract a specific parameter.</p>
<p>Adding all this together and adding different validation of the parameters made my class turn into one long unreadable mess.</p>
<p> </p>
<p>The conclusion? If you want to separate content and presentation you lower the capabilities and usability for the editor and make your code one big mess. Either that or I am doing something completely wrong.</p>
<p>If Sitecore really wants the editors to meddle with presentation, they should really improve the UI and API for sublayout parameters and similar.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcore.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcore.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcore.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcore.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcore.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcore.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcore.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcore.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcore.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcore.wordpress.com/158/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=158&subd=mcore&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcore.wordpress.com/2009/06/18/content-and-presentation-separated-%e2%80%93-part-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/df4c1f864ec5c9c21f8e21c6a7cc07d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jens Mikkelsen</media:title>
		</media:content>
	</item>
		<item>
		<title>Agile Sitecore design</title>
		<link>http://mcore.wordpress.com/2009/05/27/agile-sitecore-design/</link>
		<comments>http://mcore.wordpress.com/2009/05/27/agile-sitecore-design/#comments</comments>
		<pubDate>Wed, 27 May 2009 04:45:58 +0000</pubDate>
		<dc:creator>Eldblom</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[Software Architecture]]></category>

		<guid isPermaLink="false">http://mcore.wordpress.com/?p=148</guid>
		<description><![CDATA[It been a while since my last blog post – my second child Annika was born March 16th and since then I&#8217;ve been forced to realize that two children takes up a lot of blog-writing time.

A year ago I wrote a post titled Type before function, which pointed out the very type-centric design of Sitecore. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=148&subd=mcore&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It been a while since my last blog post – my second child Annika was born March 16<sup>th</sup> and since then I&#8217;ve been forced to realize that two children takes up a lot of blog-writing time.
</p>
<p>A year ago I wrote a post titled <a href="http://mcore.wordpress.com/2008/05/28/type-before-function/">Type before function</a>, which pointed out the very type-centric design of Sitecore. Since then, we have in Pentia tried to develop a design practice which focuses more on isolating logically grouped functionality in our design and thinking outside the type-centric nature of Sitecore. For this purpose, we have &#8220;invented&#8221; the term <em>component</em> in our design. The purpose of components is to separate the functionality from the type, allowing the developer to focus on one purpose and its interfaces.
</p>
<p>The practise has been quite successful &#8211; our large-scale solutions have become increasingly easy to maintain and extend. As a side effect of the process, we now have a high degree of reuse &#8211; not just knowledge, but actual code &#8211; between even seemingly un-similar projects. Not very surprisingly, it turns out that developers are more inclined to reuse code, which is easily overviewed. The design practice is so successful, that we have passed it on to external projects, through our <a href="http://www.pentia.net/Kompetencer_og_produkter/Kompetencer/Sitecore_raadgivning_og_analyse.aspx">Professional Services</a>.
</p>
<p>Here are a few tips on getting you started:
</p>
<h2>Consistent placement and naming<br />
</h2>
<p>Not all items belonging to a component can be placed together. Naming and placement makes it easier to identify component items – in a type-centric system.
</p>
<p>Keep your files together &#8211; we never use the standard Sitecore folders, e.g. /xsl and /layouts. All files in a component are placed below a folder named /Components/[<em>ComponentName</em>]. This makes it easy to identify which files belong together without e.g. garbling the filename with unnecessary prefixes. And if you think about it, it&#8217;s not hard to identify a file as an XSLT – so why put it in the/xsl folder? Keeping component items together also goes for templates, renderings and layouts in Sitecore. For the purpose of Sitecore best practice, we still place templates under /sitecore/templates (although I suppose it&#8217;s not strictly necessary), and layout items under /sitecore/layouts. But we always use subfolders which are named consistently, e.g. /sitecore/templates/Components/[<em>ComponentName</em>].
</p>
<h2>Component projects<br />
</h2>
<p>Each component has a separate Visual Studio project, and therefore a separate assembly. Aside from grouping files even further, this also helps to identify dependencies between components. Use build events on the project to move files from component folders to website folders if needed.
</p>
<h2>Interface templates<br />
</h2>
<p>Think of templates in Sitecore as interfaces – never basetypes – which provide your pagetypes or data items with certain functionality. Always refer to these interfaces in the code within the components.
</p>
<p>Example: The component Navigation (menu, breadcrumb and sitemap) defines the template Navigable with the fields <em>Menu Title</em> and <em>Show In Menu</em>. This template is assigned to the pagetypes which can be shown in the menu. The renderings Menu.xslt and Breadcrumb.xslt only references the Navigable template by using the XslHelper.IsItemOfType() method (or your own more optimized version).
</p>
<h2>Common components<br />
</h2>
<p>There are a number of components which is always in a project, and which brings the functionality of the other components together.
</p>
<p>The <em>Design</em> component contains all the graphic design for the project. Do not be tempted to place stylesheets and graphics within each component – the design for a single component is always related to other components, and therefore you will be forced to create unnecessary dependencies.
</p>
<p>The <em>PageTypes</em> component brings together the interface templates and renderings and sublayouts in the other components on the actual page type template. Only page type templates are <em>instantiated</em> in the content tree. If you define the page type template <em>News</em> in the <em>News</em> component and not in the <em>PageTypes</em> component, you will be forced to create dependencies to other components e.g. <em>Navigation</em>.
</p>
<h2>Dependencies and Inversion of control<br />
</h2>
<p>Keep your dependencies amongst components as few and as obvious as possible. It should not be necessary for a developer to know more than the component he is working on – too many dependencies makes the components too complex and less flexible. The common components is one way to reduce dependencies, another is the use of the <a href="http://en.wikipedia.org/wiki/Inversion_of_Control">inversion of control pattern</a> and possibly an IoC container. Suppose the News component uses the Indexing component for providing data quickly. This could naturally be done by calling the indexing component directly through the News code, thereby creating a dependency. Alternately the <em>News</em> component could provide an appropriate interface which defines its necessary functionality. This interface could be implemented by the Indexing component and instantiated though Reflection or an IoC container like Unity or Spring, thereby inverting the dependency and making the <em>News</em> component more lean.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcore.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcore.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcore.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcore.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcore.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcore.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcore.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcore.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcore.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcore.wordpress.com/148/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=148&subd=mcore&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcore.wordpress.com/2009/05/27/agile-sitecore-design/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9ebef7d147872a290a73b7d8d0f4ab52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Eldblom</media:title>
		</media:content>
	</item>
		<item>
		<title>Command templates – the forgotten feature of Sitecore 6?</title>
		<link>http://mcore.wordpress.com/2009/05/15/command-templates-%e2%80%93-the-forgotten-feature-of-sitecore-6/</link>
		<comments>http://mcore.wordpress.com/2009/05/15/command-templates-%e2%80%93-the-forgotten-feature-of-sitecore-6/#comments</comments>
		<pubDate>Thu, 14 May 2009 23:25:50 +0000</pubDate>
		<dc:creator>Jens Mikkelsen</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Sitecore]]></category>

		<guid isPermaLink="false">http://mcore.wordpress.com/?p=138</guid>
		<description><![CDATA[I don’t know about you, but I actually haven’t been giving command templates any attention since they were introduced in Sitecore 6. This is really a shame, as it is pretty powerful and can help editors a lot.
For instance take the often used structure for news, where you have a news folder. To avoid too [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=138&subd=mcore&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I don’t know about you, but I actually haven’t been giving command templates any attention since they were introduced in Sitecore 6. This is really a shame, as it is pretty powerful and can help editors a lot.</p>
<p>For instance take the often used structure for news, where you have a news folder. To avoid too many items in a flat structure you have folders for the current year and the current month. This could back in the old days be used by letting the editors them self create the folders they needed or you could have implemented a lot of event handlers or similar. Now you can just use a command template and let the command create the folders from the current DateTime.</p>
<p>To create command templates follow the guide in the <a href="http://sdn5.sitecore.net/Reference/Sitecore%206/Data%20Definition%20Cookbook.aspx">data definition cookbook</a> . Then implement the command to create the folders like this:<br />
<code><br />
public class MyCustomCommand : Command<br />
{<br />
  public override void Execute(CommandContext context)<br />
  {<br />
  if (context.Items.Length == 1)<br />
  {<br />
  Item item = context.Items[0];<br />
  NameValueCollection parameters = new NameValueCollection();<br />
  parameters["id"] = item.ID.ToString();<br />
  parameters["language"] = item.Language.ToString();<br />
  parameters["database"] = item.Database.Name;<br />
  Sitecore.Context.ClientPage.Start(this, "Run", parameters);<br />
  }<br />
}</code><br />
<code><br />
protected void Run(Sitecore.Web.UI.Sheer.ClientPipelineArgs args)<br />
{<br />
  if (!args.IsPostBack)<br />
  {<br />
    //Means we are in the initial step, we want to ask for the name of the news<br />
    Sitecore.Context.ClientPage.ClientResponse.Input("Enter the name of the news item:", Sitecore.Globalization.Translate.Text("New NewsItem"), Sitecore.Configuration.Settings.ItemNameValidation, "'$Input' is not a valid name.", 100);<br />
    args.WaitForPostBack();<br />
  }<br />
  else<br />
  {<br />
    //Now we got a postback, which means we got a response<br />
    if (!String.IsNullOrEmpty(args.Result) &amp;&amp; args.Result != "undefined")<br />
    {<br />
      Database db = Sitecore.Configuration.Factory.GetDatabase(args.Parameters["database"]);<br />
      Item parent = db.GetItem(args.Parameters["id"], Language.Parse(args.Parameters["language"]));<br />
      //Create the folder structure if it doesn't exist<br />
      string year = DateTime.Now.Year.ToString();<br />
      string month = DateTime.Now.Month.ToString();<br />
      TemplateItem folderTemplate = db.Templates[Sitecore.TemplateIDs.Folder];<br />
      Item yearFolder = parent.Children[year];<br />
      if (yearFolder == null)<br />
        yearFolder = parent.Add(year, folderTemplate);<br />
      Item monthFolder = yearFolder.Children[month];<br />
      if (monthFolder == null)<br />
        monthFolder = yearFolder.Add(month, folderTemplate);<br />
      //Create the news Item<br />
      TemplateItem template = Sitecore.Context.ContentDatabase.Templates[new ID("{B2612CF6-16D6-426D-9E74-EE3A4E3989B2}")];<br />
      Item item = monthFolder.Add(args.Result, template);<br />
      //Load the Item in the content editor<br />
      Sitecore.Context.ClientPage.SendMessage(this, "item:load(id=" + item.ID.ToString() + ")");<br />
    }<br />
  }<br />
 }<br />
}</code></p>
<p>There you go &#8211; auto creation of folders. It’s that simple. I can think of really many usages of this – also more complex situations. Too bad the sheer UI documentation is so limited, as it makes it difficult to implement complex wizards etc.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcore.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcore.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcore.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcore.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcore.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcore.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcore.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcore.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcore.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcore.wordpress.com/138/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=138&subd=mcore&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcore.wordpress.com/2009/05/15/command-templates-%e2%80%93-the-forgotten-feature-of-sitecore-6/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/df4c1f864ec5c9c21f8e21c6a7cc07d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jens Mikkelsen</media:title>
		</media:content>
	</item>
		<item>
		<title>Performance debugging Sitecore backend</title>
		<link>http://mcore.wordpress.com/2009/05/11/performance-debugging-sitecore-backend/</link>
		<comments>http://mcore.wordpress.com/2009/05/11/performance-debugging-sitecore-backend/#comments</comments>
		<pubDate>Mon, 11 May 2009 09:20:09 +0000</pubDate>
		<dc:creator>Jens Mikkelsen</dc:creator>
				<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[debugging]]></category>

		<guid isPermaLink="false">http://mcore.wordpress.com/?p=135</guid>
		<description><![CDATA[In Pentia we have created a new service &#8211; Pentia Professional Services, where we offer our deep knowledge of and experiences with Sitecore. The purpose of this service is a bit like Sitecore Professional Services. We offer to help clients and partners with architecture, codereviews, performance testing and debugging Sitecore solutions. To differentiate us from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=135&subd=mcore&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In Pentia we have created a new service &#8211; <a href="http://www.pentia.net/Kompetencer_og_produkter/Kompetencer/Sitecore_raadgivning_og_analyse.aspx">Pentia Professional Services</a>, where we offer our deep knowledge of and experiences with Sitecore. The purpose of this service is a bit like Sitecore Professional Services. We offer to help clients and partners with architecture, codereviews, performance testing and debugging Sitecore solutions. To differentiate us from Sitecore Professional Services we focus on the custom solution, where Sitecore focuses on the product.</p>
<p>A couple of weeks ago I was assigned to a task, where a client experienced that the Sitecore backend were performing really bad. Issues like these have always been harder to debug then frontend performance issues, as there are very few indicators to which process, is making the solution stall. Is it a scheduled task? Is it a custom pipeline? Is it an event hookup? Etc. etc.</p>
<p>Well on this particular task I found a rather new entry type in the log. Sitecore has implemented a new counter – the LongRunningOperationWatcher. This class is used to log entries like this:</p>
<p><em>Long running operation: Running Validation Rules</em></p>
<p>This is a great indicator and makes it easier to debug the backend. The class is called with a threshold, a message and some custom parameters, which are outputted in the log entry if the threshold timer is exceeded when the object is disposed. It is used in different methods throughout the kernel – for instance when validating different validation rules and in different pipelines. I can only hope that Sitecore will extend it to more operations and pipelines. Further it is great to use yourself, when creating a custom scheduled task, which might run wild.</p>
<p>After analyzing the log file for the client, I found that the “Long operation: Running validation rules” entry came up constantly, which told me, that either they had some custom validations, which were quite heavy on performance or that the server couldn’t bare the load from the standard validations.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcore.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcore.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcore.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcore.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcore.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcore.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcore.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcore.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcore.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcore.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcore.wordpress.com&blog=2983764&post=135&subd=mcore&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcore.wordpress.com/2009/05/11/performance-debugging-sitecore-backend/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/df4c1f864ec5c9c21f8e21c6a7cc07d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jens Mikkelsen</media:title>
		</media:content>
	</item>
	</channel>
</rss>