Blog Home  Home Feed your aggregator (RSS 2.0)  
A Random Walk Around .Net - Persistence
 
 Tuesday, April 01, 2008

            A well written program must implore the services of persistence.  Many would argue not in all cases; I disagree.  I personally cannot think of a program that would not benefit from a configuration file instead of hard coding settings.  Yes, the configuration file is a means of persisting load settings.  Moreover, event logs are also crucial to find user aborted exceptions.

            Though most would think database, xml file or file system, my view of persistence is anything that allows continuity between sessions of you application.  Before I delve deeply into what SQL Express can provide to this application [my next blog entry], I would like explore the two aforementioned concepts.

            First, one should use an external configuration source to abstract ones code.  The avoidance of recompilation and deployment provides for agility and stability.  We will see later how I see Castle Windsor helping in this process. 

Second, never swallow exceptions.  By swallowing exceptions, I mean try catch without alerting the user.  Moreover, write the exception to the event log; lost exceptions don’t help the debugging process.  In general one should throw an exception early and cleanly allow for appropriate remedies.  This is concept best taught by example.

Tuesday, April 01, 2008 9:51:29 PM (Central Standard Time, UTC-06:00)  #    Comments [0]    | 
Copyright © 2010 Yezdaan Baber. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: