<?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>michael pardo</title>
	<atom:link href="http://michaelpardo.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://michaelpardo.com</link>
	<description>web software developer</description>
	<lastBuildDate>Thu, 19 Nov 2009 17:33:16 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wootsi 2.0 and Wootsi Lite Published</title>
		<link>http://michaelpardo.com/2009/11/wootsi-2-0-and-wootsi-lite-published/</link>
		<comments>http://michaelpardo.com/2009/11/wootsi-2-0-and-wootsi-lite-published/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 17:29:38 +0000</pubDate>
		<dc:creator>Michael Pardo</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://michaelpardo.com/?p=387</guid>
		<description><![CDATA[A new version of Wootsi has been published along with an ad-supported lite version. You can grab either of these from the Android Market.
Version 2.0 contains some bug fixes along with independently updating items. Also, you can now view items while the application is updating.
Go check it out on the Android Market. Click this link [...]]]></description>
			<content:encoded><![CDATA[<p>A new version of Wootsi has been published along with an ad-supported lite version. You can grab either of these from the Android Market.</p>
<p>Version 2.0 contains some bug fixes along with independently updating items. Also, you can now view items while the application is updating.</p>
<p>Go check it out on the Android Market. Click this link from your android phone to go directly to the app: <a href="market://search?q=wootsi">market://search?q=wootsi</a></p>
]]></content:encoded>
			<wfw:commentRss>http://michaelpardo.com/2009/11/wootsi-2-0-and-wootsi-lite-published/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>DDMS on Snow Leopard</title>
		<link>http://michaelpardo.com/2009/09/ddms-for-android-sdk-1-6-on-snow-leopard/</link>
		<comments>http://michaelpardo.com/2009/09/ddms-for-android-sdk-1-6-on-snow-leopard/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 18:31:55 +0000</pubDate>
		<dc:creator>Michael Pardo</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[1.6]]></category>
		<category><![CDATA[64 bit]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[DDMS]]></category>
		<category><![CDATA[donut]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[Snow Leopard]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://michaelpardo.com/?p=365</guid>
		<description><![CDATA[So a new Android SDK came out a couple days ago. I tried opening up a trace file, but traceview complained that the swt version was not 64-bit compatible. I Googled around for a bit and found a semi-convoluted solution that worked for the 1.5 SDK. Here&#8217;s my simplified solution for 1.6.
Download and upzip the [...]]]></description>
			<content:encoded><![CDATA[<p>So a new Android SDK came out a couple days ago. I tried opening up a trace file, but traceview complained that the swt version was not 64-bit compatible. I Googled around for a bit and found a semi-convoluted solution that worked for the 1.5 SDK. Here&#8217;s my simplified solution for 1.6.</p>
<p>Download and upzip the file below into &#8220;/tools/lib/&#8221; in your 1.6 SDK folder. That should do it.</p>
<a class="downloadlink" href="http://michaelpardo.com/wp-content/plugins/download-monitor/download.php?id=3" title="Version1.6 downloaded 329 times" >SWT Fix (329)</a>
]]></content:encoded>
			<wfw:commentRss>http://michaelpardo.com/2009/09/ddms-for-android-sdk-1-6-on-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Wootsi update published</title>
		<link>http://michaelpardo.com/2009/08/wootsi-update-published/</link>
		<comments>http://michaelpardo.com/2009/08/wootsi-update-published/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 16:02:27 +0000</pubDate>
		<dc:creator>Michael Pardo</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://michaelpardo.com/?p=349</guid>
		<description><![CDATA[
I recently pushed an update to my latest Android app, Wootsi.
Wootsi goes out to woot.com and four other woot.com sub-sites to grab their &#8220;daily deal&#8221;. The app gives users an advantage to those who don&#8217;t, because they can receive periodic updates at times they choose. I have my preferences set to update every three hours [...]]]></description>
			<content:encoded><![CDATA[<div style="float:right; padding-left:15px;"><object style="width: 320px; height: 480px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="320" height="480" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="scale" value="showall" /><param name="base" value="http://content.screencast.com/users/kensuke155/folders/Jing/media/10d36b53-08b0-43c3-beb7-646b2bf07151/" /><param name="flashvars" value="containerwidth=320&amp;containerheight=480&amp;thumb=http://content.screencast.com/users/kensuke155/folders/Jing/media/10d36b53-08b0-43c3-beb7-646b2bf07151/FirstFrame.jpg&amp;loaderstyle=jing&amp;content=http://content.screencast.com/users/kensuke155/folders/Jing/media/10d36b53-08b0-43c3-beb7-646b2bf07151/00000036.swf&amp;blurover=false" /><param name="src" value="http://content.screencast.com/users/kensuke155/folders/Jing/media/10d36b53-08b0-43c3-beb7-646b2bf07151/jingswfplayer.swf" /><param name="align" value="right" /><param name="bgcolor" value="#FFFFFF" /><param name="hspace" value="15" /><embed style="width: 320px; height: 480px;" type="application/x-shockwave-flash" width="320" height="480" src="http://content.screencast.com/users/kensuke155/folders/Jing/media/10d36b53-08b0-43c3-beb7-646b2bf07151/jingswfplayer.swf" hspace="15" bgcolor="#FFFFFF" align="right" flashvars="containerwidth=320&amp;containerheight=480&amp;thumb=http://content.screencast.com/users/kensuke155/folders/Jing/media/10d36b53-08b0-43c3-beb7-646b2bf07151/FirstFrame.jpg&amp;loaderstyle=jing&amp;content=http://content.screencast.com/users/kensuke155/folders/Jing/media/10d36b53-08b0-43c3-beb7-646b2bf07151/00000036.swf&amp;blurover=false" base="http://content.screencast.com/users/kensuke155/folders/Jing/media/10d36b53-08b0-43c3-beb7-646b2bf07151/" scale="showall" quality="high"></embed></object></div>
<p>I recently pushed an update to my latest Android app, Wootsi.</p>
<p>Wootsi goes out to woot.com and four other woot.com sub-sites to grab their &#8220;daily deal&#8221;. The app gives users an advantage to those who don&#8217;t, because they can receive periodic updates at times they choose. I have my preferences set to update every three hours starting at 7:15 AM.</p>
<p>Another feature is &#8220;woot off&#8221; detection, which will fetch updates at a faster rate while a woot off is happening.</p>
<p>The first version of the app had some major bugs, but this update fixes them and adds some new features.</p>
<p>Search for Wootsi on your Android phone to find out more.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelpardo.com/2009/08/wootsi-update-published/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SubSonic condition expressions</title>
		<link>http://michaelpardo.com/2009/07/subsonic-condition-expressions/</link>
		<comments>http://michaelpardo.com/2009/07/subsonic-condition-expressions/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 19:07:33 +0000</pubDate>
		<dc:creator>Michael Pardo</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SubSonic]]></category>

		<guid isPermaLink="false">http://michaelpardo.com/?p=256</guid>
		<description><![CDATA[Let&#8217;s say I have a table called &#8220;Contacts&#8221;. I&#8217;d like to search that table for the string &#8220;michael pardo&#8221;, however, I could pass in the string &#8220;pardo michael&#8221; instead. I&#8217;d like it to work either way, so here&#8217;s what I think the query should look like:

1
2
3
4
5
6
7
8
9
10
11
12
SELECT * 
FROM Contacts
WHERE 
&#40;
    FirstName LIKE [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say I have a table called <strong>&#8220;Contacts&#8221;</strong>. I&#8217;d like to search that table for the string <strong>&#8220;michael pardo&#8221;</strong>, however, I could pass in the string <strong>&#8220;pardo michael&#8221;</strong> instead. I&#8217;d like it to work either way, so here&#8217;s what I think the query should look like:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> 
<span style="color: #993333; font-weight: bold;">FROM</span> Contacts
<span style="color: #993333; font-weight: bold;">WHERE</span> 
<span style="color: #66cc66;">&#40;</span>
    FirstName <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%michael%'</span> 
    <span style="color: #993333; font-weight: bold;">OR</span> LastName <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%michael%'</span>
<span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">AND</span> 
<span style="color: #66cc66;">&#40;</span>
    FirstName <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%pardo%'</span> 
    <span style="color: #993333; font-weight: bold;">OR</span> LastName <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%pardo%'</span>
<span style="color: #66cc66;">&#41;</span></pre></td></tr></table></div>

<p>Okay, well how do I enclose those condition expressions with SubSonic? We can take advantage of the <strong>Expression</strong> syntax to make this work. Here&#8217;s the SubSonic code, broken up by query parts.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">// SELECT * FROM Contacts</span>
var q <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Select<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">From</span><span style="color: #008000;">&lt;</span>Contact<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// WHERE (FirstName LIKE '%michael%' OR LastName LIKE '%michael%')</span>
q.<span style="color: #0000FF;">WhereExpression</span><span style="color: #000000;">&#40;</span>Contact.<span style="color: #0000FF;">Columns</span>.<span style="color: #0000FF;">FirstName</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Like</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;%michael%&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
q.<span style="color: #0000FF;">Or</span><span style="color: #000000;">&#40;</span>Contact.<span style="color: #0000FF;">Columns</span>.<span style="color: #0000FF;">LastName</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Like</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;%michael%&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// AND (FirstName LIKE '%pardo%' OR LastName LIKE '%pardo%')</span>
q.<span style="color: #0000FF;">AndExpression</span><span style="color: #000000;">&#40;</span>Contact.<span style="color: #0000FF;">Columns</span>.<span style="color: #0000FF;">FirstName</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Like</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;%pardo%&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
q.<span style="color: #0000FF;">Or</span><span style="color: #000000;">&#40;</span>Contact.<span style="color: #0000FF;">Columns</span>.<span style="color: #0000FF;">LastName</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Like</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;%pardo%&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
q.<span style="color: #0000FF;">ExecuteTypedList</span><span style="color: #008000;">&lt;</span>Contact<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>One problem I encountered with this method was with chaining. If I chain the <strong>&#8220;or&#8221;</strong> commands instead of calling them separately, SubSonic will short-change you on the constraints it passes in. Some sort of bug (or feature) maybe.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelpardo.com/2009/07/subsonic-condition-expressions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Washington Trip</title>
		<link>http://michaelpardo.com/2009/07/washington-trip/</link>
		<comments>http://michaelpardo.com/2009/07/washington-trip/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 17:56:13 +0000</pubDate>
		<dc:creator>Michael Pardo</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://michaelpardo.com/?p=198</guid>
		<description><![CDATA[My wife and I just took a trip to Washington state. Here&#8217;s a video.
&#160;
]]></description>
			<content:encoded><![CDATA[<p>My wife and I just took a trip to Washington state. Here&#8217;s a video.</p>
<p><object width='400' height='225'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='http://vimeo.com/moogaloop.swf?clip_id=5408574&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' /><embed src='http://vimeo.com/moogaloop.swf?clip_id=5408574&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='400' height='225'></embed></object><br />
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelpardo.com/2009/07/washington-trip/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Easy Ruby on Rails Deployment with Capistrano and Passenger</title>
		<link>http://michaelpardo.com/2009/06/easy-ruby-on-rails-deployment-with-capistrano-and-passenger/</link>
		<comments>http://michaelpardo.com/2009/06/easy-ruby-on-rails-deployment-with-capistrano-and-passenger/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 15:03:13 +0000</pubDate>
		<dc:creator>Michael Pardo</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://michaelpardo.com/?p=135</guid>
		<description><![CDATA[Let&#8217;s start off with a few aliases that speed things up. The commands are pretty self explanatory. I&#8217;ve got my deployment down to a simple acd command, which will add and commit to svn, then deploy to the server. To add a migration before deployment I use acmd. The following commands go into your ~/.bash_login [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s start off with a few aliases that speed things up. The commands are pretty self explanatory. I&#8217;ve got my deployment down to a simple <strong>acd</strong> command, which will add and commit to svn, then deploy to the server. To add a migration before deployment I use <strong>acmd</strong>. The following commands go into your <strong>~/.bash_login</strong> file (assuming you&#8217;re using OS X or Linux).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">svna</span>=<span style="color: #ff0000;">'svn add * --force'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">svnc</span>=<span style="color: #ff0000;">'svn commit . -m &quot;&quot;'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">capd</span>=<span style="color: #ff0000;">'cap deploy'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">capm</span>=<span style="color: #ff0000;">'cap deploy:migrate'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">acd</span>=<span style="color: #ff0000;">'svna; svnc; capd;'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">acmd</span>=<span style="color: #ff0000;">'svna; svnc; capm; capd;'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">rors</span>=<span style="color: #ff0000;">'script/server -b localhost'</span></pre></td></tr></table></div>

<p>If you don&#8217;t already have capistrano setup, it&#8217;s as easy as</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ gem <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-y</span> capistrano</pre></td></tr></table></div>

<p>When I first setup an new rails project I follow these steps</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ rails <span style="color: #660033;">-d</span> mysql PROJECT_NAME
$ <span style="color: #7a0874; font-weight: bold;">cd</span> PROJECT_NAME
$ capify .
$ <span style="color: #c20cb9; font-weight: bold;">svn</span> import PROJECT_PATH SVN_PATH <span style="color: #660033;">-m</span> <span style="color: #ff0000;">'Initial import'</span>
$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..
$ <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-Rf</span> PROJECT_PATH
$ <span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> SVN_PATH
$ mate PROJECT_PATH</pre></td></tr></table></div>

<p>This initial setup process will create the rails project, setup Capistrano, add it to svn, and open it in TextMate. You can of course leave that last line out and use any IDE you wish.</p>
<p>Next open the <strong>config/deploy.rb</strong> file that Capistrano created for you. This is where you will put all your Capistrano instructions:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;">set <span style="color:#ff3333; font-weight:bold;">:user</span>, <span style="color:#996600;">&quot;SUDO_USER&quot;</span>
set <span style="color:#ff3333; font-weight:bold;">:password</span>, <span style="color:#996600;">&quot;SUDO_USER_PASS&quot;</span>
set <span style="color:#ff3333; font-weight:bold;">:domain</span>, <span style="color:#996600;">&quot;example.com&quot;</span>
server domain, <span style="color:#ff3333; font-weight:bold;">:app</span>, <span style="color:#ff3333; font-weight:bold;">:web</span>
role <span style="color:#ff3333; font-weight:bold;">:db</span>, domain, <span style="color:#ff3333; font-weight:bold;">:primary</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>
&nbsp;
set <span style="color:#ff3333; font-weight:bold;">:application</span>, <span style="color:#996600;">&quot;example&quot;</span>
set <span style="color:#ff3333; font-weight:bold;">:deploy_to</span>, <span style="color:#996600;">&quot;/home/example/public_html/#{application}.sandbox.#{domain}/#{application}/&quot;</span>
&nbsp;
default_run_options<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:pty</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF; font-weight:bold;">true</span>
set <span style="color:#ff3333; font-weight:bold;">:use_sudo</span>, <span style="color:#0000FF; font-weight:bold;">true</span>
set <span style="color:#ff3333; font-weight:bold;">:runner</span>, <span style="color:#ff3333; font-weight:bold;">:user</span>
&nbsp;
set <span style="color:#ff3333; font-weight:bold;">:repository</span>,  <span style="color:#996600;">&quot;http://#{domain}/svn/#{application}&quot;</span>
set <span style="color:#ff3333; font-weight:bold;">:scm_username</span>, <span style="color:#996600;">&quot;SVN_USER&quot;</span>
set <span style="color:#ff3333; font-weight:bold;">:scm_password</span>, <span style="color:#996600;">&quot;SVN_USER_PASS&quot;</span>
set <span style="color:#ff3333; font-weight:bold;">:checkout</span>, <span style="color:#996600;">&quot;export&quot;</span>
&nbsp;
namespace <span style="color:#ff3333; font-weight:bold;">:deploy</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  desc <span style="color:#996600;">&quot;Restart Application&quot;</span>
  task <span style="color:#ff3333; font-weight:bold;">:restart</span>, <span style="color:#ff3333; font-weight:bold;">:roles</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:app</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    run <span style="color:#996600;">&quot;touch #{current_path}/tmp/restart.txt&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>Just change all the capitalized tokens to reflect your own settings. Then deploying should be as simple as typing <strong>acd</strong> in the Terminal. I created a blank file at <strong>/tmp/restart.txt</strong> and added it to svn so passenger will restart the rails app when you deploy. Also, you may not want to put your sudo password into <strong>deploy.rb</strong>.</p>
<p>I entountered various struggles in getting everything to work correctly. If you need help with something specific, post it in a comment. I can probably tell you what the problem is.</p>
<p>You can find help for Passenger here: <a href="http://www.modrails.com/">http://www.modrails.com/</a> and help for Capistrano here: <a href="http://www.capify.org/">http://www.capify.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://michaelpardo.com/2009/06/easy-ruby-on-rails-deployment-with-capistrano-and-passenger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Initializing SubSonic in your DNN module</title>
		<link>http://michaelpardo.com/2009/06/initializing-subsonic-in-your-dnn-module/</link>
		<comments>http://michaelpardo.com/2009/06/initializing-subsonic-in-your-dnn-module/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 13:57:18 +0000</pubDate>
		<dc:creator>Michael Pardo</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[SubSonic]]></category>

		<guid isPermaLink="false">http://michaelpardo.com/?p=85</guid>
		<description><![CDATA[SubSonic requires you to put some stuff in the web.config. You may be wondering how you&#8217;re going to distribute your module without requiring the buyer to alter his web.config. Here&#8217;s the method that I use:

1
2
3
4
5
6
7
8
9
10
11
12
private static void InitializeProvider&#40;&#41;
&#123;
    DataService.Provider = new SqlDataProvider&#40;&#41;;
    DataService.Providers = new DataProviderCollection&#40;&#41;;
    [...]]]></description>
			<content:encoded><![CDATA[<p>SubSonic requires you to put some stuff in the web.config. You may be wondering how you&#8217;re going to distribute your module without requiring the buyer to alter his web.config. Here&#8217;s the method that I use:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">private</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> InitializeProvider<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    DataService.<span style="color: #0000FF;">Provider</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> SqlDataProvider<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    DataService.<span style="color: #0000FF;">Providers</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> DataProviderCollection<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    DataProvider provider <span style="color: #008000;">=</span> DataService.<span style="color: #0000FF;">Provider</span><span style="color: #008000;">;</span>
    var config <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> NameValueCollection<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    config.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;SubSonicSqlString&quot;</span>, ConfigurationManager.<span style="color: #0000FF;">ConnectionStrings</span><span style="color: #000000;">&#91;</span><span style="color: #666666;">&quot;SiteSqlServer&quot;</span><span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">ConnectionString</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    provider.<span style="color: #0000FF;">Initialize</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;SubSonicSqlString&quot;</span>, config<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    DataService.<span style="color: #0000FF;">Provider</span>.<span style="color: #0000FF;">DefaultConnectionString</span> <span style="color: #008000;">=</span> ConfigurationManager.<span style="color: #0000FF;">ConnectionStrings</span><span style="color: #000000;">&#91;</span><span style="color: #666666;">&quot;SiteSqlServer&quot;</span><span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">ConnectionString</span><span style="color: #008000;">;</span>
    DataService.<span style="color: #0000FF;">Provider</span>.<span style="color: #0000FF;">GeneratedNamespace</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Example.DataModel&quot;</span><span style="color: #008000;">;</span>
    DataService.<span style="color: #0000FF;">Providers</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>provider<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>This method goes into my <strong>Page_Init</strong> event. Luckily I setup my module pages to inherit a base class that does all my setup. Here&#8217;s the base class:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Collections.Specialized</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Configuration</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Web.UI.HtmlControls</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">DotNetNuke.Entities.Modules</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">SubSonic</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF;">namespace</span> Example.<span style="color: #0000FF;">Common</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> ModuleBase <span style="color: #008000;">:</span> PortalModuleBase
    <span style="color: #000000;">&#123;</span>
        <span style="color: #008080;">#region Events</span>
&nbsp;
        <span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> Page_Init<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">Object</span> sender, EventArgs e<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            InitializeProvider<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #008080;">#endregion</span>
&nbsp;
        <span style="color: #008080;">#region Methods</span>
&nbsp;
        <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> InitializeProvider<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            DataService.<span style="color: #0000FF;">Provider</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> SqlDataProvider<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            DataService.<span style="color: #0000FF;">Providers</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> DataProviderCollection<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            DataProvider provider <span style="color: #008000;">=</span> DataService.<span style="color: #0000FF;">Provider</span><span style="color: #008000;">;</span>
            var config <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> NameValueCollection<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            config.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;SubSonicSqlString&quot;</span>, ConfigurationManager.<span style="color: #0000FF;">ConnectionStrings</span><span style="color: #000000;">&#91;</span><span style="color: #666666;">&quot;SiteSqlServer&quot;</span><span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">ConnectionString</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            provider.<span style="color: #0000FF;">Initialize</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;SubSonicSqlString&quot;</span>, config<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            DataService.<span style="color: #0000FF;">Provider</span>.<span style="color: #0000FF;">DefaultConnectionString</span> <span style="color: #008000;">=</span> ConfigurationManager.<span style="color: #0000FF;">ConnectionStrings</span><span style="color: #000000;">&#91;</span><span style="color: #666666;">&quot;SiteSqlServer&quot;</span><span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">ConnectionString</span><span style="color: #008000;">;</span>
            DataService.<span style="color: #0000FF;">Provider</span>.<span style="color: #0000FF;">GeneratedNamespace</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Example.DataModel&quot;</span><span style="color: #008000;">;</span>
            DataService.<span style="color: #0000FF;">Providers</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>provider<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> RegisterJavascript<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> fullPath<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            var script <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> HtmlGenericControl<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;script&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            script.<span style="color: #0000FF;">Attributes</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;type&quot;</span>, <span style="color: #666666;">&quot;text/javascript&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            script.<span style="color: #0000FF;">Attributes</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;src&quot;</span>, fullPath<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            Page.<span style="color: #0000FF;">Header</span>.<span style="color: #0000FF;">Controls</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>script<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #008080;">#endregion</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>In my last post about including jQuery properly I introduced the <strong>RegisterJavascript</strong> method. We can put the method in this class so we can use it in all pages inheriting the class.</p>
<p>One thing worth mentioning is that the app.config for SubSonic must be setup before you can expect this to work. You should also have a SubSonic data model built and referenced. You can learn more about that here: <a title="Setting up SubSonic in you DNN module Solution" href="http://michaelpardo.com/2009/06/setting-up-subsonic-in-you-dnn-module-solution/">http://michaelpardo.com/2009/06/setting-up-subsonic-in-you-dnn-module-solution/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://michaelpardo.com/2009/06/initializing-subsonic-in-your-dnn-module/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up SubSonic in your DNN module Solution</title>
		<link>http://michaelpardo.com/2009/06/setting-up-subsonic-in-your-dnn-module-solution/</link>
		<comments>http://michaelpardo.com/2009/06/setting-up-subsonic-in-your-dnn-module-solution/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 13:51:22 +0000</pubDate>
		<dc:creator>Michael Pardo</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[SubSonic]]></category>

		<guid isPermaLink="false">http://michaelpardo.com/?p=117</guid>
		<description><![CDATA[In my modules I generally have three different projects. One for SubSonic, one for common stuff, and one for the module itself. The first thing I do when setting up a module is add a project for SubSonic. Let&#8217;s add a &#8220;Class Library&#8221; and call it &#8220;DataModel&#8221;.
I&#8217;ll get to the setup of the other projects [...]]]></description>
			<content:encoded><![CDATA[<p>In my modules I generally have three different projects. One for SubSonic, one for common stuff, and one for the module itself. The first thing I do when setting up a module is add a project for SubSonic. Let&#8217;s add a <strong>&#8220;Class Library&#8221;</strong> and call it <strong>&#8220;DataModel&#8221;</strong>.</p>
<div id="attachment_119" class="wp-caption alignnone" style="width: 310px"><a href="http://michaelpardo.com/wp-content/uploads/2009/06/Picture-12.png" rel="lightbox[117]"><img class="size-medium wp-image-119" title="Add New Project" src="http://michaelpardo.com/wp-content/uploads/2009/06/Picture-12-300x213.png" alt="Add New Project" width="300" height="213" /></a><p class="wp-caption-text">Add New Project</p></div>
<p>I&#8217;ll get to the setup of the other projects in another post. Let&#8217;s just worry about SubSonic for right now as it is probably the easiest project to setup.</p>
<p>Now that we have the project added let&#8217;s add our app config. From the <strong>&#8220;Project&#8221;</strong> menu click <strong>&#8220;Add New Item&#8230;&#8221;</strong>. Select <strong>&#8220;Application Configuration File&#8221;</strong> and add it to your project.</p>
<div id="attachment_122" class="wp-caption alignnone" style="width: 310px"><a href="http://michaelpardo.com/wp-content/uploads/2009/06/Picture-2.png" rel="lightbox[117]"><img class="size-medium wp-image-122" title="Add New Item" src="http://michaelpardo.com/wp-content/uploads/2009/06/Picture-2-300x180.png" alt="Add New Item" width="300" height="180" /></a><p class="wp-caption-text">Add New Item</p></div>
<p>Here is the blank app.config file that I use to get started. You will need to alter some of the settings to fit your project.</p>
<p>You can find more information on setting up the app.config here: <a title="SubSonic getting started" href="http://subsonicproject.com/setup/gettingstarted/">http://subsonicproject.com/setup/gettingstarted/</a></p>
<p>After you have done the initial setup you will be able to generate your classes. If you haven&#8217;t already setup SubSonic in Visual Studio you can learn how here: <a href="http://michaelpardo.com/2009/06/visuals-studio-and-subsonic/">http://michaelpardo.com/2009/06/visuals-studio-and-subsonic/</a></p>
<p>Click <strong>&#8220;Tools&#8221;</strong> and then <strong>&#8220;SubSonic&#8221;</strong> to generate the classes. You will not see the files in the <strong>Solution Explorer</strong> until you click <strong>&#8220;Show All Files&#8221;</strong> and <strong>&#8220;Refresh&#8221;</strong>. If you have done all these steps properly you will see a <strong>&#8220;Generated&#8221;</strong> folder in your project. Add the folder and build.</p>
<p>You&#8217;re done! Now you can reference this project in your module.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelpardo.com/2009/06/setting-up-subsonic-in-your-dnn-module-solution/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Including jQuery in DotNetNuke</title>
		<link>http://michaelpardo.com/2009/06/including-jquery-in-dotnetnuke/</link>
		<comments>http://michaelpardo.com/2009/06/including-jquery-in-dotnetnuke/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 14:00:12 +0000</pubDate>
		<dc:creator>Michael Pardo</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.michaelpardo.com/?p=61</guid>
		<description><![CDATA[As of DNN 5, jQuery is now included. This is great, unless you&#8217;re distributing a module and you want it to work with versions below 5 also. Fortunately there is a way to check if jQuery has already been included, thereby avoiding conflicts.
Notice the code is placed in the Page_PreRender event. This is an absolute [...]]]></description>
			<content:encoded><![CDATA[<p>As of DNN 5, jQuery is now included. This is great, unless you&#8217;re distributing a module and you want it to work with versions below 5 also. Fortunately there is a way to check if jQuery has already been included, thereby avoiding conflicts.</p>
<p>Notice the code is placed in the <strong>Page_PreRender</strong> event. This is an absolute must.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> Page_PreRender<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, EventArgs e<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>HttpContext.<span style="color: #0000FF;">Current</span>.<span style="color: #0000FF;">Items</span><span style="color: #000000;">&#91;</span><span style="color: #666666;">&quot;jquery_registered&quot;</span><span style="color: #000000;">&#93;</span> <span style="color: #008000;">==</span> <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #008080; font-style: italic;">// load jQuery</span>
		RegisterJavascript<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;/DesktopModules/MyModule/js/jquery.js&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
		<span style="color: #008080; font-style: italic;">// let other modules know about jQuery</span>
		HttpContext.<span style="color: #0000FF;">Current</span>.<span style="color: #0000FF;">Items</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;jquery_registered&quot;</span>, <span style="color: #666666;">&quot;true&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #008080; font-style: italic;">// load all the plugins</span>
	RegisterJavascript<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;/DesktopModules/MyModule/js/jquery.foo.js&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	RegisterJavascript<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;/DesktopModules/MyModule/js/jquery.bar.js&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Here&#8217;s the RegisterJavascript method I use.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> RegisterJavascript<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> fullPath<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
	var script <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> HtmlGenericControl<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;script&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	script.<span style="color: #0000FF;">Attributes</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;type&quot;</span>, <span style="color: #666666;">&quot;text/javascript&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	script.<span style="color: #0000FF;">Attributes</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;src&quot;</span>, fullPath<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
	Page.<span style="color: #0000FF;">Header</span>.<span style="color: #0000FF;">Controls</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>script<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Now you can continue using jQuery without any worries of conflict.</p>
<p>One mistake that had me tripped up for a while was an include of jQuery in the skin. I didn&#8217;t realize it was there and I couldn&#8217;t figure out why none of my plugins worked. As a general rule I never include jQuery in the skin.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelpardo.com/2009/06/including-jquery-in-dotnetnuke/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio and SubSonic</title>
		<link>http://michaelpardo.com/2009/06/visuals-studio-and-subsonic/</link>
		<comments>http://michaelpardo.com/2009/06/visuals-studio-and-subsonic/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 13:15:13 +0000</pubDate>
		<dc:creator>Michael Pardo</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SubSonic]]></category>

		<guid isPermaLink="false">http://www.michaelpardo.com/?p=45</guid>
		<description><![CDATA[If you aren&#8217;t using SubSonic yet, you should be. You can find out more at subsonicproject.com. Here&#8217;s the easiest way to get SubSonic working smoothly from within Visual Studio.
Download the SubSonic source from http://subsonicproject.googlecode.com/files/SubSonic_2.1_Final_Source.zip and extract it. I chose to create a folder for SubSonic in &#8220;C:\Program Files\&#8221;.
Next, in Visual Studio click the &#8220;External Tools&#8230;&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>If you aren&#8217;t using SubSonic yet, you should be. You can find out more at <a href="http://subsonicproject.com/">subsonicproject.com</a>. Here&#8217;s the easiest way to get SubSonic working smoothly from within Visual Studio.</p>
<p>Download the SubSonic source from <a href="http://subsonicproject.googlecode.com/files/SubSonic_2.1_Final_Source.zip">http://subsonicproject.googlecode.com/files/SubSonic_2.1_Final_Source.zip</a> and extract it. I chose to create a folder for SubSonic in <strong>&#8220;C:\Program Files\&#8221;</strong>.</p>
<div id="attachment_46" class="wp-caption alignnone" style="width: 310px"><a href="http://www.michaelpardo.com/wp-content/uploads/2009/06/Picture-1.png" rel="lightbox[45]"><img class="size-medium wp-image-46" title="SubSonic Folder" src="http://www.michaelpardo.com/wp-content/uploads/2009/06/Picture-1-300x231.png" alt="SubSonic Folder" width="300" height="231" /></a><p class="wp-caption-text">SubSonic Folder</p></div>
<p>Next, in Visual Studio click the <strong>&#8220;External Tools&#8230;&#8221;</strong> menu item from the <strong>&#8220;Tools&#8221;</strong> menu. A dialog box will pop up allowing you to manage the external tools. Click <strong>&#8220;Add&#8221;</strong> and enter the following:</p>
<div id="attachment_49" class="wp-caption alignnone" style="width: 310px"><a href="http://www.michaelpardo.com/wp-content/uploads/2009/06/Picture-4.png" rel="lightbox[45]"><img class="size-medium wp-image-49" title="External Tools Dialog" src="http://www.michaelpardo.com/wp-content/uploads/2009/06/Picture-4-300x292.png" alt="External Tools Dialog" width="300" height="292" /></a><p class="wp-caption-text">External Tools Dialog</p></div>
<p><strong>Title: </strong>SubSonic (or whatever you want really)<br />
<strong>Command:</strong> C:\YOUR_SUBSONIC_PATH\SubSonic2.2\SubCommander\sonic.exe<br />
<strong>Arguments:</strong> generate /out $(ProjectDir)/Generated<br />
<strong>Initial directory:</strong> $(ProjectDir)</p>
<p>I check <strong>&#8220;User Output window&#8221;</strong>. If you don&#8217;t a console window will popup every time you run the command.</p>
<p>Now you will have a <strong>&#8220;SubSonic&#8221; </strong>menu item in your <strong>&#8220;Tools&#8221;</strong> menu which will generate all your subsonic classes.</p>
<div id="attachment_54" class="wp-caption alignnone" style="width: 199px"><a href="http://www.michaelpardo.com/wp-content/uploads/2009/06/Picture-11.png" rel="lightbox[45]"><img class="size-medium wp-image-54" title="Tools Menu" src="http://www.michaelpardo.com/wp-content/uploads/2009/06/Picture-11-189x300.png" alt="Tools Menu" width="189" height="300" /></a><p class="wp-caption-text">Tools Menu</p></div>
<p>Of course, you need to have your app.config/web.config setup with SubSonic for the classes to generate. You can find more information about doing that here: <a title="Getting started with SubSonic" href="http://subsonicproject.com/setup/gettingstarted/">http://subsonicproject.com/setup/gettingstarted/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelpardo.com/2009/06/visuals-studio-and-subsonic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
