Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Monday, February 1, 2016

Coding for IE vs Coding for W3C Standards

Coding for IE vs Coding for W3C Standards


Another chapter from the "arguments between myself and the other senior developer" series :P

My position is that when doing web development, browser code should be written first and foremost to adhere to the W3C web standards, even though Internet Exploder has the greater market share (anywhere between 51% and 79% depending on who is doing the tracking). My reasoning is:

  • The standards are locked in and all browser developers are moving towards at a minimum, 100% bug free support for all the set standards. Therefore code should be written and tested around Firefox/Chrome/Safari, which are much closer to proper standards support than IE8, then conditional tags should be used in IE to work around its bugs. This is particularly the case seeing as you can use conditional tags to work around IE bugs, but if you try to code in reverse, it's much harder to write hacks to force Firefox/Safari/etc to display the coded-broken HTML/CSS correctly.

  • You're future-proofing your web applications if you design for standards seeing as all the browsers are aiming at the same place, standards-wise, which means you won't be among the crowd that then has to repair their application every time a new browser version comes out that is closer to web standards, thus making some of your initial hacks now break the layout.

  • Coding something broken to support the larger market share then "unbreaking" it for the smaller market share, if you have time, seems like a careless way of approaching a job and suggests that you think that 20% market share is insignificant, which I think is very far from the truth.

My co-developer argues:

  • The different browser companies like to go off on their own tangents and don't really care about the standards anyway, so trying to code for standards is a waste of time.

  • Coding to support a minority ~20% market share is not worth the effort as long as the page roughly displays in those browsers in a way that is still usable.

  • A browser is a browser is a browser. It's just a viewport for rendering text and I shouldn't be worrying so much about things looking exactly right.

  • It's a pain to have to develop in Firefox when he prefers IE8 anyway.

I am the one in charge and of course I can say "this is the way it goes", but I hate just being a nazi and saying "my way or the highway"; I think it is better to have the others understand why we're doing something a certain way so that we're in agreement as we proceed and therefore the conventions we're following get stuck to because the reason behind them is appreciated rather than begrudgingly followed.

Can I get some input into this argument?

Answer by mgroves for Coding for IE vs Coding for W3C Standards


Develop to W3C standards, and make it look good in IE. They are not mutually exclusive.

Answer by Williham Totland for Coding for IE vs Coding for W3C Standards


Develop to W3C standards, and make it look good in IE. They are not mutually exclusive.

Sometimes they are. When they are, developing to W3C standards is usually the sane choice. A bigger problem, of course, is developing for multiple versions of IE; setting a hard lower limit at 7 is probably a good idea, but that's up to the editor in question.

By building fundamentally broken but selectively unbroken designs you are doing nothing but setting yourself up to fail.

Answer by Cerebrus for Coding for IE vs Coding for W3C Standards


I always instruct my team to design with Firefox (read 'W3C standards') in mind and only later fill in the quirky gaps where IE is concerned. I couldn't agree with your viewpoint more because that makes so much sense.

MS has been purportedly trying to make IE more compliant since forever, but they are still a long shot... whereas other browsers such as Firefox and Chrome have the benefit of learning from MS's mistakes. Since a significant portion of web users still use IE 6, you're always going to have to add special conditional checks to cater to those "missing links".

I do not see how it is a pain to develop for Firefox, given the awesome addins such as FireBug and Web Developer.

Answer by Will for Coding for IE vs Coding for W3C Standards


I don't hold any love for the W3C, as the "standards" that have emerged from there are pretty much awful and the reason why everybody renders everything different in one way or another.

IE supports conditional CSS statements, which allows you to tweak out IE CSS quirks that works in most browsers.

So I think the best thing to do is to write HTML that looks good and works as expected (standards schmandards), and when you're faced with having to do something ugly to get it working in IE then use conditional CSS.


Clarification on my cynical W3C opinion: Big. Ball. Of. Mud.

Answer by uniquesnowflake8 for Coding for IE vs Coding for W3C Standards


I'm not sure which version of IE you're really arguing over, but this digg blog post illustrates that over half of IE6 users are not using IE6 by choice.

Having a religious argument over browsers isn't going to change the fact that many of your users may not have any control over how they view your site. So it comes down to a business decision, and the cost vs. benefit of catering to those who might be a bit behind the curve.

Answer by cdm9002 for Coding for IE vs Coding for W3C Standards


In reality a business must satisfy its users. Ideology isn't enough. Develop to standards but then make it work in IE. Comment code and explain where hacks are introduced. If you're talking about IE8, it isn't so bad. If you need to support IE7 or even 6, then you will have more work.

Answer by Welbog for Coding for IE vs Coding for W3C Standards


Know your audience: Do they care whether your site is standards compliant? Probably not, unless you're writing a site for web developer zealots. It's more likely they won't care or won't even know what W3C is.

Does your audience have a higher tendency to pick a specific browser? Keep in mind that not all sites get the same spread of browsers. Tech sites gets less IE hits than general sites.

Be practical: Most sites get most of their hits from IE. Specifically, IE 6 and 7. It is ignoring reality to ignore IE's quirks. You will get many users complaining about how your site doesn't work if you don't spend the time to make it work in IE 6 and 7. IE 6 is still a big browser, used by most Microsoft-centric businesses.

Be realistic: Standards-compliant HTML isn't really practical, other than to appeal to zealots. Ideally, all browsers implement the standard. But they don't. It's unrealistic to implement a standard no one implements completely.

The bottom line is implement a site that works in all browsers IE6 and up. If you have to fail gracefully to older browsers, do it. But do not ignore them. They exist and users will not use sites that don't work. Often they are mandated by their businesses to not use different browsers, so suggesting they upgrade is not an option.

Answer by jcollum for Coding for IE vs Coding for W3C Standards


Code to the browser that has some market share and most closely adheres to the ACID test. Work around for other browsers and decide which browsers you'll not worry about.

For me, at this time, that means:

Code to firefox, work around for IE, make sure it works the same way in Chrome and Safari and ignore the rest.

Answer by Powerlord for Coding for IE vs Coding for W3C Standards


His argument suffers from one major flaw: Which version of IE are you targeting?

A site may look great in IE6 and suck terribly in IE7 and 8. Or look great in IE6 and 7, but suck terribly in IE8's default (more standards-compliant) rendering mode.

IE6 support is falling; IE7 usage surpassed IE6 usage a while back, and IE8 is slowly gaining traction.

On the web, designing for an 8-year old browser is a mistake. Design for newer browsers first, then add in what you need for older browsers.

Answer by djna for Coding for IE vs Coding for W3C Standards


There are some interesting assertions in the arguments above. Vendors don't care about standards. Future proofing applications by adhering to standards. Non-IE represents ~20% of market share. If there were to be some empirical evidence for or against these it might help.

Most important in my eyes, you have a claim that it's "you can use conditional tags to work around IE bugs, but if you try to code in reverse, it's much harder to write hacks to force Firefox/Safari/etc to display the coded-broken HTML/CSS correctly." This claim of a lack of symmetry is non-intuitive to my eyes, but if true is quite a strong argument.

Personally, if someone really were saying "roughly right is ok" and "don't worry about ... exactly" then I would have trouble taking those arguments seriously.

Why is developing in/for Firefox a pain?

Answer by Paul for Coding for IE vs Coding for W3C Standards


I love standards as much as the next guy, but honestly this has become something of a religious war/whipping boy.

The major problem I've seen is this patern:

  • Browser Company 'X' makes browsers fault-tolerant and attempts to display pages that are badly formed. They also deviates from standards along the way either by accident or in an attempt to create their own new standard.
  • Inexperienced Web Developer uses browser 'X' to test their design as they go along, allowing faults in their markup to go undetected.
  • Browser Company 'X' is now trapped in the position of either breaking existing sites or maintaining known defects in new releases of their browser.

Don't be part of this cycle.


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.