<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Generator: Stage</title>
	<atom:link href="http://blog.stonean.com/2008/01/31/generator-stage/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stonean.com/2008/01/31/generator-stage/</link>
	<description></description>
	<lastBuildDate>Thu, 26 Nov 2009 22:54:35 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Andrew Stone</title>
		<link>http://blog.stonean.com/2008/01/31/generator-stage/#comment-76</link>
		<dc:creator>Andrew Stone</dc:creator>
		<pubDate>Sun, 27 Apr 2008 18:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://stonean.wordpress.com/2008/01/31/generator-stage/#comment-76</guid>
		<description>Thanks for the comments Jamie.  I don&#039;t think having _data as opposed to _author should prevent any code sharing.  You would need to qualify the paths anyway.  Am I missing something there?&lt;br/&gt;&lt;br/&gt;Other people have mentioned method_missing and constructs similar to your array usage.  It&#039;s cool and eliminates a bunch of repetitive code, but I&#039;m just not a fan of this sort of code architecture.  As soon as one of the fields differ (password, size, style, etc..) you have to do more work to make a change than you would with the current construct.&lt;br/&gt;&lt;br/&gt;Basically this construct is there with the assumption that something is going to change.  So, I think it&#039;s more maintainable this way...interesting how we have different takes on maintainability. &lt;br/&gt;&lt;br/&gt;However, it&#039;s just not mine anymore now is it? :)  &lt;br/&gt;&lt;br/&gt;If others express the same wants I don&#039;t see why I couldn&#039;t add a flag in to the generator to provide different templating formats.&lt;br/&gt;&lt;br/&gt;I know it needs to be smarter than it is now and will be working on that in the near future.&lt;br/&gt;&lt;br/&gt;Thanks again for the comments.  They are very much appreciated :)</description>
		<content:encoded><![CDATA[<p>Thanks for the comments Jamie.  I don&#8217;t think having _data as opposed to _author should prevent any code sharing.  You would need to qualify the paths anyway.  Am I missing something there?</p>
<p>Other people have mentioned method_missing and constructs similar to your array usage.  It&#8217;s cool and eliminates a bunch of repetitive code, but I&#8217;m just not a fan of this sort of code architecture.  As soon as one of the fields differ (password, size, style, etc..) you have to do more work to make a change than you would with the current construct.</p>
<p>Basically this construct is there with the assumption that something is going to change.  So, I think it&#8217;s more maintainable this way&#8230;interesting how we have different takes on maintainability. </p>
<p>However, it&#8217;s just not mine anymore now is it? :)  </p>
<p>If others express the same wants I don&#8217;t see why I couldn&#8217;t add a flag in to the generator to provide different templating formats.</p>
<p>I know it needs to be smarter than it is now and will be working on that in the near future.</p>
<p>Thanks again for the comments.  They are very much appreciated :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Macey</title>
		<link>http://blog.stonean.com/2008/01/31/generator-stage/#comment-75</link>
		<dc:creator>Jamie Macey</dc:creator>
		<pubDate>Sun, 27 Apr 2008 17:27:00 +0000</pubDate>
		<guid isPermaLink="false">http://stonean.wordpress.com/2008/01/31/generator-stage/#comment-75</guid>
		<description>It occurs to me that meta-defining the helper methods would go a long way to making it more maintainable, without a significant runtime penalty as one might get with a method_missing hook.  Apologies for the crappy formatting, blogger&#039;s a bit draconic about pre/code tags.&lt;br/&gt;&lt;br/&gt;module AuthorsHelper&lt;br/&gt;  %w(first_name last_name).each do &#124;field&#124;&lt;br/&gt;    eval &lt;&lt;-DEF&lt;br/&gt;      def author_#{field}_value&lt;br/&gt;        if @action_name == &quot;show&quot;&lt;br/&gt;          h @author.#{field}&lt;br/&gt;        else&lt;br/&gt;          text_field_tag &quot;author[#{field}]&quot;, @author.#{field}&lt;br/&gt;        end&lt;br/&gt;      end&lt;br/&gt;    DEF&lt;br/&gt;  end&lt;br/&gt;end</description>
		<content:encoded><![CDATA[<p>It occurs to me that meta-defining the helper methods would go a long way to making it more maintainable, without a significant runtime penalty as one might get with a method_missing hook.  Apologies for the crappy formatting, blogger&#8217;s a bit draconic about pre/code tags.</p>
<p>module AuthorsHelper<br />  %w(first_name last_name).each do |field|<br />    eval < <-DEF<br/>      def author_#{field}_value<br />        if @action_name == &#8220;show&#8221;<br />          h @author.#{field}<br />        else<br />          text_field_tag &#8220;author[#{field}]&#8220;, @author.#{field}<br />        end<br />      end<br />    DEF<br />  end<br />end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Macey</title>
		<link>http://blog.stonean.com/2008/01/31/generator-stage/#comment-74</link>
		<dc:creator>Jamie Macey</dc:creator>
		<pubDate>Sun, 27 Apr 2008 17:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://stonean.wordpress.com/2008/01/31/generator-stage/#comment-74</guid>
		<description>This is similar to what I&#039;m doing in my own projects.  The main differences are that I name _data.html.erb _author.html.erb, in such a way that it can be used as a partial in other actions (like Article).  Of course, that precludes using your &quot;smart&quot; helpers that will just wind up being a maintenance pain as the data model evolves over time.</description>
		<content:encoded><![CDATA[<p>This is similar to what I&#8217;m doing in my own projects.  The main differences are that I name _data.html.erb _author.html.erb, in such a way that it can be used as a partial in other actions (like Article).  Of course, that precludes using your &#8220;smart&#8221; helpers that will just wind up being a maintenance pain as the data model evolves over time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donald H.</title>
		<link>http://blog.stonean.com/2008/01/31/generator-stage/#comment-55</link>
		<dc:creator>Donald H.</dc:creator>
		<pubDate>Fri, 01 Feb 2008 00:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://stonean.wordpress.com/2008/01/31/generator-stage/#comment-55</guid>
		<description>cool.</description>
		<content:encoded><![CDATA[<p>cool.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
