ppk on Opera in his JavaScript book


That's an example how some books treats Opera; in particular case ppk on JavaScript:

Opera
Opera is an independent browser with a rather small market share (around 0.5%). It managed to survive—and even thrive—through the Browser Wars, without a large and prosperous corporation behind it. This achievement is not to be despised.
When it comes to JavaScript, Opera has always been slightly behind the other browsers. During the Browser Wars, it didn’t implement DHTML (i.e., the Microsoft and Netscape proprietary DOMs), which in hindsight was an excellent decision.
Although it has largely caught up with the other browsers, it remains the most difficult browser to develop scripts for. It has share of bugs, and its market share is so tiny that the temptation to just forget about it when you encounter a bug is difficult to resist.

Day-to-day development
When I create a script, I constantly test every line I write in Explorer Windows and Mozilla. Explorer contains quite a few peculiarities that should be addressed immediately, while Mozilla is an excellent representative of W3C DOM-compliant browsers.
When I finish a script module, I start Safari and Opera (and occasionally Explorer Mac, iCab, and Konqueror) to check for problems. If I find any, I try to solve them, but the amount of time and trouble I take depends on the browser in question.
Essentially I’m willing to take a lot of time for Safari, but not for any of the other browsers. Opera bugs are either easy or impossible to solve, Explorer Mac is too old, and iCab and Konqueror have too little market share. Agree or disagree with my exact browser lineup, but I advise you to make decisions or risk total insanity.
Do not under any circumstance write a script for one browser first and add support for the other browser “later on”. This is the fastest way to hell. It’s far better to solve nasty incompatibilities at the start of your project than at the end.

Except that this is amazing JavaScript book.
* Highlighting is mine.

4 Replies to “ppk on Opera in his JavaScript book”

  1. Sounds like an interesting book. I found the following quote to be very interesting and true..Do not under any circumstance write a script for one browser first and add support for the other browser “later on”. This is the fastest way to hell. It’s far better to solve nasty incompatibilities at the start of your project than at the end.You should blog more often, very interesting entries!

  2. Whoa :-/He could be a bit more specific.. Opera’s core ECMAScript engine has been pretty stable with few outright bugs in the support for ES-262. The DOM support has had a few gotcha incompatibilities, but in several cases the reason was us following the spec and other browsers being buggy. All in all, the descriptions of Opera come across as both vague and unfair. But that’s sort of the price we pay for not having more developer-friendly tools available..

  3. I do a lot of Opera-specific JS coding and have similarly done a good amount of cross-browser JS, and honestly, I don’t know how he’s coming to these conclusions. In my experience, by-the-book JS is extremely solid in Opera and it actually makes an excellent reference tool when coding cross-browser since the vast majority of the time, code that works in Opera will port to IE and Firefox no problem.In all honesty, from what I’ve seen, 90% of JS bugs in Opera etc. are the result of using poorly tested hacks that seem to work somehow when you write them, but fail to work properly later on when you actually have to test in a cross-browser fashion. If you write solid code that doesn’t rely on exploiting the bizarre behavior of certain engines or use non-standard extensions, you rarely run into this problem.That’s not to say there are never problems, there are on occasion. But to paint Opera’s as somehow that much worse as to be “impossible” is absurd. Go download a big JS lib like jQuery and search the code for browser-specific comments. You’ll find workarounds for Mozilla, Opera and Safari in just about equal numbers (maybe a few less for Mozilla since that tends to be the reference), and a whole bunch more for IE (whose bugs also tend to be far more severe and bizarre in my experience, aside from just being more plentiful).

Leave a Reply

Your email address will not be published. Required fields are marked *