Ken Brubaker

The ClavèCoder

<September 2008>
SuMoTuWeThFrSa
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011


Navigation

Subscriptions

News

Kenneth Brubaker
Senior Application Architect

Locations of visitors to this page

Post Categories



KENGHLISH: Saying for implicit rules

Assume everything is implicit unless you are told otherwise.

I generally consider it bad practice to have encoded fields in tables and implicit rules in objects. You should generally make your rules explicit by creating calculated columns, views, & etc for databases and creating properties for classes that encode the rules.

 

Example:

public bool IsBest { get { return rating >= 3; } }

posted on Tuesday, April 22, 2008 9:43 AM by kenbrubaker





Powered by Dot Net Junkies, by Telligent Systems