<?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: Javascript object prototype</title>
	<atom:link href="http://helephant.com/2009/01/javascript-object-prototype/feed/" rel="self" type="application/rss+xml" />
	<link>http://helephant.com/2009/01/javascript-object-prototype/</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: OOP in Javascript &#8211; Teil 1 [Javascript ist Toll!]</title>
		<link>http://helephant.com/2009/01/javascript-object-prototype/#comment-5441</link>
		<dc:creator>OOP in Javascript &#8211; Teil 1 [Javascript ist Toll!]</dc:creator>
		<pubDate>Tue, 09 Mar 2010 12:31:55 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=410#comment-5441</guid>
		<description>[...] Javascript object prototype Eine sehr gute deutschsprachige Erklärung, des prototype Objekts. Das ist ein Artikel im Rahmen einer Serie, die Objekte in Javascript und deren Funktionsweisen, sehr gut! [...]</description>
		<content:encoded><![CDATA[<p>[...] Javascript object prototype Eine sehr gute deutschsprachige Erklärung, des prototype Objekts. Das ist ein Artikel im Rahmen einer Serie, die Objekte in Javascript und deren Funktionsweisen, sehr gut! [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: helen</title>
		<link>http://helephant.com/2009/01/javascript-object-prototype/#comment-2964</link>
		<dc:creator>helen</dc:creator>
		<pubDate>Mon, 23 Nov 2009 16:46:58 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=410#comment-2964</guid>
		<description>I also think that whether you want to use prototypes or not, it&#039;s good to understand what they are so you can make an informed choice and so you can understand what other people&#039;s code is doing. 

I think it&#039;s particularly helpful if you are using a Javascript library because many of them use prototypes to simulate classic inheritance and if things go wrong it&#039;s really hard to debug without understanding what&#039;s going on. 

That said.. I should update my article with a more convincing argument in the object prototype&#039;s favour. :)</description>
		<content:encoded><![CDATA[<p>I also think that whether you want to use prototypes or not, it&#8217;s good to understand what they are so you can make an informed choice and so you can understand what other people&#8217;s code is doing. </p>
<p>I think it&#8217;s particularly helpful if you are using a Javascript library because many of them use prototypes to simulate classic inheritance and if things go wrong it&#8217;s really hard to debug without understanding what&#8217;s going on. </p>
<p>That said.. I should update my article with a more convincing argument in the object prototype&#8217;s favour. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron</title>
		<link>http://helephant.com/2009/01/javascript-object-prototype/#comment-2963</link>
		<dc:creator>Ron</dc:creator>
		<pubDate>Mon, 23 Nov 2009 16:43:08 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=410#comment-2963</guid>
		<description>To John Middlemas:

The Pet.prototype.sayHello example is simplistic to illustrate the idea.  In the real world, javascript classes are much more significant in size, and can have rather large methods.  If I have 1000 instances of an object, without prototype I would have 1000 instances of that large method as well.  With prototype, the sayHello method will be included but only as a reference to the single existing method, which translates to a significant reduction in memory usage.  
I&#039;m all for simplified programming, but would have to defend prototype as a necessity.</description>
		<content:encoded><![CDATA[<p>To John Middlemas:</p>
<p>The Pet.prototype.sayHello example is simplistic to illustrate the idea.  In the real world, javascript classes are much more significant in size, and can have rather large methods.  If I have 1000 instances of an object, without prototype I would have 1000 instances of that large method as well.  With prototype, the sayHello method will be included but only as a reference to the single existing method, which translates to a significant reduction in memory usage.<br />
I&#8217;m all for simplified programming, but would have to defend prototype as a necessity.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Starrow Pan</title>
		<link>http://helephant.com/2009/01/javascript-object-prototype/#comment-2757</link>
		<dc:creator>Starrow Pan</dc:creator>
		<pubDate>Fri, 13 Nov 2009 06:46:26 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=410#comment-2757</guid>
		<description>Appreciate your article that make me capable of appreciating the simplicity and ingenuity of the design of javascript.
@John,
At least per my experiment in Firebug js console, prototype is shared to all instances.
I think another advantage of prototype is it exhibits the dynamic essence of javascript. Of course you can declare properties and functions with a constructor, but prototype enable you modify the common behavior of a &#039;class&#039; of objects LATER.</description>
		<content:encoded><![CDATA[<p>Appreciate your article that make me capable of appreciating the simplicity and ingenuity of the design of javascript.<br />
@John,<br />
At least per my experiment in Firebug js console, prototype is shared to all instances.<br />
I think another advantage of prototype is it exhibits the dynamic essence of javascript. Of course you can declare properties and functions with a constructor, but prototype enable you modify the common behavior of a &#8216;class&#8217; of objects LATER.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Javascript prototype chaining - Helephant.com</title>
		<link>http://helephant.com/2009/01/javascript-object-prototype/#comment-996</link>
		<dc:creator>Javascript prototype chaining - Helephant.com</dc:creator>
		<pubDate>Mon, 17 Aug 2009 09:29:06 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=410#comment-996</guid>
		<description>[...] functions have a property called prototype. Adding properties and methods to the prototype property will automatically add the method or [...]</description>
		<content:encoded><![CDATA[<p>[...] functions have a property called prototype. Adding properties and methods to the prototype property will automatically add the method or [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Middlemas</title>
		<link>http://helephant.com/2009/01/javascript-object-prototype/#comment-999</link>
		<dc:creator>John Middlemas</dc:creator>
		<pubDate>Tue, 16 Jun 2009 22:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=410#comment-999</guid>
		<description>Using Pet.prototype.sayHello= as opposed to this.sayHello= in the Pet example makes no difference to the end result and it is simpler to use this.sayHello=. Your justification for the former is saving memory but I wonder if that is important these days. Why complicate the matter further when programming is complicated enough already.

I also wonder if using Pet.prototype.sayHello= does actually save memory. I tested the rufus object on my system and it still included the sayHello method even if Pet.prototype.sayHello= was used.</description>
		<content:encoded><![CDATA[<p>Using Pet.prototype.sayHello= as opposed to this.sayHello= in the Pet example makes no difference to the end result and it is simpler to use this.sayHello=. Your justification for the former is saving memory but I wonder if that is important these days. Why complicate the matter further when programming is complicated enough already.</p>
<p>I also wonder if using Pet.prototype.sayHello= does actually save memory. I tested the rufus object on my system and it still included the sayHello method even if Pet.prototype.sayHello= was used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Helen</title>
		<link>http://helephant.com/2009/01/javascript-object-prototype/#comment-995</link>
		<dc:creator>Helen</dc:creator>
		<pubDate>Tue, 14 Apr 2009 12:26:47 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=410#comment-995</guid>
		<description>Ah ha! You can also extend the prototype of DOM objects in IE8: http://msdn.microsoft.com/en-us/library/dd282900(VS.85).aspx</description>
		<content:encoded><![CDATA[<p>Ah ha! You can also extend the prototype of DOM objects in IE8: <a href="http://msdn.microsoft.com/en-us/library/dd282900(VS.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/dd282900(VS.85).aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Helen</title>
		<link>http://helephant.com/2009/01/javascript-object-prototype/#comment-994</link>
		<dc:creator>Helen</dc:creator>
		<pubDate>Sat, 11 Apr 2009 09:47:41 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=410#comment-994</guid>
		<description>You can extend built in javascript objects like string in all browsers, even IE:

String.prototype.trim = function()
{
	alert(&quot;this function can trim a string object&quot;);
}
var moo = &quot;Hello world&quot;;
moo.trim();


In Firefox, Safari, Chrome and Opera you can also extend HTML elements:

window.onload = function()
{
    HTMLElement.prototype.moo = function()
    {
        alert(&quot;Calling the HTML Element&#039;s moo function&quot;);
    }
    document.body.moo();
}


In IE (I just tested in IE8) you can&#039;t extend the DOM objects because they&#039;re not part of javascript, they&#039;re really COM objects.

You can see the full example here: http://helephant.com/wp-content/uploads/2009/01/built-in-prototype.html</description>
		<content:encoded><![CDATA[<p>You can extend built in javascript objects like string in all browsers, even IE:</p>
<p>String.prototype.trim = function()<br />
{<br />
	alert(&#8220;this function can trim a string object&#8221;);<br />
}<br />
var moo = &#8220;Hello world&#8221;;<br />
moo.trim();</p>
<p>In Firefox, Safari, Chrome and Opera you can also extend HTML elements:</p>
<p>window.onload = function()<br />
{<br />
    HTMLElement.prototype.moo = function()<br />
    {<br />
        alert(&#8220;Calling the HTML Element&#8217;s moo function&#8221;);<br />
    }<br />
    document.body.moo();<br />
}</p>
<p>In IE (I just tested in IE8) you can&#8217;t extend the DOM objects because they&#8217;re not part of javascript, they&#8217;re really COM objects.</p>
<p>You can see the full example here: <a href="http://helephant.com/wp-content/uploads/2009/01/built-in-prototype.html" rel="nofollow">http://helephant.com/wp-content/uploads/2009/01/built-in-prototype.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://helephant.com/2009/01/javascript-object-prototype/#comment-993</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Tue, 31 Mar 2009 16:56:34 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=410#comment-993</guid>
		<description>Hi,
I&#039;m not sure but I thought, that you can&#039;t add methodes to existing classes like &quot;string&quot; or &quot;node&quot; in IE. Tell me if I&#039;m wrong!</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I&#8217;m not sure but I thought, that you can&#8217;t add methodes to existing classes like &#8220;string&#8221; or &#8220;node&#8221; in IE. Tell me if I&#8217;m wrong!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Helen</title>
		<link>http://helephant.com/2009/01/javascript-object-prototype/#comment-992</link>
		<dc:creator>Helen</dc:creator>
		<pubDate>Thu, 12 Mar 2009 22:40:59 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=410#comment-992</guid>
		<description>Thanks Ted, I&#039;m glad you&#039;ve found it useful. :) The tabs in the comment field is a good idea. I&#039;ll have to look into it!</description>
		<content:encoded><![CDATA[<p>Thanks Ted, I&#8217;m glad you&#8217;ve found it useful. :) The tabs in the comment field is a good idea. I&#8217;ll have to look into it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ted devito</title>
		<link>http://helephant.com/2009/01/javascript-object-prototype/#comment-991</link>
		<dc:creator>ted devito</dc:creator>
		<pubDate>Wed, 11 Mar 2009 19:48:57 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=410#comment-991</guid>
		<description>hi Helen,
I&#039;ve really enjoyed all this info you&#039;ve put together on using JS. You write clearly and break down these concepts into thought chunks I understand. Since I know I am sometimes/often guilty of trying to convey too many concepts at one time, I don&#039;t feel surprised by how common that practice is among coders and instead simply appreciate when I find the contrast.

Anyway, thought you might like to enhance your comment  fields with tabs. Makes it easier for us coders to indent our code when we&#039;re discussing.

http://teddevito.com/demos/textarea.html</description>
		<content:encoded><![CDATA[<p>hi Helen,<br />
I&#8217;ve really enjoyed all this info you&#8217;ve put together on using JS. You write clearly and break down these concepts into thought chunks I understand. Since I know I am sometimes/often guilty of trying to convey too many concepts at one time, I don&#8217;t feel surprised by how common that practice is among coders and instead simply appreciate when I find the contrast.</p>
<p>Anyway, thought you might like to enhance your comment  fields with tabs. Makes it easier for us coders to indent our code when we&#8217;re discussing.</p>
<p><a href="http://teddevito.com/demos/textarea.html" rel="nofollow">http://teddevito.com/demos/textarea.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
