May 2007 Entries
Questioning Subversion Practices

I'm not sure if using the same blog title as David Brock is proper Blog Etiquette but his title captures the topic best.  

I too love Subversion and often questioned the tags folder in a conventional repository layout.

Reference -


David Brock's post -

I understood that the typical repository layout derived from CVS but I didn't realize how CVS vs. Subversion deffered in implementation.

"As a conversion from CVS, this convention makes perfect sense. You see, branches and tags in CVS are different things. But in subversion, they are the same - they are just copies of the trunk into one of those directories. In CVS, these events are temporal... that is, they affect a file at a given point in time. In Subversion, while they still apply to a particular version of a file, branches and tags are spatial... that is, they exist as copies of the trunk, just copied into a specially designated place."

While I like David's recommended layout I prefer the Tree metaphor.  Below is an example layout (notice the 'tags' folder is missing):

/project (your name here)

Just to clarify the intent of some of folders under trunk:

build - scripts and stuff for building your code
database - sql scripts and stuff.  further break this down into views, sprocs, tables, indexes, etc.
docs - project documentation, how to guide, etc
referencedassemblies - file references like entlib, nhibernate, internal helper assemblies, infragistics, etc.
solutions -  solution files and projects
tools - nunit, fxcop, etc.

Possibly the tools folder should go under the /project folder.

In the end, I'm not sure if it matters which approach you follow as long it is purposeful.

posted @ Monday, May 28, 2007 4:22 PM | Feedback (118)
Performance counter "add" button disabled

Several months ago I posted about a NumberOfReclaimedConnections performance counter.

Today while troubleshooting another problem related to connection pooling and the datareader, I noticed that the performance monitor "add" button for the SQL Data Provider counter was disabled.

You must add the following to your app/web config file to enable them:

    <add name="ConnectionPoolPerformanceCounterDetail"

Activating Off By Default Counters:

Angel Saenz-Badillos on ADO.Net Peformance Counters:

posted @ Saturday, May 26, 2007 8:20 PM | Feedback (75)
Business Rules and Data validation

We're just beginning to implement iLog Rules for .Net at work.  A common debate is whether we should use a rules engine for validating data.  Certainly, one can use a rules engine for validating data but it seems like a misuse of the technology.

In my mind, a business rule is a policy that governs a business action.  The data should already be valid before invoking the business rule/policy.  Of course, the business rule/policy must handle invalid data, ergo the ambiguity between data validation and business policy.

For example, let's say you have a business policy that determines an action based on a range of values.  The total range is between 0 and 100.

0 to 50 approved - 51 to 100 denied. 

What if the data is less than 0 or greater than 100?  Do you place a UI/Data validation rule allowing only 0 to 100? Or, do you throw an exception if no decision is returned from the rule engine?  I believe in this case, you validate that the data is numeric, let the business policy determine the action or throw an exception.  Taking this approach allows you to be flexible to changing business policy; separate rules from the code and places the responsibility on the business to determine the correct action.

posted @ Saturday, May 12, 2007 2:03 AM | Feedback (69)