Geeky beauty contest
-
Some webpage said:
And you have to admit, that ‘web.config’ file looks way prettier than that messy ‘.htaccess’ file you used to have with Apache!
Y'know, I'm not so sure about this: I've used both, and find both equally as bad as each other. It's a bit like choosing which of these two you want to sleep with:
But can I be convinced otherwise? Out of curiosity, I'm
starting a flamewarasking the assembled WTDWTF masses which they prefer:.htaccess
, orweb.config
?Edit: Yes, I've already turned encryption on. I'm just seeing if I can squeeze more out of it now.
-
@RaceProUK said in Geeky beauty contest:
.htaccess, or web.config
Which of those is a single checkbox enabled by default in a properly designed GUI?
But if I really have to pick, I generally prefer XML to ad-hoc syntax, because 1 bad standard is better than no standard at all. Although I'd prefer something more compact and actually designed for humans.
-
@anonymous234 said in Geeky beauty contest:
Which of those is a single checkbox enabled by default in a properly designed GUI?
That... would be very non-trivial, at least for web.config - I don't have much of an experience with htaccess files.
Given that web.config aggregates settings for both IIS, your application and various libraries said application uses, do you propose that all library writers are forced to implement a GUI module for their settings, or do you just use a generic property editor (which is not much better than editing the file manually, and given the hierarchicity it might well be worse)?
-
@Maciejasjmj said in Geeky beauty contest:
That... would be very non-trivial, at least for web.config - I don't have much of an experience with htaccess files.
I just meant to configure server settings like gzip compression.
-
@anonymous234 said in Geeky beauty contest:
Which of those is a single checkbox enabled by default in a properly designed GUI?
Like how IIS lets you change web.config values in the Configuration Editor?
-
@RaceProUK .htconfig for Apache and web.config for .Net stuff?
Is there any realistic scenario were I would compare these things?
In my experience, I had much more annoying problems with web.configs
-
@fbmac I just wondered which people liked more
and wanted to see if I could start a flamewar.
-
@RaceProUK said in Geeky beauty contest:
I just wondered which people liked more
INB4 Ben talking about a web server he wrote in Go.
-
@asdf
He had an interesting DFWS instance running, but then a grue ate it.
-
@izzion His own fault for leaving it sitting around in a place where it's very dark in here...
-
I've never used
.htaccess
. The entirety of my web development experience has been in .Net, and I'm not particularly trying to expand that
-
Let's run some objective arguments here:
htaccess
Apache specifically recommends you don't use them.
web.config
IIS/.NET specifically requires it to really make sense.
Well, so far it's looking pretty damn bad for .htaccess. But, wait! Of course, what Apache's really saying is you should use httpd.conf instead of .htaccess whenever possible. Alright, so why don't we do that instead?
httpd.conf
Total file size of a default httpd.conf file: ~25Kb This is because of tons of lines of boilerplate nonsense that you'd typically have in any Apache instance, AFAIK. Granted, another good chunk is devoted to an encyclopedia of comments to describe each one-line setting underneath it.
web.config
Total file size of a default web.config file: ~1Kb
httpd.conf
Goes from line-ending delineated format to a pseudo XML format that sort of resembles XML but really isn't true XML.
web.config
Uses strict XML, complete with a formal schema.
httpd.conf
Horrendous format makes a GUI editor nearly impossible.
web.config
More structured format allows GUI editing and automating settings easily.
httpd.conf
Typically found in the Apache directory, completely separated from the code, making placing this file in source control a bit troublesome. Of course, .htaccess can be in the root directory of the project, but, again, Apache doesn't recommend this.
web.config
Always found in the project directory, ready for source control.
Yeah, I think I can say with some confidence that web.config pwns httpd.conf/.htaccess pretty well. It's one of the few times I actually have considered XML format to be a good thing for a change. web.config certainly has its problems, (<system.web> vs <system.webserver> gets me all the time) but it's still far easier to deal with than httpd.conf or .htaccess.
-
@The_Quiet_One said in Geeky beauty contest:
htaccess
Apache specifically recommends you don't use them.toby faire, that's a performance recommendation for when you have access to your servers httpd.conf file. You often don't have such access in a shared hosting environment, and there can be good arguments for not putting directives in httpd.conf in favor of .htaccess if you host many sites on one server and use source control to manage deployments. .htaccess files can be updated via the deploy process while only risking the one site failing to function on misconfiguration, where using httpd.conf requires (or required) a server restart and risks the all your sites falling over on configuration error.
-
@The_Quiet_One said in Geeky beauty contest:
Typically found in the Apache directory, completely separated from the code, making placing this file in source control a bit troublesome. Of course, .htaccess can be in the root directory of the project, but, again, Apache doesn't recommend this.
Or you can put your project-specific stuff in a separate file which you install in
/etc/httpd/conf.d/
or equivalent, where it's autoloaded.
-
@The_Quiet_One that makes sense until you have strange problems with Crystal reports and have to manually change the minimum version required for assemblies in web.config because something very weird is happening.
I don't remember it well, but every time I had to mess with web.config it was some weird bug and I was up for a bad time