<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How A .NET Developer Hacked Out A Rake Task</title>
	<atom:link href="http://lostechies.com/derickbailey/2009/09/17/how-a-net-developer-hacked-out-a-rake-task/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/derickbailey/2009/09/17/how-a-net-developer-hacked-out-a-rake-task/</link>
	<description>Better Than Yesterday</description>
	<lastBuildDate>Thu, 23 May 2013 00:44:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: derick.bailey</title>
		<link>http://lostechies.com/derickbailey/2009/09/17/how-a-net-developer-hacked-out-a-rake-task/#comment-465</link>
		<dc:creator>derick.bailey</dc:creator>
		<pubDate>Mon, 21 Sep 2009 03:09:55 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derickbailey/archive/2009/09/17/how-a-net-developer-hacked-out-a-rake-task.aspx#comment-465</guid>
		<description>@mendicant,

just checked out your &#039;rubicant&#039; project on github... looks like great stuff! i&#039;m probably just going to throw out what i&#039;m playing with after a bit, and fork your solution so I can add on to it.</description>
		<content:encoded><![CDATA[<p>@mendicant,</p>
<p>just checked out your &#8216;rubicant&#8217; project on github&#8230; looks like great stuff! i&#8217;m probably just going to throw out what i&#8217;m playing with after a bit, and fork your solution so I can add on to it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: derick.bailey</title>
		<link>http://lostechies.com/derickbailey/2009/09/17/how-a-net-developer-hacked-out-a-rake-task/#comment-464</link>
		<dc:creator>derick.bailey</dc:creator>
		<pubDate>Mon, 21 Sep 2009 02:59:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derickbailey/archive/2009/09/17/how-a-net-developer-hacked-out-a-rake-task.aspx#comment-464</guid>
		<description>@mendicant,

You bring up some good questions that I&#039;m going to have to think through while playing with this idea.

In terms of any extra work that it would take to maintain a custom task and an msbuild object - they are separate objects. I am calling &#039;yield @msbuild if block_given?&#039; where @msbuild is a var pointing to an MSBuild object.

with this in play, my custom task is all of 27 lines of code, and there&#039;s not much else that I&#039;ll have to do with it, if anything. I should be able to continue expanding the core MSBuild object without changing the task. this should let people have the choice of using the custom task or the generick task w/ the MSBuild class directly.

If anyone&#039;s interested in seeing what I&#039;m doing, it&#039;s up on GitHub: http://github.com/derickbailey/Albacore/ - it&#039;s still very much a work in progress, though... don&#039;t expect it to be a great solution, yet. :)</description>
		<content:encoded><![CDATA[<p>@mendicant,</p>
<p>You bring up some good questions that I&#8217;m going to have to think through while playing with this idea.</p>
<p>In terms of any extra work that it would take to maintain a custom task and an msbuild object &#8211; they are separate objects. I am calling &#8216;yield @msbuild if block_given?&#8217; where @msbuild is a var pointing to an MSBuild object.</p>
<p>with this in play, my custom task is all of 27 lines of code, and there&#8217;s not much else that I&#8217;ll have to do with it, if anything. I should be able to continue expanding the core MSBuild object without changing the task. this should let people have the choice of using the custom task or the generick task w/ the MSBuild class directly.</p>
<p>If anyone&#8217;s interested in seeing what I&#8217;m doing, it&#8217;s up on GitHub: <a href="http://github.com/derickbailey/Albacore/" rel="nofollow">http://github.com/derickbailey/Albacore/</a> &#8211; it&#8217;s still very much a work in progress, though&#8230; don&#8217;t expect it to be a great solution, yet. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mendicant</title>
		<link>http://lostechies.com/derickbailey/2009/09/17/how-a-net-developer-hacked-out-a-rake-task/#comment-463</link>
		<dc:creator>mendicant</dc:creator>
		<pubDate>Fri, 18 Sep 2009 17:52:06 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derickbailey/archive/2009/09/17/how-a-net-developer-hacked-out-a-rake-task.aspx#comment-463</guid>
		<description>To try and be a little more clear...

In the end, I found that once you start having to pass information into your custom task, such as the sln file, build properties like Output dir and such, that having everything in a custom task just got too messy. 

In your define, you just end up wrapping what is essentially a custom class with:
task :name =&gt; :dependencies do
  #custom code
end

So why do all the extra work, violate SRP, etc just to end up with less clean and expressive code that could just be avoided by having the person using the task just write: write the task :name =&gt; :dependencies themselves.

Also, using your footask example, what if they do:

FooTask.new :name, [:dependencies] do
  #some more stuff here
end

Where do you do the #some more stuff here part... before or after? Even better, since you&#039;ve made this a custom task, will you ever really need to do anything inside the block?

These aren&#039;t all answers that I have. Just things that I&#039;ve been thinking about a lot.</description>
		<content:encoded><![CDATA[<p>To try and be a little more clear&#8230;</p>
<p>In the end, I found that once you start having to pass information into your custom task, such as the sln file, build properties like Output dir and such, that having everything in a custom task just got too messy. </p>
<p>In your define, you just end up wrapping what is essentially a custom class with:<br />
task :name => :dependencies do<br />
  #custom code<br />
end</p>
<p>So why do all the extra work, violate SRP, etc just to end up with less clean and expressive code that could just be avoided by having the person using the task just write: write the task :name => :dependencies themselves.</p>
<p>Also, using your footask example, what if they do:</p>
<p>FooTask.new :name, [:dependencies] do<br />
  #some more stuff here<br />
end</p>
<p>Where do you do the #some more stuff here part&#8230; before or after? Even better, since you&#8217;ve made this a custom task, will you ever really need to do anything inside the block?</p>
<p>These aren&#8217;t all answers that I have. Just things that I&#8217;ve been thinking about a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mendicant</title>
		<link>http://lostechies.com/derickbailey/2009/09/17/how-a-net-developer-hacked-out-a-rake-task/#comment-462</link>
		<dc:creator>mendicant</dc:creator>
		<pubDate>Fri, 18 Sep 2009 17:33:54 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derickbailey/archive/2009/09/17/how-a-net-developer-hacked-out-a-rake-task.aspx#comment-462</guid>
		<description>I started out using this form for my project, Rubicant. After a while, I realized that the issues that I have to go through in order to have a custom MsBuild far outweighed the much easier solution of having an MsBuild class.

For example: 

MsBuildTask.new (:compile, [:call_first, :call_second], {:opt =&gt; &#039;opt1&#039;, :opt2 =&gt; &#039;opt2&#039;}) do

end

doesn&#039;t feel as nice to me as eventually moving towards:

task :compile =&gt; [:call_first, :call_second] do
  MsBuild.new(:opt1 =&gt; &#039;opt1&#039;, :opt2 =&gt; &#039;opt2&#039;)
end

In the end, I decided that letting Rake handle the tasks and just creating custom classes (or custom methods which wrap those classes) feels and looks much nicer than custom tasks a la NAnt.

Remember, once you get into Rake, you have the full power of an entire language behind you and it&#039;s easy to take advantage of.
</description>
		<content:encoded><![CDATA[<p>I started out using this form for my project, Rubicant. After a while, I realized that the issues that I have to go through in order to have a custom MsBuild far outweighed the much easier solution of having an MsBuild class.</p>
<p>For example: </p>
<p>MsBuildTask.new (:compile, [:call_first, :call_second], {:opt => &#8216;opt1&#8242;, :opt2 => &#8216;opt2&#8242;}) do</p>
<p>end</p>
<p>doesn&#8217;t feel as nice to me as eventually moving towards:</p>
<p>task :compile => [:call_first, :call_second] do<br />
  MsBuild.new(:opt1 => &#8216;opt1&#8242;, :opt2 => &#8216;opt2&#8242;)<br />
end</p>
<p>In the end, I decided that letting Rake handle the tasks and just creating custom classes (or custom methods which wrap those classes) feels and looks much nicer than custom tasks a la NAnt.</p>
<p>Remember, once you get into Rake, you have the full power of an entire language behind you and it&#8217;s easy to take advantage of.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
