<?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: Using Inheritance Patterns to Organize Large jQuery Applications</title>
	<atom:link href="http://alexsexton.com/?feed=rss2&#038;p=51" rel="self" type="application/rss+xml" />
	<link>http://alexsexton.com/?p=51</link>
	<description>$(&#039;human#alex thoughts&#039;).filter(&#039;:not(.bs)&#039;);</description>
	<lastBuildDate>Sun, 05 Sep 2010 12:36:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Rupesh Kumar Tiwari</title>
		<link>http://alexsexton.com/?p=51&#038;cpage=1#comment-955</link>
		<dc:creator>Rupesh Kumar Tiwari</dc:creator>
		<pubDate>Sun, 05 Sep 2010 12:36:36 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=51#comment-955</guid>
		<description>Hi Cristminix,

I can suggest one solution please try below:
User ={ 
    init:function ( ) {
        this.name = [];
    },
    name :[],
    addName:function(n) {
        this.name.push(n);   
    },
    getName : function ( ) {
        alert(this.name);
    }
}

var obj1 = Object.create(User);
obj1.init ( );
obj1.addName(&quot;rupesh&quot;);
obj1.getName( );

var obj2 = Object.create(User);
obj2.init ( );
obj2.addName(&quot;ritesh&quot;);
obj2.getName( );</description>
		<content:encoded><![CDATA[<p>Hi Cristminix,</p>
<p>I can suggest one solution please try below:<br />
User ={<br />
    init:function ( ) {<br />
        this.name = [];<br />
    },<br />
    name :[],<br />
    addName:function(n) {<br />
        this.name.push(n);<br />
    },<br />
    getName : function ( ) {<br />
        alert(this.name);<br />
    }<br />
}</p>
<p>var obj1 = Object.create(User);<br />
obj1.init ( );<br />
obj1.addName(&#8220;rupesh&#8221;);<br />
obj1.getName( );</p>
<p>var obj2 = Object.create(User);<br />
obj2.init ( );<br />
obj2.addName(&#8220;ritesh&#8221;);<br />
obj2.getName( );</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cristminix</title>
		<link>http://alexsexton.com/?p=51&#038;cpage=1#comment-951</link>
		<dc:creator>cristminix</dc:creator>
		<pubDate>Fri, 03 Sep 2010 18:21:30 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=51#comment-951</guid>
		<description>Object.create , still dont create real instance but reference for original Object, I have problem while putting Array object member, the new instance born via Object.create still modify the original object. This tutorial is cool but really bad. we need a real copy not reference. Lets try this in firebug :


var Person  = {
    names : [&#039;john&#039;],
    addAnotherName : function(){
              this.names.push(&#039;koboy&#039;);
    }
};

var oPerson = Object.create( Person );

oPerson.addAnotherName(); // add &#039;koboy&#039;

// above make changes both oPerson.names and Person.names

oPerson.names // has value [&#039;john&#039;,&#039;koboy&#039;]
Person.names   // changed too to [&#039;john&#039;,&#039;koboy&#039;]
                         // what happen with these,  i just wanna changes oPerson ?

this has been tested with Firefox 4, and Chrome 4 

Sorry, but your tutorial is very helpful to me thanks</description>
		<content:encoded><![CDATA[<p>Object.create , still dont create real instance but reference for original Object, I have problem while putting Array object member, the new instance born via Object.create still modify the original object. This tutorial is cool but really bad. we need a real copy not reference. Lets try this in firebug :</p>
<p>var Person  = {<br />
    names : ['john'],<br />
    addAnotherName : function(){<br />
              this.names.push(&#8216;koboy&#8217;);<br />
    }<br />
};</p>
<p>var oPerson = Object.create( Person );</p>
<p>oPerson.addAnotherName(); // add &#8216;koboy&#8217;</p>
<p>// above make changes both oPerson.names and Person.names</p>
<p>oPerson.names // has value ['john','koboy']<br />
Person.names   // changed too to ['john','koboy']<br />
                         // what happen with these,  i just wanna changes oPerson ?</p>
<p>this has been tested with Firefox 4, and Chrome 4 </p>
<p>Sorry, but your tutorial is very helpful to me thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://alexsexton.com/?p=51&#038;cpage=1#comment-942</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Tue, 24 Aug 2010 20:38:54 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=51#comment-942</guid>
		<description>I sent you an email, but I&#039;d check out the books that I mention in the top of the article above all. Crock also has quite a few good videos and presos online that really help.</description>
		<content:encoded><![CDATA[<p>I sent you an email, but I&#8217;d check out the books that I mention in the top of the article above all. Crock also has quite a few good videos and presos online that really help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://alexsexton.com/?p=51&#038;cpage=1#comment-941</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Tue, 24 Aug 2010 20:37:57 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=51#comment-941</guid>
		<description>Your problem seems pretty specific Michael. You should come by #jquery and msg me sometime if you&#039;re still having issues, rather than doing debugging in these comments. I appreciate the feedback as well.</description>
		<content:encoded><![CDATA[<p>Your problem seems pretty specific Michael. You should come by #jquery and msg me sometime if you&#8217;re still having issues, rather than doing debugging in these comments. I appreciate the feedback as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://alexsexton.com/?p=51&#038;cpage=1#comment-940</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Tue, 24 Aug 2010 20:37:06 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=51#comment-940</guid>
		<description>Thanks Jon. Smiles.</description>
		<content:encoded><![CDATA[<p>Thanks Jon. Smiles.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Clark</title>
		<link>http://alexsexton.com/?p=51&#038;cpage=1#comment-939</link>
		<dc:creator>Jon Clark</dc:creator>
		<pubDate>Tue, 24 Aug 2010 20:33:20 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=51#comment-939</guid>
		<description>Hey Alex,

Hit this up today and read from top to bottom.. slowly.. so I finally understand it.

Thanks for the great post!</description>
		<content:encoded><![CDATA[<p>Hey Alex,</p>
<p>Hit this up today and read from top to bottom.. slowly.. so I finally understand it.</p>
<p>Thanks for the great post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Turnwall</title>
		<link>http://alexsexton.com/?p=51&#038;cpage=1#comment-930</link>
		<dc:creator>Michael Turnwall</dc:creator>
		<pubDate>Wed, 18 Aug 2010 17:31:03 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=51#comment-930</guid>
		<description>Hey Alex, I&#039;ve used this technique a couple of times and think it&#039;s great. I&#039;m running into a problem with my latest use. I created a plugin using this method to handle site messaging for a web app. I have two places where message can be written, #ajaxMessages and #flashMessages. So I call the plugin on each element so that each get their own instance of the messaging object.

The problem I&#039;m having is that my destroy method looks in an array for the last message id so it can remove it from the page. If I create an ajax message then a flash message and then try to destroy the ajax message, the flash message is actually the one removed since it was the last created. The ajax message object and flash message object share the message id array property and I can&#039;t figure out why.</description>
		<content:encoded><![CDATA[<p>Hey Alex, I&#8217;ve used this technique a couple of times and think it&#8217;s great. I&#8217;m running into a problem with my latest use. I created a plugin using this method to handle site messaging for a web app. I have two places where message can be written, #ajaxMessages and #flashMessages. So I call the plugin on each element so that each get their own instance of the messaging object.</p>
<p>The problem I&#8217;m having is that my destroy method looks in an array for the last message id so it can remove it from the page. If I create an ajax message then a flash message and then try to destroy the ajax message, the flash message is actually the one removed since it was the last created. The ajax message object and flash message object share the message id array property and I can&#8217;t figure out why.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://alexsexton.com/?p=51&#038;cpage=1#comment-897</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Sat, 24 Jul 2010 07:53:33 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=51#comment-897</guid>
		<description>Alex,

Love your article here, and I think I like your pattern better than the jqueryui one. Can you offer any more explanation of how you would integrate the module pattern here, or point to a good primer or some good books? Really hitting this organization/pattern/DRY stuff hard lately.</description>
		<content:encoded><![CDATA[<p>Alex,</p>
<p>Love your article here, and I think I like your pattern better than the jqueryui one. Can you offer any more explanation of how you would integrate the module pattern here, or point to a good primer or some good books? Really hitting this organization/pattern/DRY stuff hard lately.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis Kriplean</title>
		<link>http://alexsexton.com/?p=51&#038;cpage=1#comment-896</link>
		<dc:creator>Travis Kriplean</dc:creator>
		<pubDate>Sun, 18 Jul 2010 20:06:12 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=51#comment-896</guid>
		<description>Alex, thanks for this article. I&#039;m somewhat new to javascript and have been trying to figure out strategies for organizing my code. I&#039;m having a good time applying these principles. 

I could be missing something, but I believe there is a small error in your example code. Specifically, I think that you need to &quot;return this&quot; in Speaker.init. Otherwise, $.data(this,name, Object.create...init) in the generalized bridge will always just store null. 

Anyway, thanks again!</description>
		<content:encoded><![CDATA[<p>Alex, thanks for this article. I&#8217;m somewhat new to javascript and have been trying to figure out strategies for organizing my code. I&#8217;m having a good time applying these principles. </p>
<p>I could be missing something, but I believe there is a small error in your example code. Specifically, I think that you need to &#8220;return this&#8221; in Speaker.init. Otherwise, $.data(this,name, Object.create&#8230;init) in the generalized bridge will always just store null. </p>
<p>Anyway, thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://alexsexton.com/?p=51&#038;cpage=1#comment-889</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 01 Jul 2010 23:15:10 +0000</pubDate>
		<guid isPermaLink="false">http://alexsexton.com/?p=51#comment-889</guid>
		<description>He&#039;s using it in conjunction with John Resig&#039;s &#039;simple-inheritance&#039; which automatically calls the init function. I would encourage that method, but I was trying to stay agnostic to specific patterns.</description>
		<content:encoded><![CDATA[<p>He&#8217;s using it in conjunction with John Resig&#8217;s &#8216;simple-inheritance&#8217; which automatically calls the init function. I would encourage that method, but I was trying to stay agnostic to specific patterns.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.214 seconds -->
