Blog Stats
  • Posts - 27
  • Articles - 0
  • Comments - 3
  • Trackbacks - 1204

 

January 2009 Entries

Storing Enumerations in the Database

Given an enumeration (any non-bitmasked enumeration, really), how should members of this type be persisted in the database? public enum ClockStyle {    Digital,    Analog } ClockStyle.Digital will have an implicit numeric value of zero, ClockStyle.Analog will take the value of one.  Should the database column be a string or numeric type? The bit of research I’ve done on this finds most people favoring the string representation for the following (very good) reasons: It’s more readable in the database....

Great Introduction to SOLID Principles

A while back I started noticing the word “SOLID” showing up on various good tech blogs.  SOLID is an acronym describing five good software development principles. When Scott Hanselman interviewed “Uncle Bob” with his latest podcast, I was excited to see it.  Listening to it was no disappointment – it’s a fantastic and practical introduction to these valuable principles. If you don’t have time to listen to the whole thing, I highly recommend listening to at least the first 14 minutes, where he covers the S: Single Responsibility Principle.  It’s stuff that could change the rest...

 

 

Copyright © Jason Pettys