<?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: Show Love to the Object Literal</title>
	<atom:link href="http://ajaxian.com/archives/show-love-to-the-object-literal/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/show-love-to-the-object-literal</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Mon, 15 Mar 2010 13:59:09 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Iain Porter</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-257352</link>
		<dc:creator>Iain Porter</dc:creator>
		<pubDate>Thu, 18 Oct 2007 11:55:19 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-257352</guid>
		<description>On a related issue, how do you have multiple child objects of a parent object?  Consider the code below:

var parent={
   childCount: 0,
   child: {
      id:false,
      init: function() {
         alert(this.id);
         parent.childCount++;
         this.id = parent.childCount;
         alert(&quot;Child &quot; + this.id + &quot; Created&quot;);	
      }
   }
}

Calling &#039;parent.child.init();&#039;, the first alert produces &#039;undefined&#039; and the second &#039;Child 1 Created&#039;.  A second call to &#039;parent.child.init();&#039; produces the &#039;1&#039; from above instead of the &#039;undefined&#039; I&#039;m expecting - I realise this is because I&#039;m working with the same object.  

However, calling &#039;var firstChild = parent.child.init(); var secondChild = parent.child.init()&#039; produces the same result (as does &#039;var firstChild = parent.child; firstChild.init();).

I&#039;ve also tried the &#039;new&#039; operator.  But the code &#039;var firstChild = new parent.child;&#039; produces the error &#039;parent.child is not a constructor&#039;.

How is this supposed to work?</description>
		<content:encoded><![CDATA[<p>On a related issue, how do you have multiple child objects of a parent object?  Consider the code below:</p>
<p>var parent={<br />
   childCount: 0,<br />
   child: {<br />
      id:false,<br />
      init: function() {<br />
         alert(this.id);<br />
         parent.childCount++;<br />
         this.id = parent.childCount;<br />
         alert(&#8221;Child &#8221; + this.id + &#8221; Created&#8221;);<br />
      }<br />
   }<br />
}</p>
<p>Calling &#8216;parent.child.init();&#8217;, the first alert produces &#8216;undefined&#8217; and the second &#8216;Child 1 Created&#8217;.  A second call to &#8216;parent.child.init();&#8217; produces the &#8216;1&#8242; from above instead of the &#8216;undefined&#8217; I&#8217;m expecting &#8211; I realise this is because I&#8217;m working with the same object.  </p>
<p>However, calling &#8216;var firstChild = parent.child.init(); var secondChild = parent.child.init()&#8217; produces the same result (as does &#8216;var firstChild = parent.child; firstChild.init();).</p>
<p>I&#8217;ve also tried the &#8216;new&#8217; operator.  But the code &#8216;var firstChild = new parent.child;&#8217; produces the error &#8216;parent.child is not a constructor&#8217;.</p>
<p>How is this supposed to work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-252438</link>
		<dc:creator>Matthew</dc:creator>
		<pubDate>Sun, 08 Jul 2007 16:28:47 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-252438</guid>
		<description>Oh my god, that looks like Eiffel! Am I right or let the time the memories of Eiffel vanish?</description>
		<content:encoded><![CDATA[<p>Oh my god, that looks like Eiffel! Am I right or let the time the memories of Eiffel vanish?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ix</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-251336</link>
		<dc:creator>ix</dc:creator>
		<pubDate>Sun, 10 Jun 2007 07:48:20 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-251336</guid>
		<description>how do you do {&quot;str&quot;+var:val}. seems to be a syntax error!</description>
		<content:encoded><![CDATA[<p>how do you do {&#8221;str&#8221;+var:val}. seems to be a syntax error!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hammad</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-245665</link>
		<dc:creator>hammad</dc:creator>
		<pubDate>Mon, 01 Jan 2007 16:03:21 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-245665</guid>
		<description>Thanks lot of help provided

http://students.50webs.org
http://vpn.50webs.org</description>
		<content:encoded><![CDATA[<p>Thanks lot of help provided</p>
<p><a href="http://students.50webs.org" rel="nofollow">http://students.50webs.org</a><br />
<a href="http://vpn.50webs.org" rel="nofollow">http://vpn.50webs.org</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ë„ìš°ë¯¸</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-55077</link>
		<dc:creator>ë„ìš°ë¯¸</dc:creator>
		<pubDate>Thu, 27 Jul 2006 02:40:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-55077</guid>
		<description>ê¿ˆì´ ìžˆëŠ” ë‹¹ì‹ ì˜ ë„ì „ì„ ê¸°ë‹¤ë¦½ë‹ˆë‹¤. 

ë¬´ìžë³¸ìœ¼ë¡œ ìˆ˜ë°±ë§Œì›ëŒ€ì˜ ì›” ì•ˆì •ìˆ˜ìž…ì„ í™•ë³´í•  ìˆ˜ ìžˆëŠ” ì‚¬ì—…ì„ ì†Œê°œí•©ë‹ˆë‹¤. 

â™£ ì‚¬ì—… íŠ¹ì§•. 

* ëˆ„êµ¬ë‚˜, ìžë³¸íˆ¬ìžê°€ í•„ìš” ì—†ì–´ ì†í•´ ë³´ëŠ” ì¼ ì—†ëŠ” ìœˆìœˆ-ì‚¬ì—…. 

* ìž¥ê¸° ì•ˆì •ìˆ˜ìž… í™•ë³´ì™€ ë…¸í›„ëŒ€ì±…ì— ì í•©í•œ íˆ¬ìž¡(ë¶€ì—…). 

* í™•ë³´ëœ ì•ˆì •ìˆ˜ìž…ì€ ì¼ìƒ ì§€ê¸‰ë˜ê³ , ìžë…€ì—ê²Œ ìƒì† ë¨. 

* í†µì‹ ì‚¬ì—…ë²• ê°œì •ìœ¼ë¡œ ê°œì¸ë„ í•  ìˆ˜ ìžˆëŠ” í™©ê¸ˆì•Œì„ ë‚³ëŠ”ë‹¤ëŠ” ê¿ˆì˜ ì´ë™í†µì‹ ì‚¬ì—…. 

* ì˜¨/ì˜¤í”„ë¼ì¸ í™ë³´ë§Œìœ¼ë¡œ í‰ìƒìˆ˜ìž…ëˆ„ì !! 

* ì¸í„°ë„·ìœ¼ë¡œê°€ëŠ¥í•˜ë¯€ë¡œ ì§€ë°©ì— ê³„ì‹  ë¶„ë„ ì‚¬ì—…í™œë™ì— ì§€ìž¥ ì—†ëŠ” ì „êµ­ê·œëª¨ ì‚¬ì—…. 

* ì¸í„°ë„· ì‚¬ì—…ìš© í™ˆíŽ˜ì´ì§€(íˆ¬ìž¡ok) ë¬´ë£Œ ë¶„ì–‘. 

â™£ ì‚¬ì—…ë‚´ìš©ì€ í™ˆíŽ˜ì´ì§€ì˜ ì—ì„œ ìƒì„¸ížˆ ë“¤ìœ¼ì‹¤ ìˆ˜ ìžˆìŠµë‹ˆë‹¤. 

* ì—°ë½ ì£¼ì‹œë©´ ì„±ì‹¬ê» ë•ê² ìŠµë‹ˆë‹¤. 

* í™ˆíŽ˜ì´ì§€ì— ì €ì˜ ì„±ëª…ê³¼ ì—°ë½ì²˜ê°€ ìžˆìŠµë‹ˆë‹¤. 

* ìžë³¸íˆ¬ìž ì—†ì´ ë‚´ ë…¸ë ¥ìœ¼ë¡œ ì¼ìƒì˜ ì•ˆì •ìˆ˜ìž…ì„ í™•ë³´í• ìˆ˜ ìžˆëŠ” ì ˆí˜¸ì˜ ê¸°íšŒ! 

* ë³¸ì‚¬í™ˆí”¼: http://ceoit.co.kr/web/king098/

* ë¹„ë²ˆ1111 í—ˆë½ì—†ì´ ê¸€ì˜¬ë ¤ì„œ ì£„ì†¡í•©ë‹ˆë‹¤. 

* ë“±ë¡ì„ ì›í•˜ì§€ ì•Šì„ê²½ìš°urlì£¼ì†Œë¥¼ ìƒê¸° ë©”ì¼ë¡œ ë³´ë‚´ì£¼ì‹œë©´ 

ë‹¤ì‹œëŠ” ì˜¬ë¦¬ì§€ ì•Šê² ìŠµë‹ˆë‹¤.</description>
		<content:encoded><![CDATA[<p>ê¿ˆì´ ìžˆëŠ” ë‹¹ì‹ ì˜ ë„ì „ì„ ê¸°ë‹¤ë¦½ë‹ˆë‹¤. </p>
<p>ë¬´ìžë³¸ìœ¼ë¡œ ìˆ˜ë°±ë§Œì›ëŒ€ì˜ ì›” ì•ˆì •ìˆ˜ìž…ì„ í™•ë³´í•  ìˆ˜ ìžˆëŠ” ì‚¬ì—…ì„ ì†Œê°œí•©ë‹ˆë‹¤. </p>
<p>â™£ ì‚¬ì—… íŠ¹ì§•. </p>
<p>* ëˆ„êµ¬ë‚˜, ìžë³¸íˆ¬ìžê°€ í•„ìš” ì—†ì–´ ì†í•´ ë³´ëŠ” ì¼ ì—†ëŠ” ìœˆìœˆ-ì‚¬ì—…. </p>
<p>* ìž¥ê¸° ì•ˆì •ìˆ˜ìž… í™•ë³´ì™€ ë…¸í›„ëŒ€ì±…ì— ì í•©í•œ íˆ¬ìž¡(ë¶€ì—…). </p>
<p>* í™•ë³´ëœ ì•ˆì •ìˆ˜ìž…ì€ ì¼ìƒ ì§€ê¸‰ë˜ê³ , ìžë…€ì—ê²Œ ìƒì† ë¨. </p>
<p>* í†µì‹ ì‚¬ì—…ë²• ê°œì •ìœ¼ë¡œ ê°œì¸ë„ í•  ìˆ˜ ìžˆëŠ” í™©ê¸ˆì•Œì„ ë‚³ëŠ”ë‹¤ëŠ” ê¿ˆì˜ ì´ë™í†µì‹ ì‚¬ì—…. </p>
<p>* ì˜¨/ì˜¤í”„ë¼ì¸ í™ë³´ë§Œìœ¼ë¡œ í‰ìƒìˆ˜ìž…ëˆ„ì !! </p>
<p>* ì¸í„°ë„·ìœ¼ë¡œê°€ëŠ¥í•˜ë¯€ë¡œ ì§€ë°©ì— ê³„ì‹  ë¶„ë„ ì‚¬ì—…í™œë™ì— ì§€ìž¥ ì—†ëŠ” ì „êµ­ê·œëª¨ ì‚¬ì—…. </p>
<p>* ì¸í„°ë„· ì‚¬ì—…ìš© í™ˆíŽ˜ì´ì§€(íˆ¬ìž¡ok) ë¬´ë£Œ ë¶„ì–‘. </p>
<p>â™£ ì‚¬ì—…ë‚´ìš©ì€ í™ˆíŽ˜ì´ì§€ì˜ ì—ì„œ ìƒì„¸ížˆ ë“¤ìœ¼ì‹¤ ìˆ˜ ìžˆìŠµë‹ˆë‹¤. </p>
<p>* ì—°ë½ ì£¼ì‹œë©´ ì„±ì‹¬ê» ë•ê² ìŠµë‹ˆë‹¤. </p>
<p>* í™ˆíŽ˜ì´ì§€ì— ì €ì˜ ì„±ëª…ê³¼ ì—°ë½ì²˜ê°€ ìžˆìŠµë‹ˆë‹¤. </p>
<p>* ìžë³¸íˆ¬ìž ì—†ì´ ë‚´ ë…¸ë ¥ìœ¼ë¡œ ì¼ìƒì˜ ì•ˆì •ìˆ˜ìž…ì„ í™•ë³´í• ìˆ˜ ìžˆëŠ” ì ˆí˜¸ì˜ ê¸°íšŒ! </p>
<p>* ë³¸ì‚¬í™ˆí”¼: <a href="http://ceoit.co.kr/web/king098/" rel="nofollow">http://ceoit.co.kr/web/king098/</a></p>
<p>* ë¹„ë²ˆ1111 í—ˆë½ì—†ì´ ê¸€ì˜¬ë ¤ì„œ ì£„ì†¡í•©ë‹ˆë‹¤. </p>
<p>* ë“±ë¡ì„ ì›í•˜ì§€ ì•Šì„ê²½ìš°urlì£¼ì†Œë¥¼ ìƒê¸° ë©”ì¼ë¡œ ë³´ë‚´ì£¼ì‹œë©´ </p>
<p>ë‹¤ì‹œëŠ” ì˜¬ë¦¬ì§€ ì•Šê² ìŠµë‹ˆë‹¤.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-53361</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Mon, 24 Jul 2006 17:04:59 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-53361</guid>
		<description>Here is a practical example of using an object literal. The script creates a div section to write messages on.  
http://jdev.blogsome.com/2006/07/11/debug-not-quite-javascript-2/</description>
		<content:encoded><![CDATA[<p>Here is a practical example of using an object literal. The script creates a div section to write messages on.<br />
<a href="http://jdev.blogsome.com/2006/07/11/debug-not-quite-javascript-2/" rel="nofollow">http://jdev.blogsome.com/2006/07/11/debug-not-quite-javascript-2/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Frank</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-30215</link>
		<dc:creator>Thomas Frank</dc:creator>
		<pubDate>Mon, 19 Jun 2006 00:15:05 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-30215</guid>
		<description>I personally love JSON/object literal notation, and my only problem with it was how to implement things such as classes, inheritance, public and private methods in a way thats consistent with object literal notation.
 
I have now solved this in a way I&#039;m happy with - take  a look at &lt;a href=&quot;http://www.thomasfrank.se/classy_json.html&quot; rel=&quot;nofollow&quot;&gt;Classy JSON&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I personally love JSON/object literal notation, and my only problem with it was how to implement things such as classes, inheritance, public and private methods in a way thats consistent with object literal notation.</p>
<p>I have now solved this in a way I&#8217;m happy with &#8211; take  a look at <a href="http://www.thomasfrank.se/classy_json.html" rel="nofollow">Classy JSON</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Frank</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-30213</link>
		<dc:creator>Thomas Frank</dc:creator>
		<pubDate>Mon, 19 Jun 2006 00:13:22 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-30213</guid>
		<description>I personally love JSON/object literal notation, and my only problem with it was how to implement things such as classes, inheritance, public and private methods in a way thats consistent with object literal notation.

I have now solved this in a way I&#039;m happy with - http://www.thomasfrank.se/classy_json.html</description>
		<content:encoded><![CDATA[<p>I personally love JSON/object literal notation, and my only problem with it was how to implement things such as classes, inheritance, public and private methods in a way thats consistent with object literal notation.</p>
<p>I have now solved this in a way I&#8217;m happy with &#8211; <a href="http://www.thomasfrank.se/classy_json.html" rel="nofollow">http://www.thomasfrank.se/classy_json.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SeÃ±or Pantaloons</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-3744</link>
		<dc:creator>SeÃ±or Pantaloons</dc:creator>
		<pubDate>Mon, 20 Feb 2006 18:39:03 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-3744</guid>
		<description>More importantly, can anyone please compare any possible drawbacks of the above methods (plain, object literal, and class definition) in regards to memory usage/leakage, processing and overall efficiency?

Thanks.</description>
		<content:encoded><![CDATA[<p>More importantly, can anyone please compare any possible drawbacks of the above methods (plain, object literal, and class definition) in regards to memory usage/leakage, processing and overall efficiency?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hermann Klinke</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-3740</link>
		<dc:creator>Hermann Klinke</dc:creator>
		<pubDate>Mon, 20 Feb 2006 16:13:48 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-3740</guid>
		<description>PointedEars: &quot;Probably some people will never understand that the programming language they are dealing with uses in fact prototype-based, not class-based inheritance; that there are no namespaces, classes, members, and instances there&quot;

I do understand that javascript is prototype based, but most people do not and I like to think in terms of namespaces, classes, members and instances because I am more familiar with it and there is nothing wrong in thinking in a more abstract way. It&#039;s just a mental representation. You can also simulate class based inheritance. I&#039;ve developed a framework in javascript that makes javascript completely object ortiened with namespaces, classes, enums, events, properties, interfaces that can be private, protected, public, static, internal and you can override and overload methods,you can create methods with strongly typed arguments and you have private, protected, public, static, internal methods.</description>
		<content:encoded><![CDATA[<p>PointedEars: &#8220;Probably some people will never understand that the programming language they are dealing with uses in fact prototype-based, not class-based inheritance; that there are no namespaces, classes, members, and instances there&#8221;</p>
<p>I do understand that javascript is prototype based, but most people do not and I like to think in terms of namespaces, classes, members and instances because I am more familiar with it and there is nothing wrong in thinking in a more abstract way. It&#8217;s just a mental representation. You can also simulate class based inheritance. I&#8217;ve developed a framework in javascript that makes javascript completely object ortiened with namespaces, classes, enums, events, properties, interfaces that can be private, protected, public, static, internal and you can override and overload methods,you can create methods with strongly typed arguments and you have private, protected, public, static, internal methods.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Mahemoff</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-3736</link>
		<dc:creator>Michael Mahemoff</dc:creator>
		<pubDate>Mon, 20 Feb 2006 14:46:14 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-3736</guid>
		<description>Phillippe, If you only need one instance, my default choice would be an object literal. Sometimes a background in Java/C++/etc encourages people to think about &quot;I create the metadata, then I create instances of it&quot;, but a language like JS has idioms like OL that IMO are more direct, less clutter, if all you need is a singleton or an isolated namespace for a collection of functions.</description>
		<content:encoded><![CDATA[<p>Phillippe, If you only need one instance, my default choice would be an object literal. Sometimes a background in Java/C++/etc encourages people to think about &#8220;I create the metadata, then I create instances of it&#8221;, but a language like JS has idioms like OL that IMO are more direct, less clutter, if all you need is a singleton or an isolated namespace for a collection of functions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: randomcat.co.uk &#187; Blog Archive &#187; Javascript Object Notation</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-3734</link>
		<dc:creator>randomcat.co.uk &#187; Blog Archive &#187; Javascript Object Notation</dc:creator>
		<pubDate>Mon, 20 Feb 2006 13:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-3734</guid>
		<description>[...] Ajaxian - Show Love&#8230; [...]</description>
		<content:encoded><![CDATA[<p>[...] Ajaxian &#8211; Show Love&#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philippe</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-3724</link>
		<dc:creator>Philippe</dc:creator>
		<pubDate>Mon, 20 Feb 2006 10:12:14 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-3724</guid>
		<description>I second Hermann Klinke about using instance or prototype definitions.

Object literals are actually hard to maintain. It tries to mimic classes but these &#039;:&#039; and &#039;,&#039; just get confusing when the code grows.</description>
		<content:encoded><![CDATA[<p>I second Hermann Klinke about using instance or prototype definitions.</p>
<p>Object literals are actually hard to maintain. It tries to mimic classes but these &#8216;:&#8217; and &#8216;,&#8217; just get confusing when the code grows.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Heilmann</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-3723</link>
		<dc:creator>Chris Heilmann</dc:creator>
		<pubDate>Mon, 20 Feb 2006 09:45:55 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-3723</guid>
		<description>I basically just wrote this explanation for my upcoming book with Apress on Usable JavaScript. One of the editors got very confused by my examples and asked me to make it more obvious what the OL is.   

Cool to see it getting that much referencing. 

Dustin, I commented on your article, as JSON and the OL are not the same. If you add this difference - one is code syntax, the other is a data format - then it&#039;ll be a really good resource going deeper than mine :)</description>
		<content:encoded><![CDATA[<p>I basically just wrote this explanation for my upcoming book with Apress on Usable JavaScript. One of the editors got very confused by my examples and asked me to make it more obvious what the OL is.   </p>
<p>Cool to see it getting that much referencing. </p>
<p>Dustin, I commented on your article, as JSON and the OL are not the same. If you add this difference &#8211; one is code syntax, the other is a data format &#8211; then it&#8217;ll be a really good resource going deeper than mine :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dustin Diaz</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-3715</link>
		<dc:creator>Dustin Diaz</dc:creator>
		<pubDate>Mon, 20 Feb 2006 03:50:18 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-3715</guid>
		<description>It wasn&#039;t more than a day later that I had released my article on &lt;a href=&quot;http://www.dustindiaz.com/json-for-the-masses/&quot; rel=&quot;nofollow&quot;&gt;JSON for the masses&lt;/a&gt; which had been brewing in the mix for about a month which talks about this very same thing.</description>
		<content:encoded><![CDATA[<p>It wasn&#8217;t more than a day later that I had released my article on <a href="http://www.dustindiaz.com/json-for-the-masses/" rel="nofollow">JSON for the masses</a> which had been brewing in the mix for about a month which talks about this very same thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PointedEars</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-3710</link>
		<dc:creator>PointedEars</dc:creator>
		<pubDate>Sun, 19 Feb 2006 23:28:46 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-3710</guid>
		<description>&gt; I personally hate object literal notation.

I personally like Object literals, for they ease programming and maintenance very much.

&gt; The following feels more natural and itâ€™s possible to add classes, objects and members
&gt; to existing objects and namespaces:
&gt; instance:
&gt; [...]
&gt; class definition

Probably some people will never understand that the programming language they are dealing with uses in fact prototype-based, not class-based inheritance; that there are no namespaces, classes, members, and instances there, but only objects with different properties.



And non sequitur.  Both forms of object definition can of course be combined sucessfully:

  function Prototype()
  {
    // initialization
  }

  Prototype.prototype = {
    // protoype object property definitions
  };
  Prototype.prototype.constructor = Prototype;

   var p = new Prototype(42);

// See also the &quot;scripts&quot; section on my Website.


PointedEars</description>
		<content:encoded><![CDATA[<p>&gt; I personally hate object literal notation.</p>
<p>I personally like Object literals, for they ease programming and maintenance very much.</p>
<p>&gt; The following feels more natural and itâ€™s possible to add classes, objects and members<br />
&gt; to existing objects and namespaces:<br />
&gt; instance:<br />
&gt; [...]<br />
&gt; class definition</p>
<p>Probably some people will never understand that the programming language they are dealing with uses in fact prototype-based, not class-based inheritance; that there are no namespaces, classes, members, and instances there, but only objects with different properties.</p>
<p>And non sequitur.  Both forms of object definition can of course be combined sucessfully:</p>
<p>  function Prototype()<br />
  {<br />
    // initialization<br />
  }</p>
<p>  Prototype.prototype = {<br />
    // protoype object property definitions<br />
  };<br />
  Prototype.prototype.constructor = Prototype;</p>
<p>   var p = new Prototype(42);</p>
<p>// See also the &#8220;scripts&#8221; section on my Website.</p>
<p>PointedEars</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barry Nauta</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-3704</link>
		<dc:creator>Barry Nauta</dc:creator>
		<pubDate>Sun, 19 Feb 2006 19:51:04 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-3704</guid>
		<description>Hmm... it has been over 15 years since I last programmed Eiffel, but this surely looks like the way Eiffel handles stuff.......</description>
		<content:encoded><![CDATA[<p>Hmm&#8230; it has been over 15 years since I last programmed Eiffel, but this surely looks like the way Eiffel handles stuff&#8230;&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nico</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-3700</link>
		<dc:creator>nico</dc:creator>
		<pubDate>Sun, 19 Feb 2006 18:01:44 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-3700</guid>
		<description>test</description>
		<content:encoded><![CDATA[<p>test</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hermann Klinke</title>
		<link>http://ajaxian.com/archives/show-love-to-the-object-literal/comment-page-1#comment-3694</link>
		<dc:creator>Hermann Klinke</dc:creator>
		<pubDate>Sun, 19 Feb 2006 16:12:34 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=892#comment-3694</guid>
		<description>I personally hate object literal notation. The following feels more natural and it&#039;s possible to add classes, objects and members to existing objects and namespaces:

&lt;b&gt;instance&lt;/b&gt;:
&lt;code&gt;
var awesome = new Object();
awesome.commonSense=null;
awesome.standardsCompliance=&quot;50%&quot;;
awesome.init = function (){
  // code
}
awesome.doStuff = function(){
  // code
}
awesome.doMoreStuff = function(){
  // code
}
&lt;/code&gt;

&lt;b&gt;class definition&lt;/b&gt;
&lt;code&gt;
function awesome()
{
    //constructor
}
awesome.prototype.commonSense=null;
awesome.prototype.standardsCompliance=&quot;50%&quot;;
awesome.prototype.init = function (){
  // code
}
awesome.prototype.doStuff = function(){
  // code
}
awesome.prototype.doMoreStuff = function(){
  // code
}
&lt;/code&gt;

&lt;b&gt;add object instance or class definition to an existing namespace, class definition or object instance&lt;/b&gt;
&lt;code&gt;
namespace.awesome = ....
classDefinition.awesome = ...
objectInstance.awesome = ...
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I personally hate object literal notation. The following feels more natural and it&#8217;s possible to add classes, objects and members to existing objects and namespaces:</p>
<p><b>instance</b>:<br />
<code><br />
var awesome = new Object();<br />
awesome.commonSense=null;<br />
awesome.standardsCompliance="50%";<br />
awesome.init = function (){<br />
  // code<br />
}<br />
awesome.doStuff = function(){<br />
  // code<br />
}<br />
awesome.doMoreStuff = function(){<br />
  // code<br />
}<br />
</code></p>
<p><b>class definition</b><br />
<code><br />
function awesome()<br />
{<br />
    //constructor<br />
}<br />
awesome.prototype.commonSense=null;<br />
awesome.prototype.standardsCompliance="50%";<br />
awesome.prototype.init = function (){<br />
  // code<br />
}<br />
awesome.prototype.doStuff = function(){<br />
  // code<br />
}<br />
awesome.prototype.doMoreStuff = function(){<br />
  // code<br />
}<br />
</code></p>
<p><b>add object instance or class definition to an existing namespace, class definition or object instance</b><br />
<code><br />
namespace.awesome = ....<br />
classDefinition.awesome = ...<br />
objectInstance.awesome = ...<br />
</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
