<?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: Building simple objects</title>
	<atom:link href="http://helephant.com/2008/08/building-simple-objects/feed/" rel="self" type="application/rss+xml" />
	<link>http://helephant.com/2008/08/building-simple-objects/</link>
	<description></description>
	<lastBuildDate>Thu, 24 Jun 2010 11:27:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: David Peers</title>
		<link>http://helephant.com/2008/08/building-simple-objects/#comment-7427</link>
		<dc:creator>David Peers</dc:creator>
		<pubDate>Sat, 15 May 2010 21:42:22 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=407#comment-7427</guid>
		<description>This blog helped me somewhat in narrowing down some issues with the latest release candidate, Why do they often leave out vital information when they upgrade? It may be trivial to them but not to me. I&#039;m sure we&#039;re not alone either.</description>
		<content:encoded><![CDATA[<p>This blog helped me somewhat in narrowing down some issues with the latest release candidate, Why do they often leave out vital information when they upgrade? It may be trivial to them but not to me. I&#8217;m sure we&#8217;re not alone either.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adel</title>
		<link>http://helephant.com/2008/08/building-simple-objects/#comment-3103</link>
		<dc:creator>adel</dc:creator>
		<pubDate>Sun, 29 Nov 2009 23:46:31 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=407#comment-3103</guid>
		<description>Good article</description>
		<content:encoded><![CDATA[<p>Good article</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Helen</title>
		<link>http://helephant.com/2008/08/building-simple-objects/#comment-915</link>
		<dc:creator>Helen</dc:creator>
		<pubDate>Fri, 16 Jan 2009 22:04:28 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=407#comment-915</guid>
		<description>The only major difference is that the objects created with the constructor maintain a link back to the function that constructed them. This is important when you want to use the javascript language&#039;s more advanced prototype feature to share implementation between the objects created with the same constructor, much like you would with a class in a more traditional language. I&#039;ve got a new article about prototype coming up with some more information about that.

Another difference between your first example and the second example is that the first example has a method called func() while the second doesn&#039;t. The object created will have a link back to it&#039;s constructor function (object.constructor) but the func constructor won&#039;t be available as a func() method on the object.</description>
		<content:encoded><![CDATA[<p>The only major difference is that the objects created with the constructor maintain a link back to the function that constructed them. This is important when you want to use the javascript language&#8217;s more advanced prototype feature to share implementation between the objects created with the same constructor, much like you would with a class in a more traditional language. I&#8217;ve got a new article about prototype coming up with some more information about that.</p>
<p>Another difference between your first example and the second example is that the first example has a method called func() while the second doesn&#8217;t. The object created will have a link back to it&#8217;s constructor function (object.constructor) but the func constructor won&#8217;t be available as a func() method on the object.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ted devito</title>
		<link>http://helephant.com/2008/08/building-simple-objects/#comment-914</link>
		<dc:creator>ted devito</dc:creator>
		<pubDate>Fri, 16 Jan 2009 03:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=407#comment-914</guid>
		<description>so, these two methods should produce the same results, except the latter can be reused?

// object literal
var myNewObj = {
	func : function (param) {},
	str : &#039;&#039;,
	arr : [],
	obj : {}
}

// function constructor
function func (param) {
	this.str = &#039;&#039;;
	this.arr = [];
	this.obj = {}
}
var myNewObj = new func(param);</description>
		<content:encoded><![CDATA[<p>so, these two methods should produce the same results, except the latter can be reused?</p>
<p>// object literal<br />
var myNewObj = {<br />
	func : function (param) {},<br />
	str : &#8221;,<br />
	arr : [],<br />
	obj : {}<br />
}</p>
<p>// function constructor<br />
function func (param) {<br />
	this.str = &#8221;;<br />
	this.arr = [];<br />
	this.obj = {}<br />
}<br />
var myNewObj = new func(param);</p>
]]></content:encoded>
	</item>
</channel>
</rss>
