The Artima Developer Community
Sponsored Link

PHP Buzz Forum
Microsoft, always delivers... crap...

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Alan Knowles

Posts: 390
Nickname: alank
Registered: Sep, 2004

Alan Knowles is Freelance Developer, works on PHP extensions and PEAR.
Microsoft, always delivers... crap... Posted: Nov 9, 2005 5:55 PM
Reply to this message Reply

This post originated from an RSS feed registered with PHP Buzz by Alan Knowles.
Original Post: Microsoft, always delivers... crap...
Feed Title: Smoking toooo much PHP
Feed URL: http://www.akbkhome.com/blog.php/RSS.xml
Feed Description: More than just a blog :)
Latest PHP Buzz Posts
Latest PHP Buzz Posts by Alan Knowles
Latest Posts From Smoking toooo much PHP

Advertisement
You know it is going to be one of those days when the lift to the office starts going up, even when you pushed the down button in the lobby..

The morning started with a heated discussion about proposing a video conferencing system to one of our clients. I had come down to two options, a polycom plug and play (hopefully) system, or using 2 iMac's with iChat. But one of my collegues suggested that we recommend a Windows box, with MSN or similar. I was addement, I will never recommend windows for anything as complex as that, the implications for support, securing it (as it needed to have a fixed IP), and knowing that the thing would be guarenteed to fail a good proportion of the times the end user wanted to do a conference. While I sounded alot like a anti-microsoft zealot, I've been burnt far to many times in recommending and installing Windows to even consider it as a reliable option. And it get's difficult arguing with someone who actually think's that OS X has viruses ;)

Anyway, that was just the start of the Microsoft crap for the day. Developers, Developers, Developers I hear them cry, well the day their software actually works as expected, I think they might actually attract enthusiastic developers.

The task for the day was to fix some code I had written to export data to excel. I had practically copy and pasted some code from one project to this one, to implement this process. (I think I've blogged about the concept before), basically you render a HTML table with the data you want to export (a preview), then you use a javascript library, to read the table and generate a gnumeric xml file. This get's sent to the server, that then runs ssconvert to output a beautifully formated excel file, (doing all the colour, background, font effects etc.)

Of course, this library had only be tested on Firefox (as most of the projects that it was used with where XUL based). So I had just said to the tester, does it work with IE?.. of course the answer came back .. NO!

Given the fact that the javascript code in the application followed W3C DOM standards, and did not do anything that amazing, I guess I was a little supprised. So out came vmware, and my nice sandboxed Windows 98. In all it took over 4 hours to solve this, and I guess it's time I regard as a waste of my life (like most times I have to use windows ;)

  • First indication of a problem was a little yellow triangle on the browser, pressing on it, told me error at line 0: download()
    This it turned out (from what I remember), was that for some reason, IE did not like a href="javascript:download()" as a link, and only when it was replaced with onclick, did it start working ok.
  • Next up was some message about object does not support that operation on line 134 of xyz.html.
    Well, looking at the HTML file, there was no javascript on that line!, it took me quite a while to realize, that the debugger can not handle included javascript files (and uses the line number from the original file) duh!!!, I had to copy all the javascript from the included files, into the main one just to debug it.
  • That bug turned out to be something as simple as this
    x = this.createXMLHttpRequest();
    if (x != false) {
    Since x was an object, it could not be checked against a boolean (even though this works perfectly on Firefox)
  • After getting those bugs fixed, the next was a unknown method on an object. which was basically
    document.getElementsByTagNameNS('*'',"rows");
    used to grab sections of the Gnumeric template file, much to my amazement (well less so by now), I realized that IE doesnt actually implement DOM!!! (or DOM3 AFAIK) properly...
  • At this point I gave up thinking that IE would ever work (or was worth supporting) for my nice exporter. So I started thinking just doing a HTML table to CSV importer, using pretty much the same concept. I however ended up spending a good half hour puzzling over a "Can not download" message, as soon as I added the Content-type header to the output. The kludge workaround for which is actually mentioned on the PHP manual comments.
All in all not one of my better days....

Read: Microsoft, always delivers... crap...

Topic: Nerd Score Previous Topic   Next Topic Topic: PHP and HTTP making friends

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use