<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Best Practices</title>
        <link>http://geekswithblogs.net/devdevin/category/2813.aspx</link>
        <description>General, but common ways of coding for improved performance, maintenance, etc.</description>
        <language>en-US</language>
        <copyright>Devin A. Rychetnik</copyright>
        <managingEditor>drychetnik@msn.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Localize It Baby</title>
            <link>http://geekswithblogs.net/devdevin/archive/2006/08/18/88448.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;I plan to&amp;nbsp;use the new localization features in ASP.NET 2.0 in my next personal project that I&amp;nbsp;deem cool enough to be truly international. Here is an article that shows how simple it really is: &lt;/FONT&gt;&lt;A href="http://www.codeguru.com/csharp/.net/net_asp/miscellaneous/article.php/c12407__1/"&gt;&lt;FONT face=Tahoma size=2&gt;http://www.codeguru.com/csharp/.net/net_asp/miscellaneous/article.php/c12407__1/&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=88448"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=88448" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/devdevin/aggbug/88448.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Devin Rychetnik</dc:creator>
            <guid>http://geekswithblogs.net/devdevin/archive/2006/08/18/88448.aspx</guid>
            <pubDate>Fri, 18 Aug 2006 21:47:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/devdevin/comments/88448.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/devdevin/archive/2006/08/18/88448.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/devdevin/comments/commentRss/88448.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/devdevin/services/trackbacks/88448.aspx</trackback:ping>
        </item>
        <item>
            <title>Interlocked Operations for Multithreaded Integer Manipulation in .NET</title>
            <link>http://geekswithblogs.net/devdevin/archive/2006/08/15/88109.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Today I came across a set of sweet little atomic operations for manipulating integers in .NET: &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/sbhbke0y.aspx"&gt;&lt;FONT face=Tahoma size=2&gt;http://msdn2.microsoft.com/en-us/library/sbhbke0y.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;So instead of doing this:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;private&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Tahoma&gt;&lt;FONT size=2&gt; &lt;FONT color=#0000ff&gt;object&lt;/FONT&gt; counterLock = &lt;FONT color=#0000ff&gt;new&lt;/FONT&gt; &lt;FONT color=#008080&gt;Object&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Tahoma&gt;&lt;FONT size=2&gt;();&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;lock&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Tahoma&gt;&lt;FONT size=2&gt; (counterLock)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;counter++;&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;You just do this:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#008080&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Interlocked&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Tahoma&gt;&lt;FONT size=2&gt;.Increment(&lt;FONT color=#0000ff&gt;ref&lt;/FONT&gt; counter);&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;This has two advantages. First, the code is much cleaner. Second, the performance is much faster. Why? I think the interlocked method is all executed within user mode whereas the other would require the overhead of switching to kernel mode.&lt;/FONT&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=88109"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=88109" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/devdevin/aggbug/88109.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Devin Rychetnik</dc:creator>
            <guid>http://geekswithblogs.net/devdevin/archive/2006/08/15/88109.aspx</guid>
            <pubDate>Wed, 16 Aug 2006 04:43:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/devdevin/comments/88109.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/devdevin/archive/2006/08/15/88109.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/devdevin/comments/commentRss/88109.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/devdevin/services/trackbacks/88109.aspx</trackback:ping>
        </item>
        <item>
            <title>Script Kiddies or Not, Stop Them</title>
            <link>http://geekswithblogs.net/devdevin/archive/2006/06/15/82064.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;I was just helping a buddy of mine do some cross-site scripting (XSS)&amp;nbsp;prevention and came across some good resources. If you don't know what XSS is, there is decent introduction here: &lt;/FONT&gt;&lt;A title=http://www.counterhack.net/xss.ppt href="http://www.counterhack.net/xss.ppt"&gt;&lt;FONT face=Tahoma size=2&gt;http://www.counterhack.net/xss.ppt&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Now on to the ones that I really wanted to post:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;This one is from Microsoft Patterns &amp;amp; Best Practices. How To: Protect From Injection Attacks in ASP.NET&lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/PAGHT000003.asp?_r=1"&gt;&lt;FONT face=Tahoma size=2&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/PAGHT000003.asp?_r=1&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Here is a download for Microsoft Anti-Cross Site Scripting Library V1.0.&lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=9a2b9c92-7ad9-496c-9a89-af08de2e5982&amp;amp;displaylang=en"&gt;&lt;FONT face=Tahoma size=2&gt;http://www.microsoft.com/downloads/details.aspx?familyid=9a2b9c92-7ad9-496c-9a89-af08de2e5982&amp;amp;displaylang=en&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;And this&amp;nbsp;is a nice walkthrough of how to do code review for XSS vulnerabilities.&lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://channel9.msdn.com/wiki/default.aspx/Channel9.CodeReviewXSS"&gt;&lt;FONT face=Tahoma size=2&gt;http://channel9.msdn.com/wiki/default.aspx/Channel9.CodeReviewXSS&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Oh, and I almost forgot! This one gives you a load of examples to check your site for XSS.&lt;BR&gt;&lt;/FONT&gt;&lt;A title=http://ha.ckers.org/xss.html href="http://ha.ckers.org/xss.html"&gt;&lt;FONT face=Tahoma size=2&gt;http://ha.ckers.org/xss.html&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=82064"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=82064" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/devdevin/aggbug/82064.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Devin Rychetnik</dc:creator>
            <guid>http://geekswithblogs.net/devdevin/archive/2006/06/15/82064.aspx</guid>
            <pubDate>Fri, 16 Jun 2006 01:42:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/devdevin/comments/82064.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/devdevin/archive/2006/06/15/82064.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/devdevin/comments/commentRss/82064.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/devdevin/services/trackbacks/82064.aspx</trackback:ping>
        </item>
        <item>
            <title>Seattle Code Camp v1.0</title>
            <link>http://geekswithblogs.net/devdevin/archive/2005/10/23/57836.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;I attended the &lt;/FONT&gt;&lt;A href="http://pacwest.ms/codecamp/sea/1/"&gt;&lt;FONT face=Tahoma size=2&gt;Seattle Code Camp&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt; this weekend (where I could) and had quite a bit of fun. In addition to learning a few things, I got to preview a bunch of upcoming technologies and meet a lot of distinguished developers in the area. For those of you who weren't able to attend or didn't see the same presentations I did, I'll just share some of my notes:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.devexpress.com/Products/NET/Refactor/"&gt;&lt;FONT face=Tahoma size=2&gt;Refactor!&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt; is a great tool that I already blogged about before, but they deserve a special plug since Mark Miller largely contributed to the event and frankly the tool is sweet for a measly $90. Also, the &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/vbasic/downloads/2005/tools/refactor/"&gt;&lt;FONT face=Tahoma size=2&gt;VB version for VS 2005 Beta 2&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt; is available for free.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Windows Mobile and .NET Compact Framework was made clear to me by Ed Kaim and you can get the &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/mobility/windowsmobile/howto/resourcekit/"&gt;&lt;FONT face=Tahoma size=2&gt;Mobile 5.0 Developer Evaluation Kit&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt; that has everything you need to get started today. It also includes a free copy of VS 2005 Beta 2, which should hold you off till the November 7th release. Also, for those of you who plan on doing some serious mobile development you can get unlocked and unrestricted phones from &lt;/FONT&gt;&lt;A href="http://www.expansys.com"&gt;&lt;FONT face=Tahoma size=2&gt;www.expansys.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt; and find lots of amazing open software resources at &lt;/FONT&gt;&lt;A href="http://www.opennetcf.org"&gt;&lt;FONT face=Tahoma size=2&gt;www.opennetcf.org&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Next up I saw a new and potentially revolutionary way of developing software in VS 2005 using software factories from Martin Danner. The definitive book on the subject is &lt;/FONT&gt;&lt;A href="http://www.amazon.com/exec/obidos/tg/detail/-/0471202843/qid=1130138828/sr=8-1/ref=pd_bbs_1/102-7611404-0930561?v=glance&amp;amp;s=books&amp;amp;n=507846"&gt;&lt;FONT face=Tahoma size=2&gt;Software Factories published by Wiley&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;&amp;nbsp;and the specific way this is done in VS 2005 is by utilizing the &lt;/FONT&gt;&lt;A href="http://www.guidanceautomation.net/"&gt;&lt;FONT face=Tahoma size=2&gt;guidance automation toolkit (GAT)&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Brad Abrams shared his wisdom on framework design guidelines and gave us these four key points to remember and ponder: 1) the power of sameness, 2) framework design matters, 3) tools for communication, 4) the pit of sucess. He described the pit of success as designing your framework so simply that the user can do what he/she is intending to do as easily as it&amp;nbsp;is to fall into a pit. He also shared a great motto to follow when designing your framework, &amp;#8220;make the simple things simple and the hard things possible.&amp;#8221; He also gave away a free copy of &lt;A href="http://www.amazon.com/exec/obidos/tg/detail/-/0321246756/102-7611404-0930561?v=glance"&gt;the book he co-authored on the subject&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;The next&amp;nbsp;day&amp;nbsp;I saw some of the amazing things you can do with &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/netframework/future/linq/"&gt;&lt;FONT face=Tahoma size=2&gt;LINQ&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt; from Tim Shakarian. If you haven't looked at this stuff in depth yet&amp;nbsp;I highly recommend it. Although it is almost scary to see how easy it could be abused or misused,&amp;nbsp;it is&amp;nbsp;certainly going to save a lot of development time and improve the way we do data related operations in the future.&amp;nbsp;I also got a preview of C# 3.0, which adds some extremely powerful new features like type inference and anonymous types.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;The last session I went to was with&amp;nbsp;Peter Provost who&amp;nbsp;gave a screaming run through of how to build a smart client application using the &lt;/FONT&gt;&lt;A href="http://workspaces.gotdotnet.com/cab"&gt;&lt;FONT face=Tahoma size=2&gt;Composite UI Application Block (CAB)&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;. In just one hour, bystanders witnessed him tear through the code necessary to build the basic structure of a tabbed web browser with a bookmarks list. He also mentioned that this application block will have some sort of integration with the next version of the &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/uip.asp"&gt;&lt;FONT face=Tahoma size=2&gt;User Interface Process (UIP) block&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;&amp;nbsp;in the future.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Also, one thing that came up over and over throughout the weekend was &lt;A href="http://www.gotdotnet.com/team/FXCop/"&gt;FXCop&lt;/A&gt;, a free code analysis tool for checking .NET managed code assemblies and their conformance with the &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconnetframeworkdesignguidelines.asp"&gt;Microsoft .NET Framework Design Guidelines&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=57836"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=57836" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/devdevin/aggbug/57836.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Devin Rychetnik</dc:creator>
            <guid>http://geekswithblogs.net/devdevin/archive/2005/10/23/57836.aspx</guid>
            <pubDate>Mon, 24 Oct 2005 05:07:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/devdevin/comments/57836.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/devdevin/archive/2005/10/23/57836.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/devdevin/comments/commentRss/57836.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/devdevin/services/trackbacks/57836.aspx</trackback:ping>
        </item>
        <item>
            <title>Lazy Loading</title>
            <link>http://geekswithblogs.net/devdevin/archive/2005/09/20/54532.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Here is a technique that I only recently came to know as &amp;#8220;lazy loading&amp;#8220;. First, it is useful when the variable will not always necessarily be used and therefore will not always need to be loaded. Second, since it checks to see if the variable has already been loaded, it will not reload the data multiple times. This is &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;especially important to do performance-wise for variables that may load large amounts of data so that it does not needlessly allocate extra space in memory.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;In this example, assume that GetEmployeeDataSet() instantiates, populates, and returns a very large DataSet object.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;
&lt;HR id=null&gt;

&lt;P&gt;&lt;/P&gt;
&lt;P&gt;                &lt;SPAN style="FONT-SIZE: 10pt; COLOR: #008000; FONT-FAMILY: Courier New"&gt;// member variable&lt;BR&gt;        &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #0000ff; FONT-FAMILY: Courier New"&gt;private &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Courier New"&gt;DataSet _employeeDataSet = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #0000ff; FONT-FAMILY: Courier New"&gt;null&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Courier New"&gt;;&lt;BR&gt;&lt;BR&gt;        &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #008000; FONT-FAMILY: Courier New"&gt;// property&lt;BR&gt;        &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #0000ff; FONT-FAMILY: Courier New"&gt;public &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Courier New"&gt;DataSet EmployeeDataSet&lt;BR&gt;        {&lt;BR&gt;            &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #0000ff; FONT-FAMILY: Courier New"&gt;get&lt;BR&gt;            &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Courier New"&gt;{&lt;BR&gt;                &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #0000ff; FONT-FAMILY: Courier New"&gt;if &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Courier New"&gt;(_employeeDataSet == &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #0000ff; FONT-FAMILY: Courier New"&gt;null&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Courier New"&gt;)&lt;BR&gt;                    _employeeDataSet = GetEmployeeDataSet();&lt;BR&gt;&lt;BR&gt;                &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #0000ff; FONT-FAMILY: Courier New"&gt;return &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Courier New"&gt;_employeeDataSet;&lt;BR&gt;            }&lt;BR&gt;        }&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Courier New"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=54532"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=54532" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/devdevin/aggbug/54532.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Devin Rychetnik</dc:creator>
            <guid>http://geekswithblogs.net/devdevin/archive/2005/09/20/54532.aspx</guid>
            <pubDate>Wed, 21 Sep 2005 04:54:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/devdevin/comments/54532.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/devdevin/archive/2005/09/20/54532.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/devdevin/comments/commentRss/54532.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/devdevin/services/trackbacks/54532.aspx</trackback:ping>
        </item>
    </channel>
</rss>