Archive

Archive for June, 2007

Better Domain-Driven Design Implementation – Via Udi’s Blog

June 22, 2007 Leave a comment
Categories: Great Links

How Interfaces solve visibility and testing issues

June 22, 2007 Leave a comment
Udi has a really nice post here on how Interfaces solve visibility and testing issues.
A nice read.
Categories: Great Links

Talking about Videos & Podcasts on Microsoft technologies

June 22, 2007 Leave a comment

From Sreedhar. 

Quote

Videos & Podcasts on Microsoft technologies

Videos, Podcasts on Microsoft Technologies

I have recently prepared a list of Videos, Podcasts sites on Microsoft Technologies known to me. Add up the sites you know

.NET Rocks – .NET Rocks! is twice a week talk show for anyone interested in programming on the Microsoft .NET platform. The shows range from introductory information to hardcore geekiness. The show is hosted by CarlFranklin & Richard Campbell. The best show by far in the .NET World. Check out the shows Archive.

DNRTV – Once again the show is hosted by Carl Franklin dnrTv is a fusion of a training video and an interview show. Every week carl interviews a guest on technology, while the guest acutually demonstrating(Coding live) on the technology. Great show which helps you to kickstart new technologies. Check out the Archive page for list of shows.

HanselMinutes – Hanselminutes is a weekly audio talk show with noted web developer and technologist Scott Hanselman and hosted by once again Carl Franklin. Scott discusses utilities and tools, gives practical how-to advice, and discusses ASP.NET or Windows issues and workarounds. Scott Hanselman’s has an excellent blog which is very resourceful to any one in .NET World. Check out the previous shows.

Channel9 – Channel9 is a great place where microsoft host videos with its employees about the coolest things they are working on inside Microsoft. The interviews are in converstion style, with great hosts like charles, Rory they are very interesting too. Its always interesting to hear about the technology, from some one who is actually part of developing it. Check this place regularly to know whats new from microsoft.

ArCast.net & ArCast.TV – Hosted by RonJacobs, the shows discuss about latest trends in architecture, with new products and technologies evolving. Ron interviews guests from product teams, Microsoft customers and partners to through light on what’s happening around and how software architecture is evovling. Ron has great blog and website

Microsoft Webcasts – This is central repository of webcasts on microsoft technologies. Microsoft provides tons of webcasts on different technologies which are a great place to start if you want to learn any new technology. You can view them online and most of them are downloadable too. The content available here covers most of the topics in microsoft world.
Update: Microsoft has also added virtual labs under this section. Users can browse, download/listen to on-demand webcasts and can also try the same on virtual labs.

The .NET show – The original .NET show hosted by Robert Hess and produced by microsoft. The show primarly focuses on whats new and what would be the next big thing in .NET world. The show is usually monthly, though sometimes the gap between shows is even wider. The show has a great list of archives which would be of interest to .NET world.

ASPNet PodCast – Asp Net podcast is targeted at developers in ASP.NET and SQLServer the show is hosted by asp.net. Contains some good podcasts on various topics in ASP.NET. Check out Wally’s Blog for previous shows

SqlDownUnder – Hosted by GregLow, this show is all about SQL Server. It has some interesting shows with Dr Jim Gray, Bob Beauchemin, Kimberly Tripp

Polymorphic Podcast – Hosted by Craig Shoemaker, This is one of the good shows around on .NET platform. The show priamraly focus on Object Oriented Development, Architecture, Best Practices in .NET

RunAsRadio – Hosted by Richard Campbell, Greg Hughes RunAsRadio is launched recently on April 11, 2007. RunAs Radio is a weekly Internet Audio Talk Show for IT Professionals working with Microsoft products. The full range of IT topics is covered from a Microsoft-centric viewpoint.

Grok Talks – This contains a list of 36 videos each done by a Microsoft Regional Director shot during tech-ed 2005. These talks are typically 10-15 minutes and are fun to watch. Go check out the cools stuff.

MSDN TV – MSDN TV was a a show with short video, appearing weekly, featuring useful technology tips and insights from the folks behind the scenes at Microsoft. The last episode of the show was posted on 14th September 2006. Though the show is no longer active, check out the archive the great shows.

 

Categories: Uncategorized

Encapsulation vs Information Hiding

June 11, 2007 Leave a comment
Good discussion on "Encapsulation vs Information Hiding" in Joel on Software
 
Update: Another article:
Encapsulation is not information hiding
Categories: Great Links

Life after death by PowerPoint

June 11, 2007 Leave a comment
Categories: Great Links

The underlying patterns of Composite Application Block

June 7, 2007 Leave a comment
Categories: Great Links

I stand corrected

June 6, 2007 Leave a comment
I have been mis spelling ‘of late’ for quite some time now.
Thanks to Mike, I stand corrected now. Earlier I used to spell as Off late
Categories: Uncategorized

On being Agile

June 5, 2007 Leave a comment
It is not the strongest of the species that will survive, or the most intelligent. It is the one most adaptable to change.
-Charles Darwin
 
From Practices of an Agile Developer – Pragmatic Programmers LLC

Refreshing a Cache using SqlCacheDependency & CacheItemRemoved callback, Infinite Loops & StackOverFlowException

June 2, 2007 1 comment

Recently I ran into a strange issue with SqlCacheDependency implementation.
Last sprint (not the agile term) has been mercilessly 12 days long without a break and has taken the steam out of me I guess.
Tired minds make mistakes, And last couple of days there has been quite a few of them.
Anyway, back to the issue on hand. I was trying to do a sample appplication to solve a simple problem.
The Problem is that the CacheItemRemoved callbacks do not have the HttpContext.Current.
As a work around / hack we were calling the RefreshCache in a webservice which has access to HttpContext.Current.
Recently I read somewhere that if we use HttpRuntime.Cache we can avoid the webservice call.
I set out yesterday evening to make a sample application to assert the fact that it works.
I was using SqlCacheDependency to invalidate the cache.
The code snippet I was using in the application.

namespace CacheDependencyDemo
{
public class CacheManager
{
public void SetupCacheDependency()
{
using (SqlConnection cn = new SqlConnection(WebConfigurationManager.ConnectionStrings["Pubs"].ConnectionString))
{
cn.Open();
using (SqlCommand cmd = cn.CreateCommand())
{
cmd.CommandText = "SELECT au_lname from authors where au_id =’172-32-1176’"
cmd.CommandType = CommandType.Text;

SqlCacheDependency cacheDependency = new SqlCacheDependency(cmd);

string lastName = (string)cmd.ExecuteScalar();
HttpRuntime.Cache.Insert("LastName", lastName, cacheDependency, Cache.NoAbsoluteExpiration, Cache.NoSlidingExpiration, CacheItemPriority.NotRemovable, this.RegionIDChangedCallback);

}
}
}

public void RegionIDChangedCallback(String key, object value, CacheItemRemovedReason removedReason)
{
if (removedReason == CacheItemRemovedReason.DependencyChanged)
{
SetupCacheDependency();
}
}
}
}

namespace CacheDependencyDemo
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
SqlDependency.Start(WebConfigurationManager.ConnectionStrings["Pubs"].ConnectionString);
CacheManager cacheManager = new CacheManager();
cacheManager.SetupCacheDependency();
}

protected void Application_End(object sender, EventArgs e)
{
SqlDependency.Start(WebConfigurationManager.ConnectionStrings["Pubs"].ConnectionString);
}
}
}

I was noticing a strange problem here. The Cache.Insert call was also resulting in a immediate CacheItemRemoved callback with CacheItemRemovedreason as DependencyChanged. The callback sets up the cache again thus going into an infinite loop. I decided to get to the bottom of the issue. The actual issue was that I had to use owner qualified table names in the select query. "SELECT [dbo].[authors].[au_lname] from [dbo].[authors] where [dbo].[authors].[au_id] =’172-32-1176’" did the trick. After a good sleep I could debug the issue in just 10 minutes.

CacheDependencies are really a cool feature. But I dont know why its been designed in a virtually non debuggable manner. Agreed that this has been documented, but throwing an exception would have did the trick and saved a couple of hours. Poor API Design choice IMHO.

The article "Using and Monitoring SQL Server 2005 Query Notification"
http://www.simple-talk.com/sql/sql-server-2005/using-and-monitoring-sql-2005-query-notification/ had been of great help to debug SQL Cache Dependency issues.

Categories: Uncategorized