<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jesal gadhia &#187; bestpractice</title>
	<atom:link href="http://jesal.us/tag/bestpractice/feed/" rel="self" type="application/rss+xml" />
	<link>http://jesal.us</link>
	<description></description>
	<lastBuildDate>Thu, 14 Jul 2011 18:51:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>ADO.NET Data Access Template</title>
		<link>http://jesal.us/2008/10/adonet-data-access-template/</link>
		<comments>http://jesal.us/2008/10/adonet-data-access-template/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 23:32:59 +0000</pubDate>
		<dc:creator>J</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ado.net]]></category>
		<category><![CDATA[bestpractice]]></category>

		<guid isPermaLink="false">http://jesal.us/blog/?p=97</guid>
		<description><![CDATA[Here&#8217;s a basic ADO.NET data access template with a SqlCacheDependency. Just wanted to post this for my future reference. public static DataSet GetData(long itemID) { DataSet ds = new DataSet(); string cacheKey = Helpers.GetCacheKey(itemID); //Get a cache key unique to this method. if (HttpContext.Current.Cache[cacheKey] != null) { ds = (DataSet)HttpContext.Current.Cache[cacheKey]; } else { using (SqlConnection [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a basic ADO.NET data access template with a <a href="http://msdn.microsoft.com/en-us/library/system.web.caching.sqlcachedependency.aspx">SqlCacheDependency</a>. Just wanted to post this for my future reference.</p>
<pre name="code" class="c-sharp:nogutter">
public static DataSet GetData(long itemID)
{
    DataSet ds = new DataSet();
    string cacheKey = Helpers.GetCacheKey(itemID); //Get a cache key unique to this method.

    if (HttpContext.Current.Cache[cacheKey] != null)
    {
        ds = (DataSet)HttpContext.Current.Cache[cacheKey];
    }
    else
    {
        using (SqlConnection sqlConnection = new SqlConnection(WebConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
        {
            using (SqlCommand sqlCommand = new SqlCommand())
            {
                sqlCommand.Connection = sqlConnection;
                sqlCommand.CommandType = CommandType.StoredProcedure;
                sqlCommand.CommandText = "sp_Items_GetItemByID";
                sqlCommand.Parameters.Add("@itemID", SqlDbType.BigInt).Value = itemID;
                sqlConnection.Open();

                using (SqlDataAdapter da = new SqlDataAdapter(sqlCommand))
                {
                    da.Fill(ds);
                }
            }
        }

        SqlCacheDependency sqlCacheDependency = new System.Web.Caching.SqlCacheDependency(WebConfigurationManager.AppSettings["DatabaseName"], "Items");
        HttpContext.Current.Cache.Insert(cacheKey, ds, sqlCacheDependency, System.Web.Caching.Cache.NoAbsoluteExpiration, System.Web.Caching.Cache.NoSlidingExpiration);
    }

    return ds;
}
</pre>
<p>Note that I&#8217;ve employed most of the recommended best practices like caching, &#8220;using&#8221; keywords, stored procedures and connection string inside web.config. </p>
]]></content:encoded>
			<wfw:commentRss>http://jesal.us/2008/10/adonet-data-access-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 ASP.NET Performance and Scalability Secrets</title>
		<link>http://jesal.us/2008/02/10-aspnet-performance-and-scalability-secrets/</link>
		<comments>http://jesal.us/2008/02/10-aspnet-performance-and-scalability-secrets/#comments</comments>
		<pubDate>Sat, 02 Feb 2008 23:45:57 +0000</pubDate>
		<dc:creator>J</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[bestpractice]]></category>

		<guid isPermaLink="false">http://jesal.us/blog/2008/02/02/10-aspnet-performance-and-scalability-secrets/</guid>
		<description><![CDATA[Very good article. Covers all the following topics: ASP.NET Pipeline optimization ASP.NET Process configuration optimization Things you must do for ASP.NET before going live Content Delivery Network Caching AJAX calls on browser Making best use of Browser Cache On demand progressive UI loading for fast smooth experience Optimize ASP.NET 2.0 Profile provider How to query [...]]]></description>
			<content:encoded><![CDATA[<p>Very good article. Covers all the following topics:</p>
<ul>
<li>ASP.NET Pipeline optimization</li>
<li>ASP.NET Process configuration optimization</li>
<li>Things you must do for ASP.NET before going live</li>
<li>Content Delivery Network</li>
<li>Caching AJAX calls on browser</li>
<li>Making best use of Browser Cache</li>
<li>On demand progressive UI loading for fast smooth experience</li>
<li>Optimize ASP.NET 2.0 Profile provider</li>
<li>How to query ASP.NET 2.0 Membership tables without bringing down the site</li>
<li>Prevent Denial of Service (DOS) attack</li>
</ul>
<p><a target="_blank" href="http://www.codeproject.com/KB/aspnet/10ASPNetPerformance.aspx">http://www.codeproject.com/KB/aspnet/10ASPNetPerformance.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jesal.us/2008/02/10-aspnet-performance-and-scalability-secrets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# Coding Standards and Best Programming Practices</title>
		<link>http://jesal.us/2008/01/c-coding-standards-and-best-programming-practices/</link>
		<comments>http://jesal.us/2008/01/c-coding-standards-and-best-programming-practices/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 00:32:19 +0000</pubDate>
		<dc:creator>J</dc:creator>
				<category><![CDATA[bestpractice]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://jesal.us/blog/2008/01/16/c-coding-standards-and-best-programming-practices/</guid>
		<description><![CDATA[I was reading a best practices document created by the DotNetSpider team which covered many aspects of programming in .NET. I was really impressed by it and I think its a very good reference document. So I&#8217;ve decided to make a series of posts where I&#8217;ll post sections of their document covering a specific topic.]]></description>
			<content:encoded><![CDATA[<p>I was reading a best practices <a href="http://www.dotnetspider.com/tutorials/BestPractices.aspx" target="_blank">document</a> created by the <a href="http://www.dotnetspider.com/" target="_blank">DotNetSpider</a> team which covered many aspects of programming in .NET. I was really impressed by it and I think its a very good reference document. So I&#8217;ve decided to make a series of posts where I&#8217;ll post sections of their document covering a specific topic.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesal.us/2008/01/c-coding-standards-and-best-programming-practices/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASP.NET 2.0 Tips and Tricks</title>
		<link>http://jesal.us/2007/04/aspnet-20-tips-and-tricks/</link>
		<comments>http://jesal.us/2007/04/aspnet-20-tips-and-tricks/#comments</comments>
		<pubDate>Sat, 28 Apr 2007 03:02:38 +0000</pubDate>
		<dc:creator>J</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[bestpractice]]></category>

		<guid isPermaLink="false">http://jesal.us/blog/2007/04/27/aspnet-20-tips-and-tricks/</guid>
		<description><![CDATA[Some cool tips and tricks posted on Dan Wahlin&#8217;s blog. ASP.NET 2.0 is an awesome framework for developing Web applications. If you&#8217;ve worked with it for awhile then that&#8217;s no secret. It offers some great new features that you can implement with a minimal amount of code. I wanted to start a list of some [...]]]></description>
			<content:encoded><![CDATA[<p>Some cool tips and tricks posted on <a href="http://weblogs.asp.net/dwahlin">Dan Wahlin&#8217;s blog</a>. </p>
<blockquote><p>ASP.NET 2.0 is an awesome framework for developing Web applications. If you&#8217;ve worked with it for awhile then that&#8217;s no secret. It offers some great new features that you can implement with a minimal amount of code. I wanted to start a list of some of the most simple (yet cool) things you could do with it that required little or no C#/VB.NET code. If you have other suggestions add a comment and I&#8217;ll update the list if the suggestion is a simple task that can be applied easily.</p></blockquote>
<p>You can find the original post <a href="http://weblogs.asp.net/dwahlin/archive/2007/04/17/simple-asp-net-2-0-tips-and-tricks-that-you-may-or-may-not-have-heard-about.aspx">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesal.us/2007/04/aspnet-20-tips-and-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

