Noah and I continue our screencast series by sharing our approach to managing external dependencies referenced within a .NET solution. This is another introductory episode but you might find a hidden gem in the short 4-minute clip. ELMAH (Error Logging Modules and Handlers) is the external dependencies we are focusing on in the presentation. If [...]
In this screencast, Noah and I demonstrate preferred practices around .NET solution setup, naming conventions and version control. I consider this an introductory video. If you’ve been around the block, you might want to skip this episode but if you’re a .NET/Visual Studio newbie, it may be worth a look. YouTube – Visual Studio [...]
As javascript libraries, particularly jQuery, increase in popularity so do web techniques using AJAX and JSON. Have you ever seen this code? It is front and back of an ASPX file with the single responsibility to return JSON data per an AJAX request. GetDataPage.aspx <%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”GetDataPage.aspx.cs” Inherits=”GetDataPage” %> <%– This minimal code [...]
Many of my C# methods include what is referred to as a guard clause. It isn’t a complicated concept. Simply the first few statements of a routine validates passed-in parameters and/or state of the object and immediately returns an error or gracefully exits to the function is constraints aren’t met. If I’m not mistaken, this [...]
Continue reading about Guarding Against Multiple Empty Strings
I’ve created a number of user and server controls for my C# web applications. Recently, however, I’ve found myself working in Silverlight and, if you are of the same opinion as me, you believe Silverlight was missing a few core controls. Specifically, Silverlight was missing a TextBox with password masking and a CombBox until Monday’s [...]
As I mentioned last week, I am new to TDD. For better or worse, all of my tests (and spikes) have been generated via Visual Studio Test Projects. Working with VS Test Projects hasn’t been all that bad although I noticed a couple of annoyances right away. Is anyone else bothered by the fact that, [...]
I’m not sure I can come up with a good argument to ever use Safe Casting. Per my earlier post, I’m not able to convert the result of the following Predicate, List<MachineProduct>, to a MachineProductCollection even though MachineProductCollection inherits from List<MachineProduct>. // Code complies and the invalid Cast results in // machineProducts being set to [...]
It is easy to see the subtle difference between the Product Tables below. The table to the left adds the table name as a prefix to nearly all of the column names. The table on the right represents very simple column names with no redundancy. Early in my career, I preferred the implementation to the [...]