|
When I interned at IBM back in 1985, there was a room full of "Computer Operator"s staffed 24x7, whose primary job was to monitor looking for jobs that didn't run because of an error in the JCL used to submit it and then try to fix the JCL and resubmit. They kept very busy. The wife of one of my mentors there was the manager of that team.
|
|
|
|
|
|
I don't see any reason why a c# developer would hate web.config or app.config as they provide the flexibility to change the configuration level things without rebuilding and redeploying the application. They are quite useful in my opinion.
|
|
|
|
|
Sometimes, code is easier.
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
TheGreatAndPowerfulOz wrote: Sometimes, code is easier.
I see the italics. But are you saying, "forget config files, let's use hard-coded" values?"
|
|
|
|
|
Yes, for simple use cases where the config never or seldomly changes. However, if you need to configure it on-the-fly or at install time, then config files are the way to go.
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Nope! Most definitely not the only one.
Though, I did just get done writing an interpreter that executes fairly simple scripts written in XML.
|
|
|
|
|
Dave Kreskowiak wrote: executes fairly simple scripts written in XML
Oh, a DSL[^]?
|
|
|
|
|
Yep. It's for a wrapper we use in all of our packaged software we deploy. Since we have to support 8 different platforms, it makes packaging and deploying software a bit ... complicated. Script support makes life a whole lot easier.
Using an XML-based solution made parsing and syntax checking a piece of cake and I had to bang out a solution quickly. This also makes it easy for our QA and deployment tools to parse and check too.
|
|
|
|
|
Interesting. Thanks for sharing. Sounds like one of the better uses of XML.
|
|
|
|
|
It's a lot simpler to understand than Powershell, especially for people who don't have a coding background.
|
|
|
|
|
Maybe you could share your little scripting language with an article on CP? Please?
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
I don't know if I can get that written. I've got about a years worth of code to write and now have to do it inside of 4 months.
|
|
|
|
|
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Dave Kreskowiak wrote: executes fairly simple scripts written in XML. Why? Why not use XSLT?
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Because writing the XSD was bad enough!
|
|
|
|
|
Ugh! Forsooth!
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Ok, to clarify.
The web/app config files <i>of themselves</i> are ok. Better than Registry entries
Working with them, however, is a pain.
There's very little intellisense, and finding out <i>what</i> you need to add is difficult.
Yes, I am proposing something better - Visual Studio should have a GUI tool to create these files,
with drop-down menus of choices, check-boxes for true/false options, etc.
|
|
|
|
|
|
I certainly don't mind the idea of them (e.g. place to put connection strings and other straightforward config stuff), but I agree they are mysterious and verbose in other areas.
|
|
|
|
|
|
|
|
Remember, these configuration thingies, including dependency injection and other modern architectures, are for turning your glorious compiled language into BASIC. Not even into Visual BASIC.
|
|
|
|
|