<?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/"
	>

<channel>
	<title>Alonso Robles &#187; Web Development</title>
	<atom:link href="http://alonsorobles.com/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://alonsorobles.com</link>
	<description>technology, academia, and other tidbits from the trenches of a boggled mind</description>
	<lastBuildDate>Wed, 18 Apr 2012 02:48:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>RavenDB Document Identifiers and MVC Routes</title>
		<link>http://alonsorobles.com/2012/03/21/ravendb-document-identifiers-and-mvc-routes/</link>
		<comments>http://alonsorobles.com/2012/03/21/ravendb-document-identifiers-and-mvc-routes/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 11:38:39 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[RavenDB]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[MVC 3]]></category>
		<category><![CDATA[ravendb]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=353</guid>
		<description><![CDATA[Following my recent post about getting started with RavenDB, I decided to work on a small shopping cart demo application based on the sample depot application that is written in part 2 of Agile Web Development with Rails when I &#8230; <a href="http://alonsorobles.com/2012/03/21/ravendb-document-identifiers-and-mvc-routes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Following my recent post about <a href="http://www.headspring.com/2012/03/getting-started-with-ravendb">getting started with RavenDB</a>, I decided to work on a small shopping cart demo application based on the sample depot application that is written in part 2 of <a href="http://www.amazon.com/gp/product/1934356549/ref=as_li_ss_tl?ie=UTF8&amp;tag=importchaos-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1934356549">Agile Web Development with Rails </a><img style="margin: 0px; border-style: none !important;" src="http://www.assoc-amazon.com/e/ir?t=importchaos-20&amp;l=as2&amp;o=1&amp;a=1934356549" alt="" width="1" height="1" border="0" /> when I started running into some trouble with the RavenDB auto generated document identifiers and the MVC routes. Like any other programmer, I quickly performed a Google search to see what others had done. The search led me to a few Stack Overflow well voted answers all leading me to <a href="http://weblogs.asp.net/shijuvarghese/archive/2010/06/04/how-to-work-ravendb-id-with-asp-net-mvc-routes.aspx">a blog post on this topic</a>. Problem solved right? Not exactly. Two solutions were proposed. But before getting into those, I want to describe the problem a little more.</p>
<h3>The Problem Described</h3>
<p>Take a look at the ASP.NET MVC 3 default route found in the <em>Global.asax.cs</em> file: <div id="gist-2136967" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="k">public</span> <span class="k">static</span> <span class="k">void</span> <span class="nf">RegisterRoutes</span><span class="p">(</span><span class="n">RouteCollection</span> <span class="n">routes</span><span class="p">)</span></div><div class='line' id='LC2'><span class="p">{</span></div><div class='line' id='LC3'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">routes</span><span class="p">.</span><span class="n">IgnoreRoute</span><span class="p">(</span><span class="s">&quot;{resource}.axd/{*pathInfo}&quot;</span><span class="p">);</span></div><div class='line' id='LC4'><br/></div><div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">routes</span><span class="p">.</span><span class="n">MapRoute</span><span class="p">(</span></div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">&quot;Default&quot;</span><span class="p">,</span> <span class="c1">// Route name</span></div><div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">&quot;{controller}/{action}/{id}&quot;</span><span class="p">,</span> <span class="c1">// URL with parameters</span></div><div class='line' id='LC8'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">new</span> <span class="p">{</span> <span class="n">controller</span> <span class="p">=</span> <span class="s">&quot;Home&quot;</span><span class="p">,</span> <span class="n">action</span> <span class="p">=</span> <span class="s">&quot;Index&quot;</span><span class="p">,</span> <span class="n">id</span> <span class="p">=</span> <span class="n">UrlParameter</span><span class="p">.</span><span class="n">Optional</span> <span class="p">}</span> <span class="c1">// Parameter defaults</span></div><div class='line' id='LC9'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="p">);</span></div><div class='line' id='LC10'><span class="p">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2136967/c084f7d16a710152ca01c1d4d6f643a98f703ea3/gistfile1.cs" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2136967#file_gistfile1.cs" style="float:right;margin-right:10px;color:#666">gistfile1.cs</a>
            <a href="https://gist.github.com/2136967">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>
</p>
<p>This default route will basically allow you access to a resource using the basic URL convention that may look something this: <em>http://localhost/products/edit/1</em> . However, the default RavenDB auto generated document identifier for the product document ends up looking something like this: p<em>roducts/1</em>. (More information about the RavenDB <a href="http://ravendb.net/docs/client-api/basic-operations/saving-new-document">document identifiers one of the documentation pages</a>. ) So the URL to access that product resource for editing would really have to look like this: <em>http://localhost/products/edit/products/1</em>. Well that doesn’t work for two reasons:</p>
<ol>
<li>The default route will not be matched so the URL will not be routed the correct controller action.</li>
<li>The URL is not SEO friendly.</li>
</ol>
<p>Typically, this can be solved by using a custom route that access this resource by a natural key where the URL would probably end up looking like this: <em>http://localhost/products/product-name/edit</em>. This makes the URL SEO friendly, easy to read, and easy to route. However, there are some situations where the document identifier makes sense and I will continue this post on the assumption that this is the case.</p>
<p>The blog post mentioned above presents two solutions:</p>
<ul>
<li>Solution 1 – Change the identity parts separator convention for the RavenDB document store.</li>
<li>Solution 2 – Modify the ASP.NET default route</li>
</ul>
<h3>Issues with Solution 1</h3>
<p>Let’s look at the first solution. The suggestion is to change the identity separator convention from a slash (/) to a dash (-). The convention is really easy to change during the initialization of the document store object.</p>
<div id="gist-2137105" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="n">documentStore</span> <span class="p">=</span> <span class="k">new</span> <span class="n">DocumentStore</span> <span class="p">{</span> <span class="n">Url</span> <span class="p">=</span> <span class="s">&quot;http://localhost:8080/&quot;</span> <span class="p">};</span></div><div class='line' id='LC2'><span class="n">documentStore</span><span class="p">.</span><span class="n">Initialize</span><span class="p">();</span></div><div class='line' id='LC3'><span class="n">documentStore</span><span class="p">.</span><span class="n">Conventions</span><span class="p">.</span><span class="n">IdentityPartsSeparator</span> <span class="p">=</span> <span class="s">&quot;-&quot;</span><span class="p">;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2137105/c7f32ad41de8d44b30c10c8138edcb12215b3ad9/gistfile1.cs" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2137105#file_gistfile1.cs" style="float:right;margin-right:10px;color:#666">gistfile1.cs</a>
            <a href="https://gist.github.com/2137105">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>This makes RavenDB generate document identifiers that now look like: <em>products-1</em>. Now we can generate a URL that will match the default route and may look like: <em>http://localhost/products/edit/products-1</em>. I still find some issues this this. Namely, the URL is still not really SEO friendly and not really human readable. I don’t like the idea of exposing an identifier that was forced on me by RavenDB since it essentially has coupled my URL to the RavenDB identifier convention. It just doesn’t feel right.</p>
<h3>Issues with Solution 2</h3>
<p>This solution suggests the change of the default route to something like:</p>
<div id="gist-2137442" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="k">public</span> <span class="k">static</span> <span class="k">void</span> <span class="nf">RegisterRoutes</span><span class="p">(</span><span class="n">RouteCollection</span> <span class="n">routes</span><span class="p">)</span></div><div class='line' id='LC2'><span class="p">{</span></div><div class='line' id='LC3'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">routes</span><span class="p">.</span><span class="n">IgnoreRoute</span><span class="p">(</span><span class="s">&quot;{resource}.axd/{*pathInfo}&quot;</span><span class="p">);</span></div><div class='line' id='LC4'><br/></div><div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">routes</span><span class="p">.</span><span class="n">MapRoute</span><span class="p">(</span></div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">&quot;Default&quot;</span><span class="p">,</span> <span class="c1">// Route name</span></div><div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">&quot;{controller}/{action}/{*id}&quot;</span><span class="p">,</span> <span class="c1">// URL with parameters</span></div><div class='line' id='LC8'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">new</span> <span class="p">{</span> <span class="n">controller</span> <span class="p">=</span> <span class="s">&quot;Home&quot;</span><span class="p">,</span> <span class="n">action</span> <span class="p">=</span> <span class="s">&quot;Index&quot;</span><span class="p">,</span> <span class="n">id</span> <span class="p">=</span> <span class="n">UrlParameter</span><span class="p">.</span><span class="n">Optional</span> <span class="p">}</span> <span class="c1">// Parameter defaults</span></div><div class='line' id='LC9'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="p">);</span></div><div class='line' id='LC10'><span class="p">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2137442/d2469600b573423dec4dbb7fd4e1153ac431fd34/gistfile1.cs" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2137442#file_gistfile1.cs" style="float:right;margin-right:10px;color:#666">gistfile1.cs</a>
            <a href="https://gist.github.com/2137442">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>This will allow route to match a URL that looked like the first one: <em>http://localhost/products/edit/products/1</em>. I don’t like this either. While it does allow the default route to match and do its job. The URL is just ugly. It also clobbers the id making the route also match something like this: <em>http://localhost/products/edit/products/more-junk/1</em>. Obviously this is not SEO friendly or human readable. Again, it just doesn’t feel right.</p>
<h3>Another Option</h3>
<p>After some digging and learning about more about the document identity field, identity type converters, custom identifiers with the document key generator convention, I realized there was a pretty simple alternative to the two options above. But to see it and to understand the simplicity, you have to look at the source of the problem.</p>
<p>The reason that MVC routes are choking on the preconfigured RavenDB document identity convention is because our models included a string based identity property. I realized I had done this on purpose to ease the mapping of the RavenDB document identifier and my object identifier. Take a look at my product object definition:</p>
<div id="gist-2205818" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="k">public</span> <span class="k">class</span> <span class="nc">Product</span></div><div class='line' id='LC2'><span class="p">{</span></div><div class='line' id='LC3'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">public</span> <span class="kt">string</span> <span class="n">Id</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC4'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">public</span> <span class="kt">string</span> <span class="n">Title</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">public</span> <span class="kt">string</span> <span class="n">Description</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">public</span> <span class="kt">string</span> <span class="n">ImageUrl</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">public</span> <span class="kt">decimal</span> <span class="n">Price</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC8'><span class="p">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2205818/f76935b0b33b0148ca2a67b57078be7a859b3c4f/Product.cs" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2205818#file_product.cs" style="float:right;margin-right:10px;color:#666">Product.cs</a>
            <a href="https://gist.github.com/2205818">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>The shopping cart identifier is a string. Why would it be a string? It could have been an integer or a Guid or something else. It could have even been a natural key of some sort. Or even a compound key. It doesn’t have to be a string. Taking another look at the  IDocumentSession interface we can see we have four load methods available.</p>
<div id="gist-2153059" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="k">namespace</span> <span class="nn">Raven.Client</span></div><div class='line' id='LC2'><span class="p">{</span></div><div class='line' id='LC3'>&nbsp;&nbsp;<span class="k">public</span> <span class="k">interface</span> <span class="n">IDocumentSession</span> <span class="p">:</span> <span class="n">IDisposable</span></div><div class='line' id='LC4'>&nbsp;&nbsp;<span class="p">{</span></div><div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">ISyncAdvancedSessionOperation</span> <span class="n">Advanced</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">void</span> <span class="n">Delete</span><span class="p">&lt;</span><span class="n">T</span><span class="p">&gt;(</span><span class="n">T</span> <span class="n">entity</span><span class="p">);</span></div><div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">T</span> <span class="n">Load</span><span class="p">&lt;</span><span class="n">T</span><span class="p">&gt;(</span><span class="kt">string</span> <span class="n">id</span><span class="p">);</span></div><div class='line' id='LC8'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">T</span><span class="p">[]</span> <span class="n">Load</span><span class="p">&lt;</span><span class="n">T</span><span class="p">&gt;(</span><span class="k">params</span> <span class="kt">string</span><span class="p">[]</span> <span class="n">ids</span><span class="p">);</span></div><div class='line' id='LC9'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">T</span><span class="p">[]</span> <span class="n">Load</span><span class="p">&lt;</span><span class="n">T</span><span class="p">&gt;(</span><span class="n">IEnumerable</span><span class="p">&lt;</span><span class="kt">string</span><span class="p">&gt;</span> <span class="n">ids</span><span class="p">);</span></div><div class='line' id='LC10'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">T</span> <span class="n">Load</span><span class="p">&lt;</span><span class="n">T</span><span class="p">&gt;(</span><span class="n">ValueType</span> <span class="n">id</span><span class="p">);</span></div><div class='line' id='LC11'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">IRavenQueryable</span><span class="p">&lt;</span><span class="n">T</span><span class="p">&gt;</span> <span class="n">Query</span><span class="p">&lt;</span><span class="n">T</span><span class="p">&gt;(</span><span class="kt">string</span> <span class="n">indexName</span><span class="p">);</span></div><div class='line' id='LC12'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">IRavenQueryable</span><span class="p">&lt;</span><span class="n">T</span><span class="p">&gt;</span> <span class="n">Query</span><span class="p">&lt;</span><span class="n">T</span><span class="p">&gt;();</span></div><div class='line' id='LC13'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">IRavenQueryable</span><span class="p">&lt;</span><span class="n">T</span><span class="p">&gt;</span> <span class="n">Query</span><span class="p">&lt;</span><span class="n">T</span><span class="p">,</span> <span class="n">TIndexCreator</span><span class="p">&gt;()</span> <span class="k">where</span> <span class="n">TIndexCreator</span> <span class="p">:</span> <span class="n">AbstractIndexCreationTask</span><span class="p">,</span> <span class="k">new</span><span class="p">();</span></div><div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">ILoaderWithInclude</span><span class="p">&lt;</span><span class="kt">object</span><span class="p">&gt;</span> <span class="n">Include</span><span class="p">(</span><span class="kt">string</span> <span class="n">path</span><span class="p">);</span></div><div class='line' id='LC15'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">ILoaderWithInclude</span><span class="p">&lt;</span><span class="n">T</span><span class="p">&gt;</span> <span class="n">Include</span><span class="p">&lt;</span><span class="n">T</span><span class="p">&gt;(</span><span class="n">Expression</span><span class="p">&lt;</span><span class="n">Func</span><span class="p">&lt;</span><span class="n">T</span><span class="p">,</span> <span class="kt">object</span><span class="p">&gt;&gt;</span> <span class="n">path</span><span class="p">);</span></div><div class='line' id='LC16'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">void</span> <span class="nf">SaveChanges</span><span class="p">();</span></div><div class='line' id='LC17'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">void</span> <span class="nf">Store</span><span class="p">(</span><span class="kt">object</span> <span class="n">entity</span><span class="p">,</span> <span class="n">Guid</span> <span class="n">etag</span><span class="p">);</span></div><div class='line' id='LC18'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">void</span> <span class="nf">Store</span><span class="p">(</span><span class="kt">object</span> <span class="n">entity</span><span class="p">,</span> <span class="n">Guid</span> <span class="n">etag</span><span class="p">,</span> <span class="kt">string</span> <span class="n">id</span><span class="p">);</span></div><div class='line' id='LC19'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">void</span> <span class="nf">Store</span><span class="p">(</span><span class="kt">object</span> <span class="n">entity</span><span class="p">);</span></div><div class='line' id='LC20'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">void</span> <span class="nf">Store</span><span class="p">(</span><span class="kt">object</span> <span class="n">entity</span><span class="p">,</span> <span class="kt">string</span> <span class="n">id</span><span class="p">);</span></div><div class='line' id='LC21'>&nbsp;&nbsp;<span class="p">}</span></div><div class='line' id='LC22'><span class="p">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2153059/64fbb98ab03ac0e3fc1f07fb5f07d4851a1c7e5c/gistfile1.cs" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2153059#file_gistfile1.cs" style="float:right;margin-right:10px;color:#666">gistfile1.cs</a>
            <a href="https://gist.github.com/2153059">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>After thinking about the difference between the method that accepts a string identifier and the one that accepts a value type identifier, I realized that all I had to do was change my identifier type from a string to a value type and I’m done. No fancy mapping or parsing the document identifier from RavenDB to the web browser and back. No changes to the default MVC route. No changes to the default identity separator convention. It just worked. My URLs are SEO friendly and more readable.</p>
<p>All I had to do was change the object identifier type.</p>
<div id="gist-2205829" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="k">public</span> <span class="k">class</span> <span class="nc">Product</span></div><div class='line' id='LC2'><span class="p">{</span></div><div class='line' id='LC3'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">public</span> <span class="kt">int</span> <span class="n">Id</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC4'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">public</span> <span class="kt">string</span> <span class="n">Title</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">public</span> <span class="kt">string</span> <span class="n">Description</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">public</span> <span class="kt">string</span> <span class="n">ImageUrl</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">public</span> <span class="kt">decimal</span> <span class="n">Price</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC8'><span class="p">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2205829/dec0f6ca4b6fc6c058955333b789496725191f02/Product.cs" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2205829#file_product.cs" style="float:right;margin-right:10px;color:#666">Product.cs</a>
            <a href="https://gist.github.com/2205829">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>That was easy.</p>
<p>Of course this doesn’t solve everything. What if I really do need a string based identifier? This will probably require tweaking the behavior of the RavenDB client. I also don’t have an answer for compound keys and other natural keys which may not be a value type. Some of these may require more thought from both the RavenDB side and the MVC side of my project. But that is another problem to think about some other time.</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2012/03/21/ravendb-document-identifiers-and-mvc-routes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TODO: When Creating a New ASP.NET MVC Project</title>
		<link>http://alonsorobles.com/2012/03/20/todo-when-creating-a-new-asp-net-mvc-project/</link>
		<comments>http://alonsorobles.com/2012/03/20/todo-when-creating-a-new-asp-net-mvc-project/#comments</comments>
		<pubDate>Tue, 20 Mar 2012 14:30:00 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[MVC 3]]></category>
		<category><![CDATA[TODO]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=346</guid>
		<description><![CDATA[Michael Kennedy put this great little blog post together outlining 9 things we can do when starting a new ASP.NET MVC 3 project. It’s a good starting point since the MVC 3 web application template is already out of date &#8230; <a href="http://alonsorobles.com/2012/03/20/todo-when-creating-a-new-asp-net-mvc-project/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Michael Kennedy put this great little blog post together outlining <a href="http://blog.michaelckennedy.net/2012/03/07/9-ways-your-brand-new-mvc-project-can-be-better/">9 things we can do when starting a new ASP.NET MVC 3 project</a>. It’s a good starting point since the MVC 3 web application template is already out of date with many things. Here is a quick run down of the things I do and don’t in comparison to his list:</p>
<ol>
<li>Remove the <em>MicrosoftMvc*.js</em> AJAX and validation scripts.</li>
<li>Update NuGet packages… I do things a little differently here. I completely remove the <em>EntityFramework</em> package (I may add it or another ORM back in later, but that ends up usually in a persistence specific project and it is usually a micro ORM). I also remove <em>jQuery Visual Studio 2010 Intellisense</em> package since the contents are bundled with the updated the other jQuery packages anyway. I remove the <em>jQuery UI</em> package (and add it back when I need it). Update the remaining jQuery and Modernizr packages.</li>
<li>Create my own <em>JavaScripts</em> directory to avoid overwrites when updating or installing other JavaScript based packages.</li>
<li>Love this tip! Who doesn’t like intellisense?</li>
<li>Already did this in step 2.</li>
<li>I’m not the sharpest tool in the shed when it comes to CSS. But this tip sounds like a good idea. Wonder if there is a NuGet package for Eric Meyer’s <em>reset.css</em> file?</li>
<li>I skip this step. In my opinion, the only models in my MVC project are view models anyway. So I leave the <em>Models</em> folder in my MVC project alone. If my project requires business models, they get placed in a business logic project. If I have persistence models, they get placed in my persistence project.</li>
<li>Another area where I am not the sharpest tool in the shed. But I do like fast loading pages, so I am going to try this tip out and put all the JavaScript files that I can at the bottom. Just remember that some do need to go at the top.</li>
<li>And yet another tip that I haven’t tried, but plan.</li>
</ol>
<p>As a recap, tips 1, 3, and 4 make perfect sense. Tip 2 also makes sense, but I tweak it to fit my needs and I suggest you do to. I glaze over tip 5 and skip tip 7 because it was either previously addressed or doesn’t fit my needs. Tips 6, 8, and 9 sound like good ideas and I need to try them out.</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2012/03/20/todo-when-creating-a-new-asp-net-mvc-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Few Web Development Resources</title>
		<link>http://alonsorobles.com/2012/03/15/a-few-web-development-resources/</link>
		<comments>http://alonsorobles.com/2012/03/15/a-few-web-development-resources/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 15:30:04 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=340</guid>
		<description><![CDATA[This morning at work, I walked past Tim Thomas&#8217; desk and noticed he was doing some fancy wire framing with Balsamiq. On his other monitor, I saw the development version of the wire frame implementation and was impressed with the &#8230; <a href="http://alonsorobles.com/2012/03/15/a-few-web-development-resources/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This morning at work, I walked past <a href="http://www.timgthomas.com/">Tim Thomas&#8217;</a> desk and noticed he was doing some fancy wire framing with <a href="http://www.balsamiq.com/">Balsamiq</a>. On his other monitor, I saw the development version of the wire frame implementation and was impressed with the look and feel. More specifically, the smoothness of the user interface and how nicely the colors fit together. He quickly pointed me at some resources he uses to do make this magic happen. Here they are:</p>
<ul>
<li><a href="http://nerdi.net/">Nerdi</a> - A collection of web development resources. From toolkits, to frameworks, to documentation, and all sorts of goodness.</li>
<li><a href="http://fortawesome.github.com/Font-Awesome/">Font Awesome</a> - An iconic font.</li>
<li><a href="http://kuler.adobe.com/">kuler</a> - A color scheme generator.</li>
</ul>
<p>More stuff for me to play with. It&#8217;s times like these I wish I had a more innate ability to work with colors and design. It reminds me of the time I attempted to use <a href="http://colorschemedesigner.com/">another color scheme generator</a> and quickly learned that the tool alone would not help my bad design. It only color coordinated it.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2012/03/15/a-few-web-development-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two SharePoint 2010 Webinars for Developers</title>
		<link>http://alonsorobles.com/2011/01/26/two-sharepoint-2010-webinars-for-developers/</link>
		<comments>http://alonsorobles.com/2011/01/26/two-sharepoint-2010-webinars-for-developers/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 07:00:30 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Windows Sharepoint Services]]></category>
		<category><![CDATA[caml]]></category>
		<category><![CDATA[client object model]]></category>
		<category><![CDATA[data access]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[linq 2 sharepoint]]></category>
		<category><![CDATA[odata]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[sharepoint 2010]]></category>
		<category><![CDATA[SharePoint Server 2010]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=241</guid>
		<description><![CDATA[Andrew Connell, a SharePoint MVP, hosted two introduction to SharePoint 2010 webinars for developers over the last couple of days in conjuction with DevExpress. These were a really good concise introduction to SharePoint development. I would recommend that anyone who is &#8230; <a href="http://alonsorobles.com/2011/01/26/two-sharepoint-2010-webinars-for-developers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.andrewconnell.com/blog">Andrew Connell</a>, a SharePoint MVP, hosted two introduction to SharePoint 2010 webinars for developers over the last couple of days in conjuction with <a href="http://www.devexpress.com/">DevExpress</a>. These were a really good concise introduction to SharePoint development. I would recommend that anyone who is interested in getting started with SharePoint development take a couple of hours to check these out.</p>
<h3>Intoduction to SharePoint 2010 for Developers</h3>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube-nocookie.com/v/wOdvARkMzGo?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/wOdvARkMzGo?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>This webinar is also available on the <a href="http://tv.devexpress.com/#IntroToSharePointWebinar">DevExpress Channel</a>.</p>
<h3>SharePoint 2010 Data Access</h3>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube-nocookie.com/v/GwZQEu64Rlk?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/GwZQEu64Rlk?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>This webinar is also available on the <a href="http://tv.devexpress.com/#SharePoint2010DataAccessWebinar">DevExpress Channel</a>.</p>
<p>Andrew was also kind enough to publish <a href="http://www.andrewconnell.com/blog/archive/2011/01/26/wrap-up-from-my-devexpress-webinar-today.aspx">a wrap-up blog post</a> with links to additional references.</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2011/01/26/two-sharepoint-2010-webinars-for-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Real World SharePoint Solutions 2010 Release</title>
		<link>http://alonsorobles.com/2010/11/19/real-world-sharepoint-solutions-2010-release/</link>
		<comments>http://alonsorobles.com/2010/11/19/real-world-sharepoint-solutions-2010-release/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 19:44:55 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Windows Sharepoint Services]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[sharepoint 2010]]></category>
		<category><![CDATA[SharePoint Server 2010]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=210</guid>
		<description><![CDATA[I never got around to buying Real World SharePoint 2007: Indispensable Experiences From 16 MOSS and WSS MVPs (Programmer to Programmer) but, I did get a chance to glance through the book and there was some great material. Today, I &#8230; <a href="http://alonsorobles.com/2010/11/19/real-world-sharepoint-solutions-2010-release/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_215" class="wp-caption alignleft" style="width: 127px"><a href="http://www.amazon.com/gp/product/0470597135?ie=UTF8&amp;tag=importchaos-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0470597135"><img class="size-full wp-image-215 " title="Real World SharePoint 2010" src="http://alonsorobles.com/wp-content/uploads/2010/11/513yxKw1sHL._SL160_.jpg" alt="Indispensable Experiences from 22 MVPs [Paperback]" width="127" height="160" /></a><p class="wp-caption-text">Real World SharePoint 2010</p></div><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=importchaos-20&amp;l=as2&amp;o=1&amp;a=0470597135" border="0" alt="" width="1" height="1" /></p>
<p>I never got around to buying <a href="http://www.amazon.com/gp/product/0470168358?ie=UTF8&amp;tag=importchaos-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0470168358">Real World SharePoint 2007: Indispensable Experiences From 16 MOSS and WSS MVPs (Programmer to Programmer)</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=importchaos-20&amp;l=as2&amp;o=1&amp;a=0470168358" border="0" alt="" width="1" height="1" /> but, I did get a chance to glance through the book and there was some great material. Today, I found out that <a href="http://www.amazon.com/gp/product/0470597135?ie=UTF8&amp;tag=importchaos-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0470597135">Real World SharePoint 2010: Indispensable Experiences from 22 MVPs</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=importchaos-20&amp;l=as2&amp;o=1&amp;a=0470597135" border="0" alt="" width="1" height="1" /> is going to be available on November 23, 2010.</p>
<p>Of course, I just pre-ordered my copy.</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2010/11/19/real-world-sharepoint-solutions-2010-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mystery Access Denied Troubleshooting in SharePoint</title>
		<link>http://alonsorobles.com/2010/07/13/mystery-access-denied-troubleshooting-in-sharepoint/</link>
		<comments>http://alonsorobles.com/2010/07/13/mystery-access-denied-troubleshooting-in-sharepoint/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 19:24:55 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Windows Sharepoint Services]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=181</guid>
		<description><![CDATA[Problem In a MOSS 2007 installation we have a site with a wiki library. The wiki library has been customized a bit with event handlers to do some fancy automatic permission assignments to individual wiki pages and prevent some users &#8230; <a href="http://alonsorobles.com/2010/07/13/mystery-access-denied-troubleshooting-in-sharepoint/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>Problem</h3>
<p>In a MOSS 2007 installation we have a site with a wiki library. The wiki library has been customized a bit with event handlers to do some fancy automatic permission assignments to individual wiki pages and prevent some users from approving wiki pages that they are not allowed to. This was done so that every user is able to add, read, edit wiki pages but let individual identified users handle the approval of the pages in a large wiki library. These details are probably inconsequential.</p>
<p>The real problem is there is a single user who can can read, add, and edit wiki pages. He is also assigned to approve some wiki pages. However, when he attempts to view the history of a wiki page for approval he gets an access denied error. The history page for a wiki page in a wiki library is an application page (in _layouts directory) with the following path: <em>http://&lt;path to sharepoint site&gt;/_layouts/VersionDiff.aspx?ListID=&lt;my wiki library id&gt;&amp;ID=&lt;id for the wiki page&gt;&amp;Source=&lt;return path&gt;</em></p>
<p>The user also experiences this error when clicking the link to view incoming links. The path for this page is: <em>http://&lt;path to sharepoint site&gt;/_layouts/BackLinks.aspx?ListID=&lt;my wiki library id&gt;&amp;ID=&lt;id for the wiki page&gt;</em></p>
<p>This user has the following permissions being applied:</p>
<ul>
<li>Site Permissions &#8211; Limited Access</li>
<li>List Permissions &#8211; Limited Access</li>
<li>Item Permissions &#8211; Design</li>
</ul>
<p>This user is also part of a domain group which has the following permissions being applied:</p>
<ul>
<li>Site Permissions &#8211; Limited Access</li>
<li>List Permissions &#8211; Contribute</li>
<li>Item Permissions &#8211; Contribute</li>
</ul>
<h3>Solution</h3>
<p>I started <a href="http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/4b87b659-4fca-4780-a205-466265759f0a/">a thread in the TechNet SharePoint forum</a> in hopes of finding someone who has run into this problem before. Thanks to the folks in the forums, there were a few suggestions on how to resolve the problem. Unfortunately, I didn&#8217;t have the opportunity to try most of these. But here are the suggestions:</p>
<ul>
<li>Delete the user from the SharePoint site and re-add the user and re-apply permissions.</li>
<li>Recreate the AD account</li>
<li>Assign a higher level privillege to a parent object (This is the band aid that I applied which resolved the problem)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2010/07/13/mystery-access-denied-troubleshooting-in-sharepoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List of SharePoint 2007 Web Templates</title>
		<link>http://alonsorobles.com/2010/05/17/list-of-sharepoint-2007-web-templates/</link>
		<comments>http://alonsorobles.com/2010/05/17/list-of-sharepoint-2007-web-templates/#comments</comments>
		<pubDate>Mon, 17 May 2010 21:51:06 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Windows Sharepoint Services]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=172</guid>
		<description><![CDATA[I came across this reference in the past and I needed it again today. Took me a few minutes to find it, so I decided to save a copy of the table here on my blog: Template Name Description GLOBAL#0 &#8230; <a href="http://alonsorobles.com/2010/05/17/list-of-sharepoint-2007-web-templates/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I came across <a title="Sharepoint Templates - Types " href="http://blogs.technet.com/araviraj/archive/2008/06/18/sharepoint-templates-types.aspx">this reference</a> in the past and I needed it again today. Took me a few minutes to find it, so I decided to save a copy of the table here on my blog:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="319" valign="top">Template Name</td>
<td width="319" valign="top">Description</td>
</tr>
<tr>
<td width="319" valign="top">GLOBAL#0</td>
<td width="319" valign="top"> Global template (1033)</td>
</tr>
<tr>
<td width="319" valign="top">STS#0</td>
<td width="319" valign="top"> Team Site (1033)</td>
</tr>
<tr>
<td width="319" valign="top">STS#1</td>
<td width="319" valign="top"> Blank Site (1033)</td>
</tr>
<tr>
<td width="319" valign="top">STS#2</td>
<td width="319" valign="top"> Document Workspace (1033)</td>
</tr>
<tr>
<td width="319" valign="top">MPS#0</td>
<td width="319" valign="top"> Basic Meeting Workspace (1033)</td>
</tr>
<tr>
<td width="319" valign="top">MPS#1</td>
<td width="319" valign="top"> Blank Meeting Workspace (1033)</td>
</tr>
<tr>
<td width="319" valign="top">MPS#2</td>
<td width="319" valign="top"> Decision Meeting Workspace (1033)</td>
</tr>
<tr>
<td width="319" valign="top">MPS#3</td>
<td width="319" valign="top"> Social Meeting Workspace (1033)</td>
</tr>
<tr>
<td width="319" valign="top">MPS#4</td>
<td width="319" valign="top"> Multipage Meeting Workspace (1033)</td>
</tr>
<tr>
<td width="319" valign="top">CENTRALADMIN#0</td>
<td width="319" valign="top"> Central Admin Site (1033)</td>
</tr>
<tr>
<td width="319" valign="top">WIKI#0</td>
<td width="319" valign="top"> Wiki Site (1033)</td>
</tr>
<tr>
<td width="319" valign="top">BLOG#0</td>
<td width="319" valign="top"> Blog (1033)</td>
</tr>
<tr>
<td width="319" valign="top">BDR#0</td>
<td width="319" valign="top"> Document Center (1033)</td>
</tr>
<tr>
<td width="319" valign="top">OFFILE#0</td>
<td width="319" valign="top"> Records Center (1033)</td>
</tr>
<tr>
<td width="319" valign="top">OFFILE#1</td>
<td width="319" valign="top"> Records Center (1033)</td>
</tr>
<tr>
<td width="319" valign="top">OSRV#0</td>
<td width="319" valign="top"> Shared Services Administration Site (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SPS#0</td>
<td width="319" valign="top"> SharePoint Portal Server Site (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SPSPERS#0</td>
<td width="319" valign="top"> SharePoint Portal Server Personal Space (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SPSMSITE#0</td>
<td width="319" valign="top"> Personalization Site (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SPSTOC#0</td>
<td width="319" valign="top"> Contents area Template (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SPSTOPIC#0</td>
<td width="319" valign="top"> Topic area template (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SPSNEWS#0</td>
<td width="319" valign="top"> News Site (1033)</td>
</tr>
<tr>
<td width="319" valign="top">CMSPUBLISHING#0</td>
<td width="319" valign="top"> Publishing Site (1033)</td>
</tr>
<tr>
<td width="319" valign="top">BLANKINTERNET#0</td>
<td width="319" valign="top"> Publishing Site (1033)</td>
</tr>
<tr>
<td width="319" valign="top">BLANKINTERNET#1</td>
<td width="319" valign="top"> Press Releases Site (1033)</td>
</tr>
<tr>
<td width="319" valign="top">BLANKINTERNET#2</td>
<td width="319" valign="top"> Publishing Site with Workflow (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SPSNHOME#0</td>
<td width="319" valign="top"> News Site (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SPSSITES#0</td>
<td width="319" valign="top"> Site Directory (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SPSCOMMU#0</td>
<td width="319" valign="top"> Community area template (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SPSREPORTCENTER#0</td>
<td width="319" valign="top"> Report Center (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SPSPORTAL#0</td>
<td width="319" valign="top"> Collaboration Portal (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SRCHCEN#0</td>
<td width="319" valign="top"> Search Center with Tabs (1033)</td>
</tr>
<tr>
<td width="319" valign="top">PROFILES#0</td>
<td width="319" valign="top"> Profiles (1033)</td>
</tr>
<tr>
<td width="319" valign="top">BLANKINTERNETCONTAINER#0</td>
<td width="319" valign="top"> Publishing Portal (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SPSMSITEHOST#0</td>
<td width="319" valign="top"> My Site Host (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SRCHCENTERLITE#0</td>
<td width="319" valign="top"> Search Center (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SRCHCENTERLITE#1</td>
<td width="319" valign="top"> Search Center (1033)</td>
</tr>
<tr>
<td width="319" valign="top">SPSBWEB#0</td>
<td width="319" valign="top"> SharePoint Portal Server BucketWeb Template (1033)</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2010/05/17/list-of-sharepoint-2007-web-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Remove or hide the &#8220;Site Actions&#8221; menu</title>
		<link>http://alonsorobles.com/2010/04/27/how-to-remove-or-hide-the-site-actions-menu/</link>
		<comments>http://alonsorobles.com/2010/04/27/how-to-remove-or-hide-the-site-actions-menu/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 20:27:32 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Windows Sharepoint Services]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=164</guid>
		<description><![CDATA[I came across the request for this from a client I was working with. The client pointed me to some research he found on web (one link from MSDN and another from another blog). After some reading and further research, &#8230; <a href="http://alonsorobles.com/2010/04/27/how-to-remove-or-hide-the-site-actions-menu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I came across the request for this from a client I was working with. The client pointed me to some research he found on web (one link from <a title="SPSecurityTrimmedControl Class (Microsoft.SharePoint.WebControls)" href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spsecuritytrimmedcontrol.aspx">MSDN</a> and another from <a title="SPSecurityTrimmedControl and PermissionsString" href="http://codename-srini.blogspot.com/2009/04/spsecuritytrimmedcontrol-and.html">another blog</a>). After some reading and further research, I found a great <a title="How to remove Site Actions and View All Site Content " href="http://www.sharepointkings.com/2008/11/how-to-remove-site-actions-and-view-all.html">post that walks you through doing this</a>.</p>
<p>Essentially, the solution is to wrap the SiteActions control with a SPSecurityTrimmedControl in the master page. The only trick to this is identifying the appropriate permission string to use for the control so you do not remove the menu from users who will actually need to use it. The string can easly be composed after reviewing the set of users (or a group of users) who will need access and checking the rights associated permission levels granted those users (or group).</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2010/04/27/how-to-remove-or-hide-the-site-actions-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Important Custom SharePoint List Template Notes</title>
		<link>http://alonsorobles.com/2010/03/17/important-custom-sharepoint-list-template-notes/</link>
		<comments>http://alonsorobles.com/2010/03/17/important-custom-sharepoint-list-template-notes/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 08:30:05 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Windows Sharepoint Services]]></category>
		<category><![CDATA[moss 2007]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=160</guid>
		<description><![CDATA[I came across these notes on creating custom list templates when I was searching for a quick reference on list types and base type definitions to use in the CAML ListTemplate element. I copied them verbatim here for my reference. &#8230; <a href="http://alonsorobles.com/2010/03/17/important-custom-sharepoint-list-template-notes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I came across these notes on creating custom list templates when I was searching for a quick reference on list types and base type definitions to use in the CAML ListTemplate element. I copied them verbatim here for my reference. The original post can be found here: <a href="http://karinebosch.wordpress.com/walkthroughs/create-custom-list-templates-in-caml/">http://karinebosch.wordpress.com/walkthroughs/create-custom-list-templates-in-caml/</a></p>
<blockquote><p>Important details to note are:</p>
<ul>
<li><strong>FeatureId</strong> (optional): This is the ID of the feature in which the list template is defined</li>
<li><strong>BaseType</strong> (required): Specifies the base type, or default schema, for lists created using this template. See the table below for the 5 possibilities.</li>
<li><strong>Type</strong>: this is the template type on which the new list template is based. Se the table below for all base types of standard SharePoint list templates.</li>
<li><strong>DisplayName:</strong> the display name of the list template.</li>
</ul>
<p>More details can be found in <a title="http://blogit.create.pt/blogs/andrevala/archive/2008/05/17/SharePoint-2007-Deployment_3A00_-List-Template-Features.aspx" href="http:" target="_blank">André Vala’s post</a>.</p>
<p>The following table lists the 5 base types:</p>
<table border="0" width="50%">
<tbody>
<tr>
<td width="20%"><strong> Base Type</strong></td>
<td width="70%"><strong> Description</strong></td>
</tr>
<tr>
<td>0</td>
<td>Generic List</td>
</tr>
<tr>
<td>1</td>
<td>Document Library</td>
</tr>
<tr>
<td>3</td>
<td>Discussion List</td>
</tr>
<tr>
<td>4</td>
<td>Survey</td>
</tr>
<tr>
<td>5</td>
<td>Issue List</td>
</tr>
</tbody>
</table>
<p>The following table lists all available list templates with their template type id and their corresponding feature id:</p>
<table border="0" width="90%">
<tbody>
<tr>
<td width="35%"><strong> Type of list</strong></td>
<td width="20%"><strong> TemplateId</strong></td>
<td width="45%"><strong> FeatureId</strong></td>
</tr>
<tr>
<td>Generic List</td>
<td>100</td>
<td>00BFEA71-DE22-43B2-A848-C05709900100</td>
</tr>
<tr>
<td>Document Library</td>
<td>101</td>
<td>00BFEA71-E717-4E80-AA17-D0C71B360101</td>
</tr>
<tr>
<td>Survey</td>
<td>102</td>
<td>00BFEA71-EB8A-40B1-80C7-506BE7590102</td>
</tr>
<tr>
<td>Links List</td>
<td>103</td>
<td>00BFEA71-2062-426C-90BF-714C59600103</td>
</tr>
<tr>
<td>Announcements List</td>
<td>104</td>
<td>00BFEA71-D1CE-42de-9C63-A44004CE0104</td>
</tr>
<tr>
<td>Contacts List</td>
<td>105</td>
<td>00BFEA71-7E6D-4186-9BA8-C047AC750105</td>
</tr>
<tr>
<td>Events List</td>
<td>106</td>
<td>00BFEA71-EC85-4903-972D-EBE475780106</td>
</tr>
<tr>
<td>Tasks List</td>
<td>107</td>
<td>00BFEA71-A83E-497E-9BA0-7A5C597D0107</td>
</tr>
<tr>
<td>Discussion List</td>
<td>108</td>
<td>00BFEA71-6A49-43FA-B535-D15C05500108</td>
</tr>
<tr>
<td>Picture Library</td>
<td>109</td>
<td>00BFEA71-52D4-45B3-B544-B1C71B620109</td>
</tr>
<tr>
<td>Data Sources</td>
<td>110</td>
<td>00BFEA71-F381-423D-B9D1-DA7A54C50110</td>
</tr>
<tr>
<td>Site template gallery</td>
<td>111</td>
<td></td>
</tr>
<tr>
<td>User Information List</td>
<td>112</td>
<td></td>
</tr>
<tr>
<td>Web Part gallery</td>
<td>113</td>
<td></td>
</tr>
<tr>
<td>List Template gallery</td>
<td>114</td>
<td></td>
</tr>
<tr>
<td>XML Form Library</td>
<td>115</td>
<td>00BFEA71-1E1D-4562-B56A-F05371BB0115</td>
</tr>
<tr>
<td>Master Pages gallery</td>
<td>116</td>
<td></td>
</tr>
<tr>
<td>No-Code Workflows</td>
<td>117</td>
<td>00BFEA71-F600-43F6-A895-40C0DE7B0117</td>
</tr>
<tr>
<td>Custom Workflow Process</td>
<td>118</td>
<td>00BFEA71-2D77-4A75-9FCA-76516689E21A</td>
</tr>
<tr>
<td>Wiki Page Library</td>
<td>119</td>
<td>00BFEA71-C796-4402-9F2F-0EB9A6E71B18</td>
</tr>
<tr>
<td>Grid List</td>
<td>120</td>
<td>00BFEA71-3A1D-41D3-A0EE-651D11570120</td>
</tr>
<tr>
<td>Data Connection Library</td>
<td>130</td>
<td>00BFEA71-DBD7-4F72-B8CB-DA7AC0440130</td>
</tr>
<tr>
<td>Workflow History</td>
<td>140</td>
<td>00BFEA71-4EA5-48D4-A4AD-305CF7030140</td>
</tr>
<tr>
<td>Gantt Task List</td>
<td>150</td>
<td>00BFEA71-513D-4CA0-96C2-6A47775C0119</td>
</tr>
<tr>
<td>Meeting Series List</td>
<td>200</td>
<td></td>
</tr>
<tr>
<td>Meeting Agenda List</td>
<td>201</td>
<td></td>
</tr>
<tr>
<td>Meeting Attendees List</td>
<td>202</td>
<td></td>
</tr>
<tr>
<td>Meeting Decision List</td>
<td>204</td>
<td></td>
</tr>
<tr>
<td>Meeting Objectives List</td>
<td>207</td>
<td></td>
</tr>
<tr>
<td>Meeting Things to Bring List</td>
<td>211</td>
<td></td>
</tr>
<tr>
<td>Meeting Workspace Pages List</td>
<td>212</td>
<td></td>
</tr>
<tr>
<td>Blog Posts List</td>
<td>301</td>
<td></td>
</tr>
<tr>
<td>Blog Comments List</td>
<td>302</td>
<td></td>
</tr>
<tr>
<td>Blog Categories List</td>
<td>303</td>
<td></td>
</tr>
<tr>
<td>Status Indicator (KPI) List</td>
<td>432</td>
<td>7ED6CD55-B479-4EB7-A529-E99A24C10BD3</td>
</tr>
<tr>
<td>Report Library</td>
<td>433</td>
<td>6E53DD27-98F2-4AE5-85A0-E9A8EF4AA6DF</td>
</tr>
<tr>
<td>Publishing Pages Library</td>
<td>850</td>
<td></td>
</tr>
<tr>
<td>Issue Tracking List</td>
<td>1100</td>
<td>00BFEA71-5932-4F9C-AD71-1557E5751100</td>
</tr>
<tr>
<td>Administrator Tasks List</td>
<td>1200</td>
<td></td>
</tr>
<tr>
<td>Translation Management Library</td>
<td>1300</td>
<td>29D85C25-170C-4df9-A641-12DB0B9D4130</td>
</tr>
<tr>
<td>Translation List</td>
<td>1301</td>
<td>29D85C25-170C-4df9-A641-12DB0B9D4130</td>
</tr>
<tr>
<td>Slide Library</td>
<td>2100</td>
</tr>
</tbody>
</table>
<p>0BE49FE9-9BC9-409d-ABF9-702753BD878D</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2010/03/17/important-custom-sharepoint-list-template-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery and jCarousel in SharePoint</title>
		<link>http://alonsorobles.com/2009/06/24/jquery-and-jcarousel-in-sharepoint/</link>
		<comments>http://alonsorobles.com/2009/06/24/jquery-and-jcarousel-in-sharepoint/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 18:17:11 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Windows Sharepoint Services]]></category>
		<category><![CDATA[jCarousel]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=155</guid>
		<description><![CDATA[I recently had to integrate jCarousel into a SharePoint web part. Since jCarousel is a plugin for jQuery, it means I also had to get jQuery integrated with SharePoint. In order to accomplish this, I followed some good feature packaging &#8230; <a href="http://alonsorobles.com/2009/06/24/jquery-and-jcarousel-in-sharepoint/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently had to integrate <a href="http://sorgalla.com/jcarousel/">jCarousel</a> into a SharePoint web part. Since jCarousel is a plugin for <a href="http://jquery.com/">jQuery</a>, it means I also had to get jQuery integrated with SharePoint. In order to accomplish this, I followed some good feature packaging instructions found from a few different blog posts:</p>
<ul>
<li><a href="http://weblogs.asp.net/gunnarpeipman/archive/2008/12/12/sharepoint-jquery-deployment-feature.aspx">SharePoint jQuery Deployment Feature</a></li>
<li><a href="http://weblogs.asp.net/wesleybakker/archive/2008/12/18/sharepoint-jquery-stay-here-feature.aspx">SharePoint + jQuery = Stay Here Feature</a></li>
<li><a href="http://weblogs.asp.net/wesleybakker/archive/2008/12/16/sharepoint-slideshow-webpart.aspx">SharePoint Slideshow Web Part</a></li>
</ul>
<p>After figuring out how to package jCarousel and jQuery using SharePoint delegate controls, I was ready for business with the implementation of the web part.</p>
<p>The web part itself was nothing fancy. I used a Repeater control to generate the list item (LI) elements with the content I needed in the carousel. I wrapped the Repeater in an unordered list (UL) which was wrapped in a DIV tag that had the runat attribute set to server. So basically, I just followed the mark up instructions provided in the <a href="http://sorgalla.com/projects/jcarousel/#Getting-Started">jCarousel documentation</a>.</p>
<p>The wrapping DIV tag was used in my webpart code to initialize jCarousel. The code snippet below shows how I implemented it:</p>
<pre name="code" class="c-sharp:nogutter:nocontrols">
protected override void OnLoad(EventArgs e)
{
  if (!Page.ClientScript.IsStartupScriptRegistered(this.GetType(), this.ClientID))
  {
    Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID, @"
      &lt;script type=""text/javascript""&gt;
        jQuery(document).ready(function() {
          jQuery('#" + carouselDiv.ClientID + @"').jcarousel({
            // Configuration goes here
            vertical: true,
            scroll: 2,
            visible: 4
          });
        });
      &lt;/script&gt;
    ");
  }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2009/06/24/jquery-and-jcarousel-in-sharepoint/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

