Migrating IE Web Apps to Mozilla 407
PabloHoffman writes "Have you ever wondered what would it take to make your (unfortunately) IE-only web app to work on Firefox?. IBM published an interesting article about migrating Internet Explorer specific web applications to Mozilla-based browers. It covers basic cross-browser development techniques, and some developing strategies for overcoming the differences between both browsers."
Read my last journal entry... (Score:2, Interesting)
Re:Read my last journal entry... (Score:3, Insightful)
Or the other way around... (Score:3, Informative)
Re:Or the other way around... (Score:2)
I'd rather have the web-developers chained in the burn room and have them perform the imaging to show them what they've accomplished by making IE only pages.
Re:Or the other way around... (Score:2)
Nothing like... doing your... job???
Seriously... Why do IT people stonewall all patches and software upgrades? I've seen IT people running versions of apache with security holes because they need to "validate" the next upgrade. In the meantime they are vulnerable to attack.
Good gawd people, give it up! I know upgrading servers and workstations is a pain, but that's your job!!!
Re:Or the other way around... (Score:3, Insightful)
Problem is that patching servers is boring, and they have more interesting things to do like deploy something new and noteworthy.
Re:Or the other way around... (Score:2)
IE7 [edwards.name] (in this context) is NOT an updated version of IE, check out the link.
That's Easy! (Score:5, Insightful)
Meh. Somebody needs to either fix IE, or take it out back and shoot it.
Re:That's Easy! (Score:2)
First stop: W3C standards (Score:4, Funny)
Standards-compliant code works on all modern browsers, and offers much greater accessibility than old, structure-less code.
Re:First stop: W3C standards (Score:3, Funny)
You mean, except IE6... Oh, wait, you said modern browsers. Ok, I see your point now...
Re:First stop: W3C standards (Score:4, Insightful)
Bwahahaha!
You obviously don't do professional web design. Getting the code to validate at W3C is the easy part!
First rule of thumb (Score:5, Informative)
If you do this, then any adjustments needed to make another browser functional should be minimal, and shouldn't affect your application.
ObDuh strategy 101 (Score:2, Insightful)
innerHTML, the big enemy (Score:2, Informative)
innerHTML replacement (Score:3, Informative)
innerHTML is the wrong way to go, especially in XHTML documents. That's because you can potentially insert badly formed XHTML into the document.
There is, however, a way to do it. I figured it out while trying to make my site XHTML valid. I've written about it [vivin.net] on my website. Please note that the site is currently down (problems with my ISP) but it should be back up soon today. Basically it involves parsing the code with the XML parser, and then imp
Re:innerHTML, the big enemy (Score:3, Interesting)
For a recent project some initial tests showed that (especially on IE) generating an HTML string (preferrable building the string into an array and getting the result string with array.join('')), was 100-1000 times (!) faster than modifying the DOM tree. Marking the difference between something that works and something that's unusable.
Firefox tools (Score:5, Interesting)
Re:Firefox tools (Score:2)
The only feature that I find desirable in IE that I can't implement in Firefox/Mozilla is the ability to show modal & non-modal dialogs. These can be very handy for certain types of async behavior, and are much
Re:Firefox tools (Score:2)
But that's different from, and a lot easier than, changing apps that contain lots of IE-specific code so that they'll work on Firefox. If you develop the code for both right from the start, you write the right code once, and don't do things that can't be done in both browsers.
My prefered solution is to Keep It Small and Simple, and just make web interfaces that work pretty much no matter which browser you use with them.
The forgot something... (Score:3, Insightful)
Re:The forgot something... (Score:4, Insightful)
Re:The forgot something... (Score:3, Insightful)
Obviously, when doing work for the company I have to be careful and make things look at least reasonably proper in IE (for which the IE7 javascript library has been a lifesaver). However, for my
Re:The forgot something... (Score:2)
We simply tell our clients (who are all windows users anyway) to use IE.
What do you do when IE is banned company-wide for security reasons (as it has been with several of our clients) or when the government agency you are trying to sell to says, "our security group is all on OS X, we need it to work in both Safari and Firefox?" What market are you selling to that you have not run into one of these two problems and what makes you think that market will stay so technologically backwards?
Re:The forgot something... (Score:4, Insightful)
That's a perfectly acceptable position to take. As long as your competitors take the same position, that is.
Re:The forgot something... (Score:3, Informative)
will you tell them to go away as you do not want their money?
because this is starting to happen. we did it here to a vendor who swore up and down that they cannot switch to support firefox, after our CTO called them and said, "we are going to have to no longer do business with you because of this" they magically lost the snotty attitude and started fixing their applications.
if you can afford to lose your biggest client, the
Re:The forgot something... (Score:3, Interesting)
Only problem is, if you wait until they ask it's going to take you time (and lots of it) to re-design and recode everything. They're likely motivated by something major, eg. possible legal liability if they continue to allow known security problems, and you're then going to get back from them "Well, we can't wait N months for you to convert. Your competitors already support non-IE browsers, we're going to them.".
Re:Here's the deal... (Score:3, Insightful)
Money talks. (Score:3, Insightful)
Not when we have $$$ to spend. I do, and if your site won't let my browser through, you lost a customer.
It's also a good harbinger of how good their customer support is in general, I've found.
I would also point out that the ones with the small "world view" are the ones supporting only one browser.
Re:Here's the deal... (Score:3, Interesting)
LOL!
OK, you owe me a new keyboard, as it's now covered with soda.
I'm remembering the problems I've had when I was working with IntraLearn, and the way it broke when going from IE 5.5 to IE 6.0, and how stock 6.0 worked but the latest Service Pack didn't. I ended up decrypting their damn Cold Fusion code and fixing it myself.
IE breaks a lot of things between versions. I've come to the conclusion that the IE developers at Microsoft just can't keep things working
Or you can use XUL (Score:4, Funny)
Until XulRunner comes out that is, then you can almost detatch it from the web.
Re:Or you can use XUL (Score:2)
Yes, but will it be ready for Longhorn?
Re:Or you can use XUL (Score:2)
Re:Or you can use XUL (Score:4, Interesting)
http://www.mozilla.org/keymaster/gatekeeper/there
Column styling! (Score:2)
No matter how standards-noncompliant this snippet is, at the office we use this a lot. Any ideas?
ARGH slashdot ate my code. Here is it again. (Score:2)
<colgroup>
<col style="padding-left:4em;font:bold 8px Arial,Sans-serif;background-color:#CCF"
<col
</colgroup>
</table>
So, how to implement this in mozilla?
And why would most use IE anyway? (Score:5, Interesting)
Any sane company that doesn't need the IE-specific features would be insane to not build on Mozilla with its excellent debugging tools and then test with standards-compliant browsers like Opera and then test with IE. IMO, build on IE first instead of using Firefox or Mozilla is akin to using Notepad and nAnt for Windows
Re:And why would most use IE anyway? (Score:2)
What I have trouble understanding is building an app fully and solely for IE.
I can understand if one actually needs IE-specific features, but then those should be built in modularly, so that when more browser support that kind of feature, it can be broadened.
We're stuck with some Windows-only items, and it is extremely frustrating because we continue to need to buy Windows licenses to put IE on machine for people to use these apps, when the VAST majority of our users have NO NEED whatsoever to have Window
I'm shocked, shocked (Score:4, Funny)
The part that is visible is http://goat.
Re:I'm shocked, shocked (Score:2)
I saw that too, in the section describing how IE behaves badly with overflowing <div>s. Thank goodness that's the *only* part that's visible. If there were one thing I'd have surgically removed from my memory...
Both browsers (Score:3, Funny)
Country and western?
Re:Both browsers (Score:2)
Re:Both browsers (Score:2)
Country and western?
A but oversensitive, are we?
The article is about porting an IE-based web app to Mozilla-based browsers.
Would you write an article comparing Mac OS X to Windows XP, then spend a paragraph talking about FreeBSD? If so, I hope you've got a good editor...
Converge and respect (Score:2)
It's because everyone is trying to stand their ground and provide something specific to their purpose.
Get Mozilla/Netscape, Opera, Microsoft, etc all in one room and decide on a standard. Everyone has to give in, nobody is right or wrong... and make it stick. -OR- if you can't, include 100% compatibility for the other person's idea.
Th
Already been done (Score:2, Insightful)
It's called the W3C [w3c.org].
Sadly, despite the W3C's efforts, it seems that the Browser Pissing Contest rages on.
Re:Already been done (Score:3, Insightful)
Re:Converge and respect (Score:3, Insightful)
I guess the comment is just trying to point out that there is no BENEFIT to not keeping to the standard and setting it. If they want to do something other than what W3c says, why not suggest it and let everyone adopt it or provide better solutions- as another pointed out, this is what w3c is for.
And you think people will listen? HA! Who cares? For the user, IE displays pages fine, so why would a user care about such technical de
One of the best moves I made (Score:3, Informative)
Debugging JavaScript applications in Mozilla is a dream with error.stack and if necessary the Venkman JS debugger.
Great move for any developer to do as they will not only support more open structures but will also be more knowledgable of standards based programming. The latter helping those developers move around in their career as they would not be locked down to the blue e.
Another great reason to do this is that you could now hack your pages on a Mac without having to depend on the stupidities that are in the OSX MSIE with CSS, DOM and JS.
JsD
[ long live the moz ]
IBM should read their own article (Score:2, Insightful)
Mistakes (Score:5, Informative)
Legacy browsers introduced tooltips into HTML by showing them on links and using the value of the alt attribute as a tooltip's content. The latest W3C HTML specification finally standardized tooltips, and uses the value of the new title attribute rather than the deprecated alt attribute. Mozilla will only show a tooltip for the title tag, per the specification.
This is wrong. Firstly, the alt attribute is not deprecated. In fact, it was optional in HTML 3.2 and required for all <img> elements in HTML 4 and newer.
Also, the title attribute isn't "for" tooltips, and the specification doesn't say that they should be displayed as such. The title attribute is for supplementary information, which can be displayed in the most appropriate manner for the circumstances. It just so happens that in most cases this is best accomplished with a tooltip, but that's merely incidental and not required behaviour.
Finally: it's the title attribute. The <title> tag is a completely different thing and does not work the way they describe.
The Javascript object detection versus browser detection bit was decent enough though. It's just a shame they used invalid code in the examples they gave. People will be copying these examples, so they only cause more invalid code to be written.
As far as using onload is concerned, you need to keep in mind that it only fires once all the parts of a page have been loaded - so, for example, if you have ads and the ad server is a bit slow, your onload element might fire thirty seconds after you think it should. This is a big deal when you are manipulating the page content - imagine typing something into an input control, only to have the onload set the focus to the control - in many browsers this will automatically select the text, which means you'll be typing away and suddenly the second half of what you are typing overwrites the first half.
Where such timing is a problem, you have no choice but to insert <script> elements directly after that part of the document you are manipulating. This won't change until browsers implement more load type events.
Last thing: the author should learn what a tag is and isn't. 98% of the time he says "tag", he means "element", 1% of the time he means "attribute", and 1% of the time he means "element type". I only skimmed the article, but I think I only saw once instance where he actually meant "tag".
Article not just IE to Mozilla but also Opera (Score:2, Interesting)
But, in general, it's a fairly good doc.
I enjoy the part about not sniffing the useragent to make it version specific when that may make it so that you have to upgrade the code when a new version comes out, even though the behaviour hasn't changed - which means less revisions just for incrementalism, and more revisions f
Missing - DevEdge Sidebar (Score:5, Informative)
http://lachy.id.au/dev/mozilla/sidebar/sidebar.xu
DevEdge toolbar is the perfect tool to link to often buried resources on the w3c website. It is ok for JavaScript but that, a good book is always a good idea:
http://www.oreilly.com/catalog/jscript3/ [oreilly.com]
JsD
Not priter friendly (Score:3, Interesting)
Re:Not priter friendly (Score:5, Funny)
Material Possibly a little dated... (Score:3, Informative)
This has not been true for quite a while. These days, the IBM doctype actually triggers "Quirks" mode, rather than "almost standards" mode.
IE only is unprofessional (Score:4, Insightful)
If I have to use IE to use a website, my opinion about the company's website I'm on is usually changed. In this day in age, you have to be proactive, not reactive.
Automigration (Score:3, Interesting)
What I'd really like... (Score:3, Interesting)
For example: You have used a div with stylesheet ID "X" having attribute 'clear: both', and then followed that with another div. This will probably display incorrectly on IE5.x on Macintosh, because it incorrectly uses lexical instead of block scoping for the clear attribute on boxes.
I'd pay money for that. Anyone want a new project?
Stick to the standards (Score:3, Informative)
Right from the start I wrote valid XHTML and CSS as specified by W3C standards and in the end the application worked great in IE, Firefox and Safari.
DA DORON ROSENBERG (Score:3, Funny)
Migrate apps from IE to Mozilla
Da doo ron ron ron, da Doron Rosenberg
Someboy told me that the fight was uphill
Da doo ron ron ron, da Doron Rosenberg
Yes, the fight was uphill
Yes, I'm in love with the 'Zill
And when I write that code
Da doo ron ron ron, da Doron Rosenberg
ActiveX controls are the work of the beast
Da doo ron ron ron, da Doron Rosenberg
Migrate apps from IE to Mozilla
Da doo ron ron ron, da Doron Rosenberg
Yes, the fight was uphill
Yes, I'm in love with the 'Zill
And when I write that code
Da doo ron ron ron, da Doron Rosenberg
Well, I'm Internet Explorer-free and it feels so fine
Da doo ron ron ron, da Doron Rosenberg
BillG's pissed and that's just fine
Da doo ron ron ron, da Doron Rosenberg
Yes, it runs so fine
Yes, I've made it mine
And when I write that code
Da doo ron ron ron, da Doron Rosenberg
Yeah, yeah, yeah
Da doo ron ron ron, da Doron Rosenberg
(repeat & fade)
maybe we should fix it ourselves (Score:3, Interesting)
I think the solution is a different one. Greasemonkey has already been used for the purpose of fixing IE-only problems, and it's relatively easy to write new scripts that patch up problems in IE-based web apps. I think that's the path towards helping making Firefox an even better replacement for IE.
Of course, Greasemonkey itself isn't mature and has problems. The recently discovered security problems are serious but fixable.
More important is that Greasemonkey scripts may be too much trouble to install right now for deployment. Greasemonkey would be greatly enhanced if it could be set up to access script repositories through http and/or WebDAV. That way, intranet administrators could point their users' Firefox browsers at a secure, internal Greasemonkey script repository and add fixes as they encounter them.
What webpage were they trying to view? (Score:3, Funny)
Makes you say "Hmmmmm..."
Re:fuck me if i'm wrong... (Score:2)
Apparently you can only access that story using the new RSS/Atom via REST web services API.
Re:Developers. (Score:5, Insightful)
Not if the requirements document says build this app for IE only and don't worry about interoperability.
Re:Developers. (Score:2, Insightful)
Just a second... (Score:3, Interesting)
I thought they were myths.
Where I work, people's minds change, sometimes on a weekly or even daily basis. Sometimes it's a good idea to plan ahead to be able to keep up with those changes.
Re:Developers. (Score:3, Insightful)
Let's say you are implementing a feature and are faced with two approaches, the IE-only approach and the standards-compliant approach.
Even if you know your audience is IE users with no choice in browsers, it would still be unwise to choose the IE-only approach. You may be relying on some undocumented side-effect of IE that will get "fixed" in their next release/patch.
As an example, I had to support an app that provided a list of items as anchor tags. IE did not require the anchor tag to be closed since
Re:Developers. (Score:4, Funny)
I got an email with the subject, "help!"
Re:Developers. (Score:3, Insightful)
On the other
Re:Developers. (Score:2)
I think the real problem is that IE is far enough away from standards compliance as to be a different platform. Granted, Gecko/Moz isn't perfect either, but it's a hell of a lot closer.
And although the Mozilla platform is still a small part of the pie chart, that's just a global average. Moz spikes dramatically with the younger demographic and the more technically inclined.
Re:Developers. (Score:2)
Becaue times change and so do browser marketshares.
I still remember the times when Netscape was dominating everything. You would look pretty stupid today if your website would run only on Netscape4.
So in the end you waste MUCH MORE money because you have to test and re-test the website every few years.
Re:Developers. (Score:3, Insightful)
The problem arises when you depend on proprietary extensions.
Also, based on your argument, what do you consider an acceptable loss from potential sales revenue? Do you consider excluding 10% of the market to be acceptable? What if that 10% had a large chunk of disposable income and would be more likely to buy your product? Just because the "majority" uses IE doesn't mean it's right
Re:Interesting question (Score:2, Insightful)
Re:How about making server side only apps? (Score:3, Insightful)
Re:How about making server side only apps? (Score:3, Insightful)
These issues lie with the developer at heart, and the QA engineers. One needs to ensure compatibility at the unit-testing stage, having followed standards (as in the IBM article) in the design and coding stages...
Re:How about making server side only apps? (Score:4, Informative)
Re:How about making server side only apps? (Score:5, Informative)
While you should put the bulk of the processing server side. Javascripting is still needed to keep the interface working smoothly and un annoying. Example if you are filling in text boxes you want one to give the total as you enter in data. Vs. Forced screen reloads every data you type or having to hit a calculate button. Also dynmamic control of your controls making some controls enabled or not is very important to help the users use the program without putting in bad data.
Re:How about making server side only apps? (Score:3, Insightful)
Re:How about making server side only apps? (Score:2, Interesting)
Right! Web applications should be thought of as three tiered client server appications. As such, any processing you can do client side, should be done there. It makes no sense to wait until the data has been sent to the server to throw an error for a required field. The client knows whether the field is NULL or not. Why should I make the sever process this.
Re:How about making server side only apps? (Score:5, Interesting)
Javascript has plenty of uses, but relying only on client-side code to validate data is a recipe for disaster.
On the server side, it's usually an extremely simple action to check the validity of the data.
The server MUST have functions to check for data integrity.
You should also enforce the rules in the database.
If you rely on the client to do all this, you'll need to deal with buggy clients, or people who copy your page, create their own cracked version of the page, and use the cracked version to screw with your server.
There's plenty of use for client-side javascript, but you shouldn't use it as an excuse to exclude server-side security.
Re:How about making server side only apps? (Score:3, Insightful)
Javascript has plenty of uses, but relying only on client-side code to validate data is a recipe for disaster.
Yes and no. If that is your only method for validating data, yes it is a recipe for disaster. However it can be very handy to validate data before a form is posted to make it easier to alert the user. Of course the server side componants should also validate what they receive as you state. A good three tier design needs to check validity on all three tiers.
I use a lot of javascript to make th
Re:How about making server side only apps? (Score:4, Insightful)
Client-side validation of a big long ugly form that the user has to submit along with, say, a few MBs of files - is a way of saying "We don't hate you, and don't want you to hate us".
Don't dare trust it though. Don't trust a damned thing - make no assumptions about the correctness of anything the client sends.
Re:How about making server side only apps? (Score:3, Informative)
Furthermore, malicious users can attack your site with handcrafted HTTP requests, so server-side security is of paramount importance. Here are a couple examples:
http://www.snort.org/pub-bin/sigs.cgi?sid=1080 [snort.org]
http://www.securiteam.com/securitynews/6S00O1561M. html [securiteam.com]
Here's the google search:
http://www.google.com/search?hs=hNY&hl=en&lr=&safe =off&clien [google.com]
Not it doesn't (Score:3, Insightful)
And an unlimited amount of dodgyness. It doesn't make the application more robust at all but it might give a better user experience.
Any validation the client does MUST also be performed at the server end because
(1) How do you know the client DID validate it
(2) correctly
for some ill specified and overly cached version o
Re:How about making server side only apps? (Score:3, Funny)
Re:How about making server side only apps? (Score:2)
Re:How about making server side only apps? (Score:3, Informative)
No. There are two reasons why you should never rely on Javascript.
1) It's against disability accessibility regulations because it confuses screen readers (at least that's the case in the UK, I assume it's similar in the US). If you're doing a public sector project, it is forbidden (i.e. against the law) to use Javascript for anything that is visible. You want to do DHTML or "dynamic control of your controls", you have
Web Forms... (Score:2)
Re:Web Forms... (Score:4, Informative)
Re:How about making server side only apps? (Score:2)
Use whatever you need for your job, going for "server-side only webapps" has zero sense.
Re:How about making server side only apps? (Score:3, Funny)
I want a steam driven, coal powered web server which is programmed via punch cards and renders it's output via a ticker tape machine being driven by a hamster wheel.
Re:How about making server side only apps? (Score:3, Interesting)
On the internet, no one knows you're a mainframe...
Re:Tried it with Mozilla about a year ago .... (Score:3, Informative)
This should have worked a year ago, too. Maybe not 2 years ago.
Incorrect (Score:5, Informative)
Don't get me wrong though, ASP.NET generated pages do tend to work better IE as there are a number of added features that it can take advantage of (scripting, authentication, etc), however ASP.NET is designed to generate pages that are compatible with any modern browser, Firefox included. If you had issues getting your pages to work under browsers other than IE than you were running into issues created by the builder of the web page/application, not ASP.NET.
The only time you really require
Re:ASP.NET (Score:5, Informative)
Incorrect. It does not use anything from the
Re:ASP.NET and client side .Net (Score:3)
You guess wrong (Score:4, Insightful)
All of the native framework web controls have two distinct rendering modes. One is for "uplevel" browsers which includes any javascript/DHTML/etc. goodness that the latest browsers support. The other is for "downlevel" browsers and basically renders everything in something like HTML 3.2 compatibility. The server runtime detects which mode to use based on a section of the machine.config called browserCaps (essentially the
Updated versions of the browserCaps info can be found here:
http://www.codeproject.com/aspnet/browsercaps.asp [codeproject.com]
It should be noted you can choose to either replace the data in your machine.config to make it a system-wide update, or just add the same data to your app's web.config file.
On a related note, you can find an updated version of the original browscap.ini here:
http://www.garykeith.com/browsers/downloads.asp [garykeith.com]
Re:.NET becoming deprecated (Score:3, Insightful)
Insightul??? (Score:3, Insightful)
This brings us ASP.Net 2.0, which is so much of an improvement over the old ASP.Net, it's just amazing. Honestly I didn't care much for ASP.Net until I tried v2.0. It amazed me FAR more than everything else I've seen (like RoR, Zope, Plone, etc). Its good enough that
Re:Use Standards (Score:3, Insightful)
If web developers stuck to W3C standards than this wouldn't even be an issue.
And browser developers. If browser developers stuck to W3C standards, web developers wouldn't even have a choice.