|
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.
|
|
|
|
|
|
I hate config files of any description
|
|
|
|
|
You think the default web app web.config files are bad in their vanilla form, just wait until you have to deploy into a secure environment. The Web.config is just one link in an inheritance chain that flows down from %WinDir%\System32\intetsrv\config\Applicationhost.config through each application directory to your web site's directory.
You haven't lived until you've had to walk every config file in this chain to find the one that has a duplicate ISAPIRestriction or Authentication tag definition (this breaks the entire IIS worker process).
|
|
|
|
|
|
David O'Neil wrote: How about we lobotomize Edge, instead?
I thought it came pre-lobotomized?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|