The Executable Configuration (Anti Pattern?)
You probably know that I am sick of XML configuration, and I devoted some time to allow myself use a real programming langauge (Boo) for my configuration. (See my posts about Binsor for the details). This tend to reduce configuration cruft by an order of magnitude.
That said, having a programming language at my disposable for configuration opens up some interesting possibliites. For one thing, the line that divide the application setup responsability is becoming blur. What do I mean by that?
Well, I got an application that for a particular client, need to map some drives before it can start running. If I were using XML configuration I would probably have some optional configuration entries, code that reads them and then execute it. Using Binsor, I can just make the call to map the drives from the configuration file.
Here is a small example:
import
MyApp.Utils from MyAppDriveMapper
.MapDrive("""Domain\User""", "SecretPassword", """\\network\share""", "W:")#continue with normal Binsor configuration
Now this is either a powerful technique or a huge anti pattern :-).
For this case, I think that it is a good solution, but I wonder how useful this is going to be in a more general sense.
Comments
Comment preview