<?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; development</title>
	<atom:link href="http://alonsorobles.com/tag/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>CQRS and Event Sourcing Resources</title>
		<link>http://alonsorobles.com/2011/08/11/cqrs-and-event-sourcing-resources/</link>
		<comments>http://alonsorobles.com/2011/08/11/cqrs-and-event-sourcing-resources/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 15:18:40 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[Command Query Responsibility Segregation]]></category>
		<category><![CDATA[Domain Driven Design]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[CQRS]]></category>
		<category><![CDATA[DDD]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Event Sourcing]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=314</guid>
		<description><![CDATA[At work, an initiative to implement some CQRS style architecture for some of our projects subsystems has begun. We were looking at ways to horizontally scale our system and a colleague suggested that we look at CQRS and Event Sourcing. &#8230; <a href="http://alonsorobles.com/2011/08/11/cqrs-and-event-sourcing-resources/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At work, an initiative to implement some CQRS style architecture for some of our projects subsystems has begun. We were looking at ways to horizontally scale our system and a colleague suggested that we look at CQRS and Event Sourcing. Over the last month, we have researched the topic, spiked out the implementation, and started migrating some parts of our bounded contexts to make use of the architecture.</p>
<p>Below is a list of links to white papers, blog posts, sample applications, and other information on CQRS and Event Sourcing. There are not listed in any particular order:</p>
<ul>
<li><a href="http://elegantcode.com/2009/11/11/cqrs-la-greg-young/">CQRS à la Greg Young</a></li>
<li><a href="https://github.com/MarkNijhof/Fohjin">Fohjin</a></li>
<li><a href="http://cqrsinfo.com/documents/cqrs-introduction/">CQRS Introduction</a></li>
<li><a href="http://blog.jonathanoliver.com/2010/07/cqrs-event-store/"> CQRS Event Store</a></li>
</ul>
<p>I may add links to this post from time to time as I come across useful ones.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2011/08/11/cqrs-and-event-sourcing-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running Apache Cassandra 0.8.2 on Windows 7</title>
		<link>http://alonsorobles.com/2011/08/08/running-apache-cassandra-0-8-2-on-windows-7/</link>
		<comments>http://alonsorobles.com/2011/08/08/running-apache-cassandra-0-8-2-on-windows-7/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 19:54:42 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[Cassandra]]></category>
		<category><![CDATA[Development Tools & Languages]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[big data]]></category>
		<category><![CDATA[cassandra]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[windows 7]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=298</guid>
		<description><![CDATA[I needed to get Apache Cassandra running locally on my Windows 7 box for development purposes. This post will cover what I did to get it running. Prepare the Run Time Environment Cassandra was developed in Java. This means that &#8230; <a href="http://alonsorobles.com/2011/08/08/running-apache-cassandra-0-8-2-on-windows-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I needed to get <a href="http://cassandra.apache.org/">Apache Cassandra </a>running locally on my Windows 7 box for development purposes. This post will cover what I did to get it running.</p>
<h3>Prepare the Run Time Environment</h3>
<p>Cassandra was developed in Java. This means that my environment needs to have a functional Java run time environment. According to the Cassandra documentation at the time of installation, it requires the most stable version of Java 1.6. I figured since I am a developer and our current project may need some Java development in the near future then I may as well have an up to date Java development environment. So I surfed my way to Oracle&#8217;s web site and got the latest and greatest Java Development Kit (<a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Java Platform (JDK) 7</a>). After downloading and running the installer. I was ready to get Cassandra installed.</p>
<h3>Running Cassandra Locally</h3>
<p>After getting my Java environment in order it was time to get Cassandra running. The first thing I did was to download the binary package for the <a href="http://cassandra.apache.org/download/">latest stable Cassandra release (version 0.8.2)</a>.</p>
<p>I then realized that I didn&#8217;t have a was to extract the contents on this current box. So the next step was to get a utility that was capable of extracting from a g-zipped tar ball. There are plenty of utilities that do this and I just grabbed <a href="http://www.7-zip.org/">7-Zip</a> since its free and works.</p>
<p>Now back to business. The next step was to extract the Cassandra binary files. I extracted them to <strong>c:\dev\cassandra\apache-cassandra-0.8.2</strong> using the 7-zip utility. <strong>NOTE:</strong> Make sure there are no spaces in the path as this may cause problems later.</p>
<p>Now for everything to work correctly, you need to update the JAVA_HOME and CASSANDRA_HOME system variables. In my case, I needed to create them. To this, I did the following:</p>
<ol>
<li>Click the <strong>Start Menu</strong></li>
<li>Right click <strong>Computer</strong>
<ol>
<li>Click <strong>Properties </strong>(this opens the <em>Control Panel</em> in the <em>System and Security &gt; System</em> view)<strong><br />
</strong></li>
</ol>
</li>
<li>Click <strong>Advanced system settings</strong> on the left side (this opens the <em>System Properties </em>dialog in the <em>Advanced</em> tab)</li>
<li>Click the <strong>Environment Variables </strong>button (this opens <em>Environment Variables&nbsp; </em>dialog)</li>
<li>Under the <em>System variables</em>group:
<ol>
<li>Click <strong>New&#8230;</strong> (This opens the <em>New System Variable </em>dialog)</li>
<li>Input <strong>JAVA_HOME</strong> for the <em>Variable name</em> text box</li>
<li>Input the path to your java installation for the <em>Variable value</em> text box (I entered <strong>C:\Program Files\Java\jdk1.7.0</strong>)</li>
<li>Click <strong>OK</strong></li>
</ol>
</li>
<li>Under the <em>System variables</em>group:
<ol>
<li>Click <strong>New&#8230;</strong> (This opens the <em>New System Variable </em>dialog)</li>
<li>Input <strong>CASSANDRA_HOME</strong> for the <em>Variable name</em> text box</li>
<li>Input the path to your Cassandra extraction for the <em>Variable value</em> text box (I entered <strong>C:\dev\cassandra\apache-cassandra-0.8.2</strong>)</li>
<li>Click <strong>OK</strong></li>
</ol>
</li>
<li>Click <strong>OK</strong></li>
<li>Click <strong>OK</strong></li>
<li>Close the <em>Control Panel</em></li>
</ol>
<p>We are almost ready. Before running Cassandra, the storage configuration must be modified to make sure that any UNIX style paths are replaced with their corresponding Windows style paths. This is done by opening up the <em>cassandra.yaml</em> file in your favorite text editor and looking for those paths. My file was located in <strong>C:\dev\cassandra\apache-cassandra-0.8.2\conf\cassandra.yaml</strong>. I had to make the following changes:</p>
<ol>
<li>On line 72, I changed <em>/var/lib/cassandra/data </em>to <strong>C:\dev\cassandra\apache-cassandra-0.8.2\data</strong></li>
<li>On line 75, I changed <em>/var/lib/cassandra/commitlog</em> to <strong>C:\dev\cassandra\apache-cassandra-0.8.2\commitlog</strong></li>
<li>On line 78, I changed <em>/var/lib/cassandra/saved_caches</em> to <strong>C:\dev\cassandra\apache-cassandra-0.8.2\saved_caches</strong></li>
</ol>
<p>At this point you should be able to start up and run Cassandra. This can be done via the command prompt like this:<br />
<code><br />
cd \dev\cassandra\apache-cassandra-0.8.2\bin<br />
cassandra.bat<br />
</code><br />
You can also start the client from the command prompt like this:<br />
<code><br />
cd \dev\cassandra\apache-cassandra-0.8.2\bin<br />
cassandra-cli.bat<br />
connect localhost/9160;<br />
</code><br />
What&#8217;s next? Now you can do your development tasks and use your local Cassandra instance as needed. I will probably use <a href="http://topshelf-project.com/">Topshelf</a> or something similar to get Cassandra running as a service so I don&#8217;t have to start it up manually every time I need it. Another option for this is to use <a href="http://runasservice.sourceforge.net/">RunAsAService</a>.</p>
<h3>References</h3>
<p>Here are some links that I used to learn how to do this:</p>
<ul>
<li><a href="http://coderjournal.com/2010/03/cassandra-jump-start-for-the-windows-developer/">Cassandra Jump Start for the Windows Developer</a></li>
<li><a href="http://coderjournal.com/2010/06/run-cassandra-as-a-windows-service/">Run Cassandra as a Windows Service</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2011/08/08/running-apache-cassandra-0-8-2-on-windows-7/feed/</wfw:commentRss>
		<slash:comments>4</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>The PeopleEditor Class and the Visibility Attribute</title>
		<link>http://alonsorobles.com/2008/10/22/the-peopleeditor-class-and-the-visibility-attribute/</link>
		<comments>http://alonsorobles.com/2008/10/22/the-peopleeditor-class-and-the-visibility-attribute/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 10:56:19 +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[development]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=104</guid>
		<description><![CDATA[When doing custom development for MOSS 2007 or WSS 3.0, the PeopleEditor class can come in handy. However, it seems that it begins misbehaving when the the Visibility attribute is changed from its default value of true. Recently, I had the &#8230; <a href="http://alonsorobles.com/2008/10/22/the-peopleeditor-class-and-the-visibility-attribute/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When doing custom development for MOSS 2007 or WSS 3.0, the <a title="PeopleEditor Class (Microsoft.SharePoint.WebControls)" href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.peopleeditor.aspx">PeopleEditor class</a> can come in handy. However, it seems that it begins misbehaving when the the Visibility attribute is changed from its default value of <em>true</em>. Recently, I had the need to make it disappear and reappear depending on certain conditions in a custom form that was developed and I ran into this problem. The work around simply involves using a <em>display</em> style attribute. To make control invisible, set the <em>display</em> style attribute value to <em>none</em>. To make the control visible again, set the <em>display</em> style attribute value back to <em>block</em>.</p>
<p>Here is a sample C# method that I used to make this happen:</p>
<pre name="code" class="c-sharp:nogutter:nocontrols">
private void SetPeopleEditorVisibility(ref PeopleEditor pe, bool visible)
{
  if (pe.Style.Keys.Count &gt; 0 &amp;&amp; pe.Style["display"] != null)
  {
    pe.Style.Remove("display");
  }
  if (visible)
  {
    pe.Style.Add("display", "block");
  }
  else
  {
    pe.Style.Add("display", "none");
  }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2008/10/22/the-peopleeditor-class-and-the-visibility-attribute/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling the SharePoint Safe Mode Call Stack, Disabling Custom Errors and Enabiling Compilation Debugging</title>
		<link>http://alonsorobles.com/2008/06/09/enabling-the-sharepoint-safe-mode-call-stack-disabling-custom-errors-and-enabling-compilation-debugging/</link>
		<comments>http://alonsorobles.com/2008/06/09/enabling-the-sharepoint-safe-mode-call-stack-disabling-custom-errors-and-enabling-compilation-debugging/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 02:21:43 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Internet Information Services]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Windows Sharepoint Services]]></category>
		<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[asp.net 2.0]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iis 7.0]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=58</guid>
		<description><![CDATA[When developling for SharePoint, I find myself always turning on the call stack and disabiling the custom errors in my development environment. It really does help when trying to debug run-time problems. I know there a few posts out there &#8230; <a href="http://alonsorobles.com/2008/06/09/enabling-the-sharepoint-safe-mode-call-stack-disabling-custom-errors-and-enabling-compilation-debugging/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When developling for SharePoint, I find myself always turning on the call stack and disabiling the custom errors in my development environment. It really does help when trying to debug run-time problems. I know there a few posts out there that describe how to do this, but I figured I would repost it as a reference for myself (which you are welcome to use).</p>
<p>Just remember that I do this in my development environment only. I don&#8217;t recommend changing the <em>web.config</em> files in any other environment.</p>
<p><strong>Enabling the Call Stack</strong></p>
<p>Set the value <em>CallStack<strong> </strong></em>attribute in the <em>SafeMode </em>element in the <em>web.config</em> file to <em>true</em>.</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;configuration&gt;
  ...
  &lt;SharePoint&gt;
   &lt;SafeMode MaxControls="200"
             CallStack="true"
             DirectFileDependencies="10"
             TotalFileDependencies="50"
             AllowPageLevelTrace="false"&gt;
    ...
   &lt;/SafeMode&gt;
   ...
 &lt;/SharePoint&gt;
 ...
&lt;/configuration&gt;</pre>
<p><strong>Disabling Custom Errors</strong></p>
<p>Set the value of the <em>mode</em> attribute in the <em>customErrors</em> element to <em>Off</em>.</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;configuration&gt;
  ...
  &lt;system.web&gt;
   ...
   &lt;customErrors mode="Off" /&gt;
   ...
  &lt;/system.web&gt;
 ...
&lt;/configuration&gt;</pre>
<p><strong>Enabiling Compilation Debugging</strong></p>
<p>Set the value of the <em>debug </em>attriute in the <em>compilation</em> element to <em>true</em>.</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;configuration&gt;
  ...
  &lt;system.web&gt;
   ...
   &lt;compilation debug="true"&gt;
    ...
   &lt;/compilation&gt;
   ...
  &lt;/system.web&gt;
 ...
&lt;/configuration&gt;</pre>
<p> <strong>Putting it all together</strong></p>
<pre>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;configuration&gt;
  ...
  &lt;SharePoint&gt;
   &lt;SafeMode MaxControls="200"
             CallStack="true"
             DirectFileDependencies="10"
             TotalFileDependencies="50"
             AllowPageLevelTrace="false"&gt;
    ...
   &lt;/SafeMode&gt;
   ...
 &lt;/SharePoint&gt;
 &lt;system.web&gt;
   ...
   &lt;customErrors mode="Off" /&gt;
   ...
   &lt;compilation debug="true"&gt;
    ...
   &lt;/compilation&gt;
   ...
  &lt;/system.web&gt;
 ...
&lt;/configuration&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2008/06/09/enabling-the-sharepoint-safe-mode-call-stack-disabling-custom-errors-and-enabling-compilation-debugging/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Daniel Larson&#8217;s Best Practices for Elevated Privilege in SharePoint</title>
		<link>http://alonsorobles.com/2008/06/06/daniel-larsons-best-practices-for-elevated-privilege-in-sharepoint/</link>
		<comments>http://alonsorobles.com/2008/06/06/daniel-larsons-best-practices-for-elevated-privilege-in-sharepoint/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 21:57:06 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Windows Sharepoint Services]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=56</guid>
		<description><![CDATA[[via Daniel Larson] Daniel Larson, a MOSS MVP, has been ranting over the past few days about the use of the SPSecurity.RunWithElevatedPrivileges method. While I have been amused with his rants, I share his concerns and frustrations as a result of &#8230; <a href="http://alonsorobles.com/2008/06/06/daniel-larsons-best-practices-for-elevated-privilege-in-sharepoint/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>[via <a href="http://daniellarson.spaces.live.com/Blog/cns!D3543C5837291E93!2005.entry">Daniel Larson</a>]</p>
<p><a href="http://daniellarson.spaces.live.com/Blog/">Daniel Larson</a>, a MOSS MVP, has been ranting over the past few days about the use of the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx">SPSecurity.RunWithElevatedPrivileges</a> method. While I have been amused with his rants, I share his concerns and frustrations as a result of using the method in my SharePoint development experience and seeing the method abused and missused in many code reviews. Today, he posted <a href="http://daniellarson.spaces.live.com/Blog/cns!D3543C5837291E93!2005.entry">a list of his best practices for gaining &#8220;elevated privileges&#8221; SharePoint</a>.</p>
<p>Daniel Larson&#8217;s list of best practives for elevated privileges in SharePoint:</p>
<blockquote>
<ul>
<li>Avoid using SPSecurity.RunwithElevatedPrivilege to access the SharePoint object model. Instead, use the SPUserToken to impersonate with SPSite.</li>
<li>If you do use SPSecurity.RunwithElevatedPrivilege, dispose of all objects in the delegate. Do not pass SharePoint objects out of the <em>RunwithElevatedPrivilege</em>  method.</li>
<li>Only use SPSecurity.RunwithElevatedPrivilege to make network calls under the application pool identity. Don&#8217;t use it for elevation of privilege of SharePoint objects.</li>
<li>Always use the SPSite constructor with an SPUserToken to create an elevated privilege security context in SharePoint. To impersonate the system, use the SystemAccount.UserToken property of the current SPSite context, such as:<br />
var site = new SPSite(SPContext.Current.Site.ID,  SPContext.Current.Site.SystemAccount.UserToken);</li>
<li>Avoid passing SharePoint objects between different security contexts (<em>SPSite</em> instances), with the exception of the SPUserToken used in the SPSite ctor. An SPUser object created from <em>SPSite A </em>cannot (reliably) be passed to <em>SPSite B</em>. This can be the source of obscure bugs in production that are difficult to reproduce in development. For example, an <em>SPUser</em> reference created from SPContext.Current.Site cannot reliably be used in an elevated site context, as the user reference <em>may</em> take on a different meaning in the alternate context.</li>
<li>Never use elevated privilege to bypass security&#8211; always use it to work <em>with</em> security.</li>
<li>Restrict what assemblies can use elevated privilege by running in minimal trust, avoiding the GAC, and auditing any CAS policies deployed with vendor solutions.</li>
</ul>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2008/06/06/daniel-larsons-best-practices-for-elevated-privilege-in-sharepoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upcoming Conferences</title>
		<link>http://alonsorobles.com/2008/06/02/upcoming-conferences/</link>
		<comments>http://alonsorobles.com/2008/06/02/upcoming-conferences/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 17:23:03 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Windows Sharepoint Services]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[governance]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=49</guid>
		<description><![CDATA[Two conferences were announced last week that I want to share with you: PDC2008 [via Andrew Connell] &#8211; Regristration for the Microsoft Professional Developers Conference 2008 is now open and is scheduled to take place in Los Angeles on October 27-30 &#8230; <a href="http://alonsorobles.com/2008/06/02/upcoming-conferences/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Two conferences were announced last week that I want to share with you:</p>
<p><strong>PDC2008</strong> [via <a href="http://andrewconnell.com/blog/archive/2008/05/31/PDC2008-Registration-Open.-and-I-finally-get-to-go.aspx">Andrew Connell</a>] &#8211; Regristration for the <a href="http://www.microsoftpdc.com/">Microsoft Professional Developers Conference 2008</a> is now open and is scheduled to take place in Los Angeles on October 27-30 at the <a href="http://www.lacclink.com/">Los Angeles Convention Center</a>.</p>
<p><strong>SharePoint Best Practices and Governance Conference<em> </em></strong>[via <a href="http://mindsharpblogs.com/bill/archive/2008/06/01/5657.aspx">Bill English</a>] &#8211; The <a href="http://mindsharpblogs.com/bill/archive/2008/06/01/5657.aspx">conference has been announced</a> and will be taking place in Washington DC on September 15-17.</p>
<p>I would like to attend both of these, but I am not sure if I will be able to.</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2008/06/02/upcoming-conferences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a SharePoint Development Environment to Support Silverlight Development</title>
		<link>http://alonsorobles.com/2008/05/27/setting-up-a-sharepoint-development-environment-to-support-silverlight-development/</link>
		<comments>http://alonsorobles.com/2008/05/27/setting-up-a-sharepoint-development-environment-to-support-silverlight-development/#comments</comments>
		<pubDate>Tue, 27 May 2008 17:35:20 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows Sharepoint Services]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[visual studio 2008]]></category>
		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=47</guid>
		<description><![CDATA[[via Andrew Connell] This morning Andrew Connell held a webcast introducing ASP.NET developers to Silverlight development for SharePoint. The webcast is the third in a series of webcasts to help ASP.NET developers get primed for SharePoint development. After the webcast Andrew was kind &#8230; <a href="http://alonsorobles.com/2008/05/27/setting-up-a-sharepoint-development-environment-to-support-silverlight-development/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>[via <a href="http://andrewconnell.com/blog/archive/2008/05/27/What-I-did-to-get-Silverlight-Working-in-SharePoint-in.aspx">Andrew Connell</a>]</p>
<p>This morning <a href="http://andrewconnell.com/blog/Default.aspx">Andrew Connell</a> held a webcast <a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032378831&amp;EventCategory=4&amp;culture=en-US&amp;CountryCode=US">introducing ASP.NET developers to Silverlight development for SharePoint</a>. The webcast is the third in a <a href="http://blogs.importchaos.com/alonsorobles/2008/05/20/sharepoint-ramp-up-webcasts-for-aspnet-developers/">series of webcasts to help ASP.NET developers get primed for SharePoint development</a>. After the webcast Andrew was kind enough to post the <a href="http://andrewconnell.com/blog/archive/2008/05/27/What-I-did-to-get-Silverlight-Working-in-SharePoint-in.aspx">steps he took in preparing his SharePoint development environment for Silverlight development</a>.</p>
<p>I wonder if it is possible to create a solution file to deploy the Silverlight 2 Beta 1 DLL and make the necessry configuration changes to the <em>web.config</em> file to make the set up of the environment easier? I might have to try that.</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2008/05/27/setting-up-a-sharepoint-development-environment-to-support-silverlight-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SharePoint Utilities and Tools</title>
		<link>http://alonsorobles.com/2008/05/23/sharepoint-utilities-and-tools/</link>
		<comments>http://alonsorobles.com/2008/05/23/sharepoint-utilities-and-tools/#comments</comments>
		<pubDate>Fri, 23 May 2008 18:58:34 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[Internet Information Services]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Windows Sharepoint Services]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[utilities]]></category>
		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=44</guid>
		<description><![CDATA[Here are some updates and announcements regarding tools and utilities for SharePoint: Application Pool Manager [via Andrew Connell] &#8211; New version is available and is recommended by Andrew Connell as a must have utility for SharePoint developers. Kavati Studio [via Joel Oleson] &#8230; <a href="http://alonsorobles.com/2008/05/23/sharepoint-utilities-and-tools/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here are some updates and announcements regarding tools and utilities for SharePoint:</p>
<ul>
<li><a title="Download and product information" href="http://www.harbar.net/articles/APM.aspx">Application Pool Manager</a> [via <a href="http://andrewconnell.com/blog/archive/2008/05/23/New-version-of-Spences-Application-Pool-Manager-available.aspx">Andrew Connell</a>] &#8211; New version is available and is recommended by <a href="http://andrewconnell.com/blog/">Andrew Connell</a> as a must have utility for SharePoint developers.</li>
<li><a title="Product information" href="http://www.kivati.com/products/">Kavati Studio</a> [via <a href="http://www.sharepointjoel.com/Lists/Posts/Post.aspx?ID=33">Joel Oleson</a>] &#8211; A new tool to help accelerate SharePoint deployments by creating deployment script generation for deployments.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2008/05/23/sharepoint-utilities-and-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on Robert Bogue&#8217;s Post: How Best Are Your Best Practices</title>
		<link>http://alonsorobles.com/2008/05/23/thoughts-on-robert-bogues-post-how-best-are-your-best-practices/</link>
		<comments>http://alonsorobles.com/2008/05/23/thoughts-on-robert-bogues-post-how-best-are-your-best-practices/#comments</comments>
		<pubDate>Fri, 23 May 2008 17:22:59 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=43</guid>
		<description><![CDATA[Robert Bogue raises some challenging questions and makes some powerful statements in his post, How Best are Your Best Practices, regarding his experiences and struggles with reaching consensus on what a best practice is and applying it. I was in the middle of posting a comment &#8230; <a href="http://alonsorobles.com/2008/05/23/thoughts-on-robert-bogues-post-how-best-are-your-best-practices/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://thorprojects.com/blog/">Robert Bogue</a> raises some challenging questions and makes some powerful statements in his post, <a href="http://thorprojects.com/blog/archive/2008/05/23/how-best-are-your-best-practices.aspx"><em>How Best are Your Best Practices</em></a>, regarding his experiences and struggles with reaching consensus on what a best practice is and applying it. I was in the middle of posting a comment to his post when I realized my thoughts on the post were quite a bit more than a couple of lines in a comment box. And without further adeu, here are my thoughts&#8230;</p>
<h3>Doing what we know we should do</h3>
<p>In his post, Robert asks, &#8220;when are we going to do what we say?&#8221; This question was in context of his findings that there are very few professionals out there that actually use the best practices they know. From a consulting professional perspective, I feel that failing to do what we know we should do is ethically wrong. Clients and customers pay for our expertise and deserve to get it. While I agree that the SharePoint space is so large that even experienced professionals are learning something new about SharePoint on a daily basis, we need to ensure that make use of the best practices that we do know in every project that we undergo regardless of its size and complexity. This is our duty as professionals.</p>
<h3>On defining best practices</h3>
<p>I agree with Robert when he states that the definition of best practices has been a problem space in software development that has yet to be resolved. There are many reasons for this. But let me list a couple:</p>
<ul>
<li>Academically, software engineering methodologies regarding the definition of development practices are still in their infancy. While a lot of progress has been made in this area in the last few decades, software development is not a hard science. Some of us consider it more of an art than a science.</li>
<li>While progress has been made academically in this problem space, there is a large disconnect between academic approaches to the problem and practical approaches used in the industry. I think some of this has to do with the cost of trying different frameworks that generate process and procedures that still end in leading a good number IT and software projects to failure.</li>
</ul>
<p>So what can we do to help reach consensus on best practices? Honestly, I don&#8217;t have a good answer to this question right now. What I can tell you is that what ever practice we do try to use, whether a best practice or not, we should make the effort to take review how the practice helped or hindered us, learn from the experience, and share it so that we may continue to define new best practices and debunk those practices that are not so best anymore (assuming they really were a best practice at one time).</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2008/05/23/thoughts-on-robert-bogues-post-how-best-are-your-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

