<?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: Better Module Organization</title>
	<atom:link href="http://yehudakatz.com/2009/04/07/better-module-organization/feed/" rel="self" type="application/rss+xml" />
	<link>http://yehudakatz.com/2009/04/07/better-module-organization/</link>
	<description>Random Geek-Related Thoughts</description>
	<lastBuildDate>Wed, 08 Sep 2010 23:53:11 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Daniel Berger</title>
		<link>http://yehudakatz.com/2009/04/07/better-module-organization/comment-page-1/#comment-16918</link>
		<dc:creator>Daniel Berger</dc:creator>
		<pubDate>Fri, 31 Jul 2009 00:54:39 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=232#comment-16918</guid>
		<description>Funny, I was just updating my own &#039;use&#039; library tonight.

http://shards.rubyforge.org/wiki/wiki.pl?Use

1.3.0 is out.</description>
		<content:encoded><![CDATA[<p>Funny, I was just updating my own &#8216;use&#8217; library tonight.</p>
<p><a href="http://shards.rubyforge.org/wiki/wiki.pl?Use" rel="nofollow">http://shards.rubyforge.org/wiki/wiki.pl?Use</a></p>
<p>1.3.0 is out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charly</title>
		<link>http://yehudakatz.com/2009/04/07/better-module-organization/comment-page-1/#comment-16467</link>
		<dc:creator>charly</dc:creator>
		<pubDate>Tue, 26 May 2009 19:42:35 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=232#comment-16467</guid>
		<description>hello Yehuda, 

I&#039;ve been advocating a better use of modules as weel last september, quit glad to see those ideas getting into 3.0

My suggestion at the time, for what it&#039;s worth, was to put the class base methods in a module called &quot;module core&quot; since they are de-core-ated. It made sense with the design pattern it is using. 

Check my post here:
http://ruby.simapse.com/2008/10/rails-refactoring-exercise.html

I used active record for this rails refactoring exercise. 
Trying this out with the AR i remember seeing the all tests pass... to my great surprise.

I&#039;ll look more closely to the hole setup and use dsl.</description>
		<content:encoded><![CDATA[<p>hello Yehuda, </p>
<p>I&#8217;ve been advocating a better use of modules as weel last september, quit glad to see those ideas getting into 3.0</p>
<p>My suggestion at the time, for what it&#8217;s worth, was to put the class base methods in a module called &#8220;module core&#8221; since they are de-core-ated. It made sense with the design pattern it is using. </p>
<p>Check my post here:<br />
<a href="http://ruby.simapse.com/2008/10/rails-refactoring-exercise.html" rel="nofollow">http://ruby.simapse.com/2008/10/rails-refactoring-exercise.html</a></p>
<p>I used active record for this rails refactoring exercise.<br />
Trying this out with the AR i remember seeing the all tests pass&#8230; to my great surprise.</p>
<p>I&#8217;ll look more closely to the hole setup and use dsl.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Collin Miller</title>
		<link>http://yehudakatz.com/2009/04/07/better-module-organization/comment-page-1/#comment-16299</link>
		<dc:creator>Collin Miller</dc:creator>
		<pubDate>Sun, 12 Apr 2009 09:02:54 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=232#comment-16299</guid>
		<description>Ace!

I&#039;ve been thinking for a while now, that the &quot;acts_as_*&quot; pattern would be a whole lot nicer if it was: SomeClass.acts_as(List) instead of SomeClass.acts_as_list

That way any object with the right sub-modules can be a behavior and as an end-user I have some notion of how the code is organized. There may be conventions within the acts_as_* world, but when the strategy is let library authors decide how to reach into core classes it&#039;s one heck of a crapshoot.</description>
		<content:encoded><![CDATA[<p>Ace!</p>
<p>I&#8217;ve been thinking for a while now, that the &#8220;acts_as_*&#8221; pattern would be a whole lot nicer if it was: SomeClass.acts_as(List) instead of SomeClass.acts_as_list</p>
<p>That way any object with the right sub-modules can be a behavior and as an end-user I have some notion of how the code is organized. There may be conventions within the acts_as_* world, but when the strategy is let library authors decide how to reach into core classes it&#8217;s one heck of a crapshoot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lolcatz</title>
		<link>http://yehudakatz.com/2009/04/07/better-module-organization/comment-page-1/#comment-16296</link>
		<dc:creator>lolcatz</dc:creator>
		<pubDate>Sat, 11 Apr 2009 20:28:16 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=232#comment-16296</guid>
		<description>Just out of curiosity, when you guys going to merge 3-0 branch and all your forks to rails/master?

Do you think it&#039;s possible to release 3.0 in May?..</description>
		<content:encoded><![CDATA[<p>Just out of curiosity, when you guys going to merge 3-0 branch and all your forks to rails/master?</p>
<p>Do you think it&#8217;s possible to release 3.0 in May?..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wycats</title>
		<link>http://yehudakatz.com/2009/04/07/better-module-organization/comment-page-1/#comment-16283</link>
		<dc:creator>wycats</dc:creator>
		<pubDate>Wed, 08 Apr 2009 16:27:24 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=232#comment-16283</guid>
		<description>@antonin it does quite a bit more than the normal include, which I described a bit. For one, it supports dependencies, which cannot be done with include because the included hook is run AFTER the module is included (which confounds the ability to override methods in a dependency and call super).

It also simplifies the included hook/class_eval pattern. The point is to make it a lot easier to mentally map what&#039;s going on, without a bunch of boilerplate that you have to grok every time.</description>
		<content:encoded><![CDATA[<p>@antonin it does quite a bit more than the normal include, which I described a bit. For one, it supports dependencies, which cannot be done with include because the included hook is run AFTER the module is included (which confounds the ability to override methods in a dependency and call super).</p>
<p>It also simplifies the included hook/class_eval pattern. The point is to make it a lot easier to mentally map what&#8217;s going on, without a bunch of boilerplate that you have to grok every time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://yehudakatz.com/2009/04/07/better-module-organization/comment-page-1/#comment-16282</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Wed, 08 Apr 2009 16:02:08 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=232#comment-16282</guid>
		<description>So what does the use method look like? Does it, unlike the original code, include the dependencies rather than erroring out? It seems so based on your last code snippets.


If so, are there potential problems when you don&#039;t know exactly what modules are being included? It seems useful to know that AbstractController::Renderer is included, and with this code (if it does automatically include dependencies) I&#039;d have to know what all of the modules&#039; dependencies are in order to determine what functionality I&#039;ve got mixed in. Not a hard thing to do, obviously, but I wonder what your thoughts are.

Also, I&#039;m a bit confused as to why ActionController::Renderer is not required in the first example but required in the second, but that may be due to a lack of context.

As an aside, your blog is great; this stuff is very interesting to me! I&#039;d be even happier with more frequent posts *nudge nudge*.</description>
		<content:encoded><![CDATA[<p>So what does the use method look like? Does it, unlike the original code, include the dependencies rather than erroring out? It seems so based on your last code snippets.</p>
<p>If so, are there potential problems when you don&#8217;t know exactly what modules are being included? It seems useful to know that AbstractController::Renderer is included, and with this code (if it does automatically include dependencies) I&#8217;d have to know what all of the modules&#8217; dependencies are in order to determine what functionality I&#8217;ve got mixed in. Not a hard thing to do, obviously, but I wonder what your thoughts are.</p>
<p>Also, I&#8217;m a bit confused as to why ActionController::Renderer is not required in the first example but required in the second, but that may be due to a lack of context.</p>
<p>As an aside, your blog is great; this stuff is very interesting to me! I&#8217;d be even happier with more frequent posts *nudge nudge*.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Aman</title>
		<link>http://yehudakatz.com/2009/04/07/better-module-organization/comment-page-1/#comment-16279</link>
		<dc:creator>Bob Aman</dc:creator>
		<pubDate>Wed, 08 Apr 2009 12:30:10 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=232#comment-16279</guid>
		<description>I like it.  I&#039;ve run into this problem a lot myself, and I might have to borrow some of this.</description>
		<content:encoded><![CDATA[<p>I like it.  I&#8217;ve run into this problem a lot myself, and I might have to borrow some of this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antonin</title>
		<link>http://yehudakatz.com/2009/04/07/better-module-organization/comment-page-1/#comment-16276</link>
		<dc:creator>Antonin</dc:creator>
		<pubDate>Wed, 08 Apr 2009 07:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=232#comment-16276</guid>
		<description>I like the idea of abstracting repeated idioms like included/class_eval thing but what&#039;s the point of redefining the &quot;include&quot; method to &quot;use&quot; if it does the same thing, Does is check that the included module wasn&#039;t previously included ? Else what&#039;s the point ?

Do thoses module helpers gets its own separate lib of does it fall into ActiveSupport ?</description>
		<content:encoded><![CDATA[<p>I like the idea of abstracting repeated idioms like included/class_eval thing but what&#8217;s the point of redefining the &#8220;include&#8221; method to &#8220;use&#8221; if it does the same thing, Does is check that the included module wasn&#8217;t previously included ? Else what&#8217;s the point ?</p>
<p>Do thoses module helpers gets its own separate lib of does it fall into ActiveSupport ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
