<?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: Lazy definition function</title>
	<atom:link href="http://www.jspatterns.com/lazy-definition-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jspatterns.com/lazy-definition-function/</link>
	<description>Exploring common JavaScript patterns and anti-patterns</description>
	<lastBuildDate>Fri, 03 Feb 2012 21:54:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
	<item>
		<title>By: pregnancy book</title>
		<link>http://www.jspatterns.com/lazy-definition-function/#comment-41739</link>
		<dc:creator>pregnancy book</dc:creator>
		<pubDate>Thu, 15 Dec 2011 16:07:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=66#comment-41739</guid>
		<description>Hi my loved one! I want to say that this article is awesome, great written and come with approximately all important infos. I&#039;d like to look more posts like this.</description>
		<content:encoded><![CDATA[<p>Hi my loved one! I want to say that this article is awesome, great written and come with approximately all important infos. I&#8217;d like to look more posts like this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raylene</title>
		<link>http://www.jspatterns.com/lazy-definition-function/#comment-37846</link>
		<dc:creator>Raylene</dc:creator>
		<pubDate>Sun, 13 Nov 2011 08:14:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=66#comment-37846</guid>
		<description>The video card (sometimes referred to as the GPU) is yet another vital component in any gaming rig, as it handles nearly all of the graphics for your video game titles. A person of the issues with video cards - in particular the center and minimal end ones - is that they tend to come to be obsolete faster than the other components of a gaming pc. Commonly, acquiring a higher conclusion video card when you are upgrading or building your gaming rig is vital as it presents you breathing region in advance of it&#039;s time to upgrade once more.</description>
		<content:encoded><![CDATA[<p>The video card (sometimes referred to as the GPU) is yet another vital component in any gaming rig, as it handles nearly all of the graphics for your video game titles. A person of the issues with video cards &#8211; in particular the center and minimal end ones &#8211; is that they tend to come to be obsolete faster than the other components of a gaming pc. Commonly, acquiring a higher conclusion video card when you are upgrading or building your gaming rig is vital as it presents you breathing region in advance of it&#8217;s time to upgrade once more.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gendelf</title>
		<link>http://www.jspatterns.com/lazy-definition-function/#comment-6816</link>
		<dc:creator>Gendelf</dc:creator>
		<pubDate>Wed, 10 Nov 2010 11:45:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=66#comment-6816</guid>
		<description>Function is a function. It should be used to do or calculate something. To store result we have variables</description>
		<content:encoded><![CDATA[<p>Function is a function. It should be used to do or calculate something. To store result we have variables</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://www.jspatterns.com/lazy-definition-function/#comment-2585</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Mon, 19 Apr 2010 21:59:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=66#comment-2585</guid>
		<description>This pattern can be useful when dealing with cross-browser code. For instance, getting the XmlHttpRequest() object. You could wrap the code for searching the correct object in the initial code and return the caching of the final object. Like this for instance:

ns.getXHRObject = function() {

  if (typeof(window.XMLHttpRequest) === &quot;function&quot;) {
    // Native object exists
    ns.getXHRObject = function() {
                                return new window.XMLHttpRequest();
                              };
  }
  else {
    // Do your older browser searching here and replace the outcome with
    // a similar new function definition as above..
  }
};

Next time the function is called, the caching is returned. So execution will be faster the
second time.. imagine doing this for functions which will do lots of logic over and over again with the same outcome.. this can save lots of cpu cycles.. and better yet, improve user experience..</description>
		<content:encoded><![CDATA[<p>This pattern can be useful when dealing with cross-browser code. For instance, getting the XmlHttpRequest() object. You could wrap the code for searching the correct object in the initial code and return the caching of the final object. Like this for instance:</p>
<p>ns.getXHRObject = function() {</p>
<p>  if (typeof(window.XMLHttpRequest) === &#8220;function&#8221;) {<br />
    // Native object exists<br />
    ns.getXHRObject = function() {<br />
                                return new window.XMLHttpRequest();<br />
                              };<br />
  }<br />
  else {<br />
    // Do your older browser searching here and replace the outcome with<br />
    // a similar new function definition as above..<br />
  }<br />
};</p>
<p>Next time the function is called, the caching is returned. So execution will be faster the<br />
second time.. imagine doing this for functions which will do lots of logic over and over again with the same outcome.. this can save lots of cpu cycles.. and better yet, improve user experience..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yaroslav</title>
		<link>http://www.jspatterns.com/lazy-definition-function/#comment-2411</link>
		<dc:creator>Yaroslav</dc:creator>
		<pubDate>Mon, 29 Mar 2010 10:57:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=66#comment-2411</guid>
		<description>What is the difference between lazy definition functions and closures? They looks too similar.</description>
		<content:encoded><![CDATA[<p>What is the difference between lazy definition functions and closures? They looks too similar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ????? &#187; Blog Archive &#187; Lazy Function Definition</title>
		<link>http://www.jspatterns.com/lazy-definition-function/#comment-2294</link>
		<dc:creator>????? &#187; Blog Archive &#187; Lazy Function Definition</dc:creator>
		<pubDate>Thu, 18 Mar 2010 14:41:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=66#comment-2294</guid>
		<description>[...] http://www.jspatterns.com/lazy-definition-function/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.jspatterns.com/lazy-definition-function/" rel="nofollow">http://www.jspatterns.com/lazy-definition-function/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nghia</title>
		<link>http://www.jspatterns.com/lazy-definition-function/#comment-2018</link>
		<dc:creator>nghia</dc:creator>
		<pubDate>Mon, 18 Jan 2010 14:27:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=66#comment-2018</guid>
		<description>Hi Stoyan Stefanov
please answer me a question : What is Lazy definition function used for? and when we use it ?</description>
		<content:encoded><![CDATA[<p>Hi Stoyan Stefanov<br />
please answer me a question : What is Lazy definition function used for? and when we use it ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

