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