|
Explain to me what actually is wrong with ini files that app.config improves upon.
Marc
|
|
|
|
|
I'm not really trying to argue the point, but XML allows schemas to enforce structure and validity.
|
|
|
|
|
The use of a standardized parser maybe?
Wrong is evil and must be defeated. - Jeff Ello
(√-sh*t) 2
|
|
|
|
|
They don't fit the Microsoft "if it's too easy we need a more complex system" model.
|
|
|
|
|
what is wrong? nothing! but what is right? being forced to use kernel calls and the limitations of them, let alone some of those functions no longer work properly is even more of a pain. I am not talking about old code, I am referring to brand new projects
the ability to have tightly typed data as an input parameter, allowing customizations to be saved by user is huge. all this by adding a setting. yes you could do the same thing by having layers of ini files, but why? the ability is there with settings and its all managed for us and its easy to work with. Ever try binding an ini to a property grid with 4 lines of code? you can with app.config
|
|
|
|
|
chodi wrote: being forced to use kernel calls and the limitations of them There are no kernel calls (beyond file I/O) in either system. And the use of app.config versus .ini is purely a choice of the application developers. Neither system is better than the other.
|
|
|
|
|
Those are the ones I am referring to. Currently some do not work, and others require the first line to be blank. I was under the impression they are or were to be depreciated by MS with Windows 8 and removed entirely in 10, can anyone confirm?
And for the record, I do not use them unless I am caught, my borrowed and updated routine is much better
|
|
|
|
|
chodi wrote: Those are the ones I am referring to. Currently some do not work
There is of course a very large difference between saying one type is better than the other versus whether the built in api no longer works.
However creating a ini file reader should be an exercise in triviality for an experienced developer. I can do it all of the languages I know with the possible exception of SQL (where it could be done but I just don't know how off hand). And as a matter fact I am rather certain have in fact created my own ini APIs in the past.
|
|
|
|
|
chodi wrote: the ability to have tightly typed data as an input parameter
First most of it isn't "tightly typed" at least not the way I define it. If you are just reading values out of the app.config and doing zero business validation of them then I suspect you are going to wake up to a surprise someday.
Second have you ever created a ill-formed app.config? What happens to your application when you do that?
Might note that although it is possible to make a ill-formed ini it is much, much more difficult to do.
chodi wrote: and its easy to work with
You ever work with a custom part of a app.config? "Easy" is not the term I would use to apply to it.
chodi wrote: <layer>. Ever try binding an ini to a property grid with 4 lines of code? you can with app.config
I don't put user configurations in app.config files or ini files for that matter. So obviously your case would never be relevant to me.
|
|
|
|
|
If you are just reading values out of the app.config and doing zero business validation of them then I suspect you are going to wake up to a surprise someday.
never, validation is needed for everything. but isn't it nice to know your data is an integer when you define it as such and don't need to convert from a string?
Second have you ever created a ill-formed app.config? What happens to your application when you do that?
many many times, more so in 2010. obviously the app will not work, or work properly. backups are a wonderful thing when you remember to use them
You ever work with a custom part of a app.config? "Easy" is not the term I would use to apply to it.
Actually that is how I started with them, honestly not all that bad, a pain yes.
maybe I should also add my question is not fully explained, the powers that be, want to store all data in ini files related to any customization or settings by control, by form, by app, by user, by group instead of one app.config
|
|
|
|
|
chodi wrote: maybe I should also add my question is not fully explained, the powers that be, want to store all data in ini files related to any customization or settings by control, by form, by app, by user, by group instead of one app.config
Not sure what sort of app(s) you are working on but I absolutely would not want to store user customizations in the app.config.
|
|
|
|
|
|
Not to be flippant, but yesterday I was thinking, that region is rapidly becoming the new Bermuda Triangle.
Marc
|
|
|
|
|
I had similar thoughts, as well.
|
|
|
|
|
Marc Clifton wrote: [the] region is rapidly becoming the new Bermuda Malaysia Triangle
FTFY
Once you lose your pride the rest is easy.
I would agree with you but then we both would be wrong.
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
Yep, thinking the same... a little scary for those of us who travel often.
|
|
|
|
|
|
I have my vacation tomorrow and the 2nd of January. Hopefully my code will be left alone
|
|
|
|
|
Meh! holidays...
Stupid holidays...
Well, at least I won't have that problem...
|
|
|
|
|
Well, who needs that guy[^] anyway?
Your time will come, if you let it be right.
|
|
|
|
|
Dirty dank hole I would not wish upon anyone.
But thankfully I am talking of the city and I am suffering from too much food [cooked by moi] and maybe a tad of wine
veni bibi saltavi
|
|
|
|
|
Nagy Vilmos wrote: too much food [cooked by moi] If you're in Paris, then any amount of food cooked by yourself is too much.
Jeeze, what a waste.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I dunno, the Salmon and Asparagus with Hollandaise sauce [our French friend did not know how to make it] was pretty danged good.
veni bibi saltavi
|
|
|
|
|
Staying at the Hilton?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
As if! We're staying with friends in the 18th arrondissement. Yesterday we did the loo, sorry Louvre, and say the miserable bitch a.k.a. Moaning Liz. Today was the much better, in my bloody good opinion, Musee d'Orsey with more impressionists than a Mike Yarwood tribute night. The poor minions, and Mrs Wife, were slightly put out by the fact that most of the paintings I could at least name the artist, without looking, and the period. I enjoyed my day. Now I am catching up on e-mail and wine consumption; not necessarily in that order.
veni bibi saltavi
|
|
|
|