<?xml version="1.0" encoding="utf-8"?>

			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Boyzoid&apos;s Blog &amp; Stuff - OOP Stuff</title>
			<link>http://www.boyzoid.com/blog/index.cfm</link>
			<description>The Ramblings of a ganius</description>
			<language>en-us</language>
			<pubDate>Tue, 07 Sep 2010 18:37:25 -0400</pubDate>
			<lastBuildDate>Mon, 12 Mar 2007 16:03:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>scott@boyzoid.com</managingEditor>
			<webMaster>scott@boyzoid.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>scott@boyzoid.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			
			<itunes:explicit>no</itunes:explicit>
			
			<item>
				<title>Good Java Book</title>
				<link>http://www.boyzoid.com/blog/index.cfm/2007/3/12/Good-Java-Book</link>
				<description>
				
				&lt;p&gt;I know this is like opening Pandora&apos;s box, but can someone recommend a good resource for learning Java?&#xa0; If you could include reasons why you recommend the book, it would be extremely helpful.&#xa0; Also, any resources I should avoid like the plague? (Again, can you include some reasons why?)&lt;/p&gt;
&lt;p&gt;Thanx!&lt;/p&gt; 
				</description>
				
				<category>ColdFusion Stuff</category>
				
				<category>Flex Stuff</category>
				
				<category>OOP Stuff</category>
				
				<category>Tech Stuff</category>
				
				<pubDate>Mon, 12 Mar 2007 16:03:00 -0400</pubDate>
				<guid>http://www.boyzoid.com/blog/index.cfm/2007/3/12/Good-Java-Book</guid>
				
				
			</item>
			
			<item>
				<title>Objects and contructors and init(), oh my!</title>
				<link>http://www.boyzoid.com/blog/index.cfm/2006/1/13/Objects-and-contructors-and-init-oh-my</link>
				<description>
				
				&lt;div&gt;&amp;lt;cf_disclaimer&amp;gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;I am NOT an OOP expert, I don&amp;rsquo;t play one on TV, nor did I stay in a Holiday Inn Express last night.&amp;nbsp;I am fairly new to OOP.&amp;nbsp;Please keep that in mind when reading this, especially if you wish to flame me.&lt;/p&gt;
&lt;div&gt;&amp;lt;/cf_disclaimer&amp;gt;&lt;/div&gt;
&lt;p&gt;The other day at work there was a discussion outside my office about the way some CF developers are handling the creation on objects and how we use the init() method.&amp;nbsp;The way I handle init() comes from the way I initially learned about using objects.&amp;nbsp;Here&amp;rsquo;s a snippet:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;cfTags&quot;&gt;&amp;lt;cfset myObj = createObject(&amp;ldquo;component&amp;rdquo;, &amp;ldquo;user&amp;rdquo;).init(args) /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;What this does is create an object and call the init() method at the same time. However, one caveat is that in you must specify a returntype (which needs to equal the object you are instatiating) for you init() method, and use &amp;lt;cfreturn this /&amp;gt; in the method.&lt;/p&gt;
&lt;p&gt;One of my co-workers thinks this is a bad idea. He suggests doing this:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;cfTags&quot;&gt;&amp;lt;cfset myObj = createObject(&amp;ldquo;component&amp;rdquo;, &amp;ldquo;user&amp;rdquo;) /&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;cfTags&quot;&gt;&amp;lt;cfset myObj.init(args) /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;Why?&amp;nbsp;The only thing I could really make sense of is that we are treating init() as a constructor (because CF does not have *real* constructors), and constructors typically do not return anything (at least, to my knowledge, not in Java -- which I think was the OO language being referenced in the discussion).&amp;nbsp;And by having init() return something, you are &amp;lsquo;breaking&amp;rsquo; some OO principles.&lt;/p&gt;
&lt;p&gt;While I did not take part in the discussion (because I really didn&amp;rsquo;t think I could bring anything worthwhile in to the discussion), it got me thinking about the issue&lt;/p&gt;
&lt;p&gt;I may be wrong (and if so, please correct me), but in Java, when you create or instantiate an object, you get an init-ed object back (the constructor is called automatically). So, while using&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;cfTags&quot;&gt;&amp;lt;cfset myObj = createObject(&amp;ldquo;component&amp;rdquo;,&amp;rdquo;user&amp;rdquo;).init(args) /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;may &amp;lsquo;break&amp;rsquo; some OO principles, creating and using the object, to me, seems more OO-like (or Java-like) because you get a fully init-ed object when you create it. &lt;/p&gt;
&lt;p&gt;For me, at least, it helps me to understand OOP a bit more when I use &lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;cfTags&quot;&gt;&amp;lt;cfset myObj = createObject(&amp;ldquo;component&amp;rdquo;,&amp;rdquo;user&amp;rdquo;).init(args) /&amp;gt;&lt;/span&gt;&lt;/div&gt;
because if I were creating classes in Java, I would not have to have a second line of code run my constructor (and I know, I would not have to call me constructor at time of creation either, its just easier for me to &amp;lsquo;get it&amp;rsquo; doing it this was)
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are there any other compelling arguments for or against either of these methods?&lt;/p&gt; 
				</description>
				
				<category>ColdFusion Stuff</category>
				
				<category>OOP Stuff</category>
				
				<pubDate>Fri, 13 Jan 2006 12:59:00 -0400</pubDate>
				<guid>http://www.boyzoid.com/blog/index.cfm/2006/1/13/Objects-and-contructors-and-init-oh-my</guid>
				
				
			</item>
			</channel></rss>