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."
How about making server side only apps? (Score:1, Informative)
Or the other way around... (Score:3, Informative)
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.
innerHTML, the big enemy (Score:2, Informative)
Tried it with Mozilla about a year ago .... (Score:1, Informative)
Anyone try making a web page with right justified textboxes and have it run OK on Firefox?
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:Tried it with Mozilla about a year ago .... (Score:3, Informative)
This should have worked a year ago, too. Maybe not 2 years ago.
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 ]
Re:ASP.NET (Score:1, Informative)
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
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".
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
Re:ASP.NET (Score:5, Informative)
Incorrect. It does not use anything from the
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.
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 importing the node into the DOM. My initial solution involved walking the parsed tree (which was a little more involved and longer/complicated). However, you can use the importNode function instead and just import the entire parsed DOM tree into the main document's tree. It works pretty well and ensures that the inserted code is valid XHTML.
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, then by all means stay with what you have.
Re:ARGH slashdot ate my code. Here is it again. (Score:2, Informative)
tr td:first-child
tr td:first-child + td + td
Re:Web Forms... (Score:4, Informative)
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 to use CSS.
2) It can be disabled. So it's pointless doing something like validation on the client side when you're going to have to do it on the server side anyway to keep the application robust.
Bob
IE (Score:2, Informative)
You can half-ass it in IE with the traditional model (element.onclick = function;), but, y'know, it's half-assed.
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.
Re:Not priter friendly (Score:2, Informative)
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
Here's the google search:
http://www.google.com/search?hs=hNY&hl=en&lr=&saf
Re:Windows authentication (Score:1, Informative)
http://www.mozilla.org/projects/netlib/integrated