Recent Posts

Well I am heading out to Myrtle Beach tonight at 4am, so I spent today finishing up some cleanup so I could release DoddleImport on CodePlex. It should be pretty feature complete and ready for use, and as always, please let me know if it helps you out! Objective Flexible importing of data via a fluid and fully extensible API to easily add support for new Import Sources and Import Destinations. I will update the documentation and provide some better examples when I get back. Here you can see a quick example of me importing some...

A project I am now working on is using the Web Client Software Factory (WCSF) from the patterns & practices team. It is basically an elaborate MVP-based framework that currently sits on top of ASP.NET Webforms. One of the components it ships with is the ObjectContainerDataSource which is a lot like the ObjectDataSource that ASP.NET provides. I admittedly have little experience with either of these controls, since I am not a huge fan of declarative data binding in larger applications. It does however offer better integration with the MVP pattern, simplifying the “bubbling” of DataSource events up to...

Update 2/10/2009: I have updated the helper code a little bit to include an ID parameter as well as to inject the jQuery treeview script code automatically. Please modify to your desire, or make sure to include the jQuery TreeView plugin script to your page before running. The following helper will make it easy to create a tree view from a recursive self-referencing table. Below you are seeing a tree of “Locations” where each Location can contain X number of child locations. Dependencies  jQuery TreeView Plugin Rendered Tree Table Definition The table itself is extremely simple, each Location has a ParentLocationId which is a relationship...

I encountered a rather frustrating problem with jQuery UI tabs this week. The problem occurs when trying to tabify some content after using jQuery’s $().load method to load the tabs HTML via an ajax request. The following code works perfectly in all browsers except IE6 and IE7 (It works fine in IE8 as well), as can be seen in the screenshot below. $('#deviceDetailsWrapper').load('/device/details/294', null, function() { $('#tabs').tabs(); }); However, here is what renders in IE6/7. For some reason, the jQuery tabs are triggering a GET request of the current URL and loading the content into the tab itself. Below you...

A couple months ago I wrote a basic set of extension methods to handle automatic auditing in LINQ to SQL. Well I have received a large number of emails regarding this particular project so I have decided to focus on cleaning up my v2 API and releasing it on CodePlex. There was a lot of room for improvement from version 1 and today I am going to post the all new LINQ Audit Trail code. This new version is significantly enhanced in the previous version. Objective Automatic auditing of all inserts/updates/deletes for any table in your database with...

This weekend I started playing with Automated Builds in TFS 2008. Over the next few weeks I am going to setup automated builds for my various projects so I can start running automated integration testing and automated staging releases at certain intervals (nightly, weekly, etc). Unfortunately I hit a snag when I tried building one of my solutions that contained a Web Application Project. After some digging around, I eventually opened up the “Release.txt” log file which can be found in the deployment directory, I found the following error: error MSB4019: The...

As mentioned in my previous article, the Managed AddIn Framework supports AppDomain isolation out of the box. This can come in very handy as long as you understand what is really happening under the covers. I am not going to cover all the details of AppDomain isolation and assembly loading within the CLR, but there are plenty of great resources about such things on MSDN. All you need to know for this article is that every .NET assembly much be loaded into memory within an AppDomain, and unless you specifically share assemblies across these domains (as explained below) then they...

Disclaimer: This post is mainly for my own reference. Quite honestly, the Managed AddIn Framework (henceforth known as MAF), is a rather complex beast, and I simply cannot remember all the steps necessary to utilize it properly without a small reference guide. This post will cover the complete step-by-step tutorial of every action that a developer must perform to utilize the AddIn framework. It will not be a complete overview of what MAF is or how all the parts tie together. I will do my best to cover these things, but I have also included some very helpful reference material...

Just what exactly are these snippets? I believe that snippets are an underused feature built into Visual Studio. This post is my attempt at comparing the two tools I have used for snippet creation, and hoping to make more developers out there aware of just how easy they are to create and use in your existing projects. I am by no means an expert with either of these tools, but I think that is the point: they take a few minutes to create and can be reused for immediate time savers. Much to my surprise there exists a...

I recently noticed a colleague of mine using a hardware KVM to share his desktop keyboard and mouse with his laptop. He had a standard hardware KVM with basic PS/2 inputs and could toggle between the PCs by pressing Scroll Lock twice. Pretty typical setup for many people who have multiple PCs, and it wasn't more than a few years ago that I was doing that same. Enter Synergy. Synergy is actually lot more than a basic KVM. It makes multiple computers behave exactly as though they were a single PC with dual-monitors. You simply move your mouse...

UPDATE: This post is outdated and has significantly enhanced with a new version. Please see LINQ Audit Trail V2  In a project I am currently working on, we had a fairly common requirement of recording an Audit Trail of any data changes. The requirements were typical, provide a running log of any changes in the database, including: What table was modified? What fields changed? Who made the change? When did it occur? Naturally, there are many ways to tackle this...

So as you can see I've been playing with ASP.NET MVC in my free time lately. But as it turns out I learned something totally unrelated to MVC while I was editing the default stylesheet that MVC Preview 2 ships with. #mainContent { padding: 30px 30px 15px 30px; background-color: #FFF; border-bottom: 3px groove #4b6f92; margin-bottom: 30px; _height: 1px; /* only IE6 applies CSS properties starting with an underscrore */ } I can't believe I never knew about this. I have read 3 CSS books in the past few years...

This post is a follow-up to an article I wrote a few weeks ago, ADO.NET Entity Framework Comparison Frustration. As a quick re-cap, I was simply trying to filter a list of users with a LINQ query expression by comparing custom classes, not primitive types. TorvusEntities entities = new TorvusEntities(); // Pull my Account Entity from the database Account matt = entities.Accounts.First(a => a.AccountId == 10); // Attempt to get all Teams by a Team Owner var teams = from t in entities.Teams where t.Owner == matt ...

Today I just stumbled onto some interesting information regarding placements of script blocks and CSS links. According to some extensive testing performed at Yahoo!, they have published a list of Best Practices for Speeding Up Your Web Site. Many of these rules came as no surprise, for example: While researching performance at Yahoo!, we discovered that moving stylesheets to the document HEAD makes pages load faster. This is because putting stylesheets in the HEAD allows the page to render progressively. However, one rule caught my attention: Rule 5 described how stylesheets near the bottom of the page prohibit progressive rendering, and how...

Honestly, I'm not sure if this setting is new to Visual Studio 2008 or not, but I just stumbled onto it. Typically when I'm debugging an ASP.NET application I test one page at a time, by right-clicking on the aspx and selecting View in Browser.   I prefer this method because I can keep the browser open at all times during development and not have to compile the whole site to quickly test something simple like markup changes. The caveat to this however, is that the Visual Studio debugger is not attached to the cassini process,...

The ASP.NET MVC framework ships with a number of Visual Studio project and item templates to ease our development tasks. One of these templates is a UserControl built specifically for the MVC framework. We are going to walkthrough building a re-usable Header control that can be added to the top of related pages (in this specific case, this Control will be added to all Account pages). If you want to get technical, I suppose this may be a good candidate for the new Nested Master Page support in Visual Studio 2008. But for our purposes, this will do just fine....

Many of us have probably encountered the need for this on various projects. The scenario is simple, we have optional fields that a user may or may not enter values for, and we would like to hide them from display if they were not filled in. The above screenshot could use some cleaning up. Ideally those fields that contain no data should be hidden from the rendered HTML. Our first attempt might look something like below, but hopefully, after 1 or 2 copy pastes any developer will realize this should be handled differently. Who among us has run into maintaining...

Today I began playing with the ADO.NET Entity Framework. This framework looks very promising and I plan on experimenting with it heavily this weekend, so expect some more ADOe articles over the next few weeks. [Update: I discovered more about this subject while reading in-depth the MSDN articles on the ADO.NET Entity Framework. I have updated my conclusions at Entity Framework Comparison Frustration: Explained] Without going into too much detail, ADOe is very similar to LINQ to SQL. It is essentially a more advanced OR/M that is built into the .NET framework and integrated heavily with Visual Studio designer support, complete with...