Ben Griswold on December 16th, 2008

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 [...]

Continue reading about HTTPHandler with JSON Data

Ben Griswold on November 12th, 2008

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

Ben Griswold on October 14th, 2008

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 [...]

Continue reading about I Am Not A Control Developer

Ben Griswold on August 4th, 2008

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, by [...]

Continue reading about VS2008 Test Project Tips

Ben Griswold on June 10th, 2008

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 null instead [...]

Continue reading about Safe Cast for No Good Reason

Ben Griswold on June 10th, 2008

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 [...]

Continue reading about SQL Tip: Uniquely Name Table Columns

Ben Griswold on June 10th, 2008

I vividly recall creating my Windows Live account and wondering how many folks are able to guess the 8 character CAPTCHA on the first attempt. I swear the CAPTCHA presented to me looked like random scribbles in a box. I did take screen shots but they seemed to have disappeared just like my patience on [...]

Continue reading about CAPTCHA Roulette

Ben Griswold on June 2nd, 2008

I very recently posted about using SubSonic to generate my DAL and SSMS Tool Pack to generate the complementing stored procedures.  In response to the post, Jon Galloway asked a great question in the comments:
Thanks for the pointer to SSMS Tool Packs. It looks really interesting. One thing I’m having trouble picturing is the overlap [...]

Continue reading about Code Generation with Stored Procedures?