Developing a Standards-Compliant Web App? 85
dogas queries: "I work for quite a large company that is creating quite a large web-based enterprise-level application. We've been in development for a long while, and currently our app is only native to IE 5.5. At this point it would take a *lot* of effort to bring our app up to to be Standards-compliant. Now management wants our app to be more flexible, such that if the customer wants to customize the look-and-feel, it won't be a major undertaking that will kill the structure. Naturally, we're switching to a CSS-based layout, ripping out the IE proprietary Javascript in favor of ECMAScript, and bringing the whole app to XHTML 1.0 Transitional compliance while we're at it. Since we started coding the front end at about the time of the browser wars, we didn't have the luxury of planning to use the W3 standards (especially since they were not complete, and browsers weren't honoring them anyways). I'm wondering what type of priority creating a standards-compliant web app is in other companies, and if that priority is being raised given the benefits of creating pages that separate structure from style from behavior."
Standards Compliance (Score:5, Insightful)
Re:Standards Compliance (Score:4, Insightful)
Standards compliance clearly does not mean cross-browser or cross-platform compatibility: almost all standards define certain behaviors as "implementation dependent" or "undefined", and they often leave many issues completely unmentioned (and hence undefined).
In order to write something that works cross-platform, it doesn't just have to be standards-compliant, it also has to avoid all implementation dependent or undefined effects in the standard. Depending on the standard, that can be easier (Scheme), moderately difficult (Java), or very hard (C, C++).
Re:Standards Compliance (Score:2, Interesting)
Re:Standards Compliance (Score:2)
This works for me!
Re:Don't code for IE, but for mozilla/netscape (Score:4, Insightful)
I will say though its about time people gave up on NS4.7 it is the browser from hell!
Re:Don't code for IE, but for mozilla/netscape (Score:3, Insightful)
(emphasis mine - see bottom)
I defintiely agree with the parent here. Try to make sure it's viewable on as many browser/platform combinations as possible. Yes, maybe the newer ones will still look prettier, but as long as older browsers at least disp
Re:Don't code for IE, but for mozilla/netscape (Score:2)
You can avoid that by using "@import" when specifying your external style sheet files instead of "<link rel..."
The @import method is not supported by Netscape 4.x and thus will throw an unstyled page (better than nothing, and can be made accesible to boot if you do your homework).
Re:Don't code for IE, but for mozilla/netscape (Score:1)
As a consultant that works with many clients, I'm truly surprised at how many companies still use NS 4.x as there minimum browser standard (even for intranet apps). I can show them all sorts of statistics that NS 4.x is used by less then 2 % of internet users ( Broswer stats/trends [upsdell.com]) and even less on there sites, it still doesn't matter. It takes me more time to test/code around the shortcomings of NS 4.x then to test/co
Re:Don't code for IE, but for mozilla/netscape (Score:3, Interesting)
So I guess it's only a matter of time before IE-junkies realizes that it might be smart to check out their shit in browsers that doesn't make up their own standard as they go along
Audience anyone? (Score:4, Funny)
Don't let the passing fad of the "English" language make a choice for you. Target the american market with latin pages!
Re:Don't code for IE, but for mozilla/netscape (Score:2)
Unfortunately Moz/FB have problems with some CSS.
Re:Don't code for IE, but for mozilla/netscape (Score:2)
body { background: #000000;
This does:
<body style="background: #000000">
This is non-compliant behaviour of the strangest order.
Re:Don't code for IE, but for mozilla/netscape (Score:1)
body { background: #000000; ... }
Hmmm, just tried it in Firebird 0.7 and Moz 1.3; works fine in both. *shrug*
Same story here ... (Score:2)
A web-based application, developped in the second half of 1990ies, containing cludges for Netscape 4 and other workarounds. Some parts of the code - unfortunately the most important ones - were coded in a few night sessions, and need a major rewrite since at least two years.
Our new plan: A facelift that makes the application look a little better, and no more development except for a little customizing. It has to stay like this for at least a year. During that time, we will develop a completely rewritten ve
Refactoring is usually better... (Score:2)
Obviously I don't know the details of your situation, but in general it's a bad idea to start from scratch again. It almost always looks like the best solution to the developers (myself included), because we always like working on new projects, new ideas, etc., but when you really sort out the risks and costs it's often hard to make the case.
First of all, time estimate: version 2 -- especially since you're adding new features -- will proba
separating content and presentation (Score:5, Informative)
But even if you manage to do that, it's not clear that it's a good thing: regular folks don't feel all that comfortable authoring abstract markup. They want to write their web pages in something WYSIWYG and they will (trust me) manage to encode lots of assumptions about how the content is ultimately presented.
So, you have to pick some kind of middle ground: not too much user customization but some (maybe light/heavy). Not too much server side separation of content and presentation, but some. Not too much JavaScript and CSS, but a little may help you out quite a bit. Etc.
Re:separating content and presentation (Score:1)
Re:separating content and presentation (Score:5, Insightful)
I'd have to disagree with that. Most of the standards movement for web design focuses on "semantic markup". Only headings, paragraphs, and the like should be included here. No fonts, colors, etc. This is your content. Yes it has tags, but when using XHTML 1.0 Strict it is also XML, meaning that an XSLT could be used to generate that content from some XML source on the server if necessary. Using CSS to do placement & styling of elements is very feasible for 95+% of the market.
As others have mentioned, standards compliant != cross-platform. However, standards compliance is very much supported by the technologies you mentioned.
Additional reading:
A List Apart [alistapart.com] - lots of articles on integrating useage of standards-based web design
Jeffery Zeldman's Weblog [zeldman.com] - a big proponent of web standards
Re:separating content and presentation (Score:2)
1. Content. This is your data, text, articles.
2. Structure. This is the XHTML. Tables, links etc.
3. Layout. This is CSS. Style, display and layout.
One may need server-side stuff for the content part.
Re:separating content and presentation (Score:2)
You're missing my point.
Re:separating content and presentation (Score:2)
Have you seen the CSS zen garden? [csszengarden.com]
100s of attractive layouts all using the same XHTML document.
Re:separating content and presentation (Score:2)
Some of the style sheets have deep knowledge about the content (i.e., the individual paragraphs). Almost all of them are highly resolution dependent and fail to render correctly for fonts whose metrics differ from those they assume. Many place things incorrectly at absolute coordinates and don't work correctly at small or large win
Re:separating content and presentation (Score:2)
Very unusual for slashdot.
Re:separating content and presentation (Score:2)
Usual for slashdot.
Re:separating content and presentation (Score:1)
How do I make a CSS layout thingy that lets me put a big image next to the nav bar?
My web page (www.pdrap.org) has a photo album. If you look at http://www.pdrap.org//photo_albums/year_2003/Apri l
In Mozilla, the photo is directly to the right of the nav bar. The photo makes the page very wide, so Mozilla puts a horiz
Re:separating content and presentation (Score:2)
The same XHTML document can be styled in completely different ways. Parts can be moved around, floated, made to disappear, etc. The only thing you need is to mark up each thing as what it is (paragraphs, blockquotes, headers, etc).
And tables are a thing of the past, by the way. Tableless design is one of the things that allow for this kind of flexibility.
Re:separating content and presentation (Score:2)
You don't know much about layout, do you?
Parts can be moved around, floated, made to disappear, etc. The only thing you need is to mark up each thing as what it is (paragraphs, blockquotes, headers, etc).
Yup, but that's not what separating content and presentation means. In order to separate content and presentation, you'd have to be able to write interesting style files that work for lots of different kinds of content. But the set of CSS styles that actually wo
Re:separating content and presentation (Score:2)
Admittedly, you goaded me into looking for info on how LaTeX works (I had used it, but didn't study the format up close). It tends to be more strict than XHTML/CSS actually, and does require good markup of a document. If you want to see some reference, check out this document [cam.ac.uk].
CSS is very flexible for making layouts. Please suggest what you think LaTeX can do that CSS can't. Prior to that, though, you may want to take a look at the spec [w3.org] (and yes,
Re:separating content and presentation (Score:2)
Here are some things:
Re:separating content and presentation (Score:2)
What you're describing is stuff that graphic designers love and wish web pages could do. It's also stuff that doesn't work for the internet. You can't assume that everyone uses the same software/hardware, or that everyone has X font. The spec states that people should be able to custom
Re:separating content and presentation (Score:2)
Oh? Give it a try. A lot of them involve some pretty tricky optimization, not the kind of thing you could do in JavaScript even if JavaScript had all the information actually available to it.
What you're describing is stuff that graphic designers love and wish web pages could do. It's also stuff that doesn't work for the internet. You can't assume that everyone uses the sam
Re:separating content and presentation (Score:2)
Although your statements about using columns in particular are true for CSS, I think you're selling the standard short. Check this out:
This is my site [overcaffeinated.net]
This is the exact same markup, when passed through a different stylesheet [overcaffeinated.net]
Both of those use the same markup. One is ~800px wide, the other 320px wide. This is a demo I'm preparing for a tutorial on some CSS techniques. The title images (Rants & Articles, News, a
Re:separating content and presentation (Score:2)
Yes CSS is useful. There are quite a few properties that can be abstracted out of the content using CSS (and even more with JavaScript). My point is just that CSS is still pretty far away from the kinds of separations of style/content that other common typesetting systems routinely achieve.
I didn't add extraneous divs to achieve the second layout, just structu
Re:separating content and presentation (Score:1)
I cannot stress enough that the 'future of web design' is pretty much now. (lack of W3C standards-compatibility in IE not withstanding)
If you keep your xhtml to just raw DIV tags and data, you force yourself to use the CSS code for layout. Once this is done, you achieve an unprecedented degree of flexiblity in design, as you can modify the page in broad strokes simply by altering the CSS.
For those interested: A perfect example of this is the CSS Zen Garden [csszengarden.com]. Click on any of the styles l
"content and presentation" is misleading (Score:2)
not really true (Score:2)
Accessibility (Score:5, Insightful)
Re:Accessibility (Score:3, Informative)
The W3C WAI resource page [w3.org] has pointers to everything you need to know. A popular tool that helps evaluating web accessibility is Bobby [watchfire.com], but unfortunatly it isn'
Ask Slashdot? (Score:2, Funny)
*cough*HTML 3.2*cough*
Re:Ask Slashdot? (Score:2)
Re:Ask Slashdot? (Score:1)
Re:Ask Slashdot? (Score:1)
It's a Noble Aim (Score:3, Interesting)
About 2 years ago I was involved in redeveloping our proprietary Web app to comply more with standards. It was a huge uphill battle to try and convince management that this was what they wanted. Complying to standards meant we had to drop or significantly change features of the app to ensure that it would work cross-browser and remain accessible [w3.org].
My main advice is that whenever you ahve to make compromises on functionality and compliance, try and veer to the side of compliance. Your customers will (hopefully) thank you for it in the long run. Especially, if like me, they don't use IE or Netscape
Re:It's a Noble Aim (Score:2)
It's nice that some of us can live in fantasyland where the theories of standards compliance are the only guidelines used to create the framework or "demo", before they finally hand the project off to the unlucky grunts who have to actually make it work in the real world.
Don't confuse the two! (Score:5, Insightful)
What are you aiming for - compliance with the W3C specifications, or separation of content and presentation?
You can use all those nasty <font> elements and still adhere to the specifications. Use HTML 4.01 Transitional or XHTML 1.0 Transitional (following Appendix C).
The benefits of adherance to public standards means increased compatibility with present and future browsers, and reduced business risk [evolt.org].
Separation of content and presentation is slightly more risky, due to buggy browsers, particularly Internet Explorer. If you are going to do this, make sure you have somebody familiar with CSS first that knows the limitations of the various browsers.
You may want to do it in two stages - first separating out the minor styling, such as fonts and colours, and then getting rid of the table layouts when you've laid the groundwork.
Older browsers like Netscape 4.x will almost certainly cause you major problems. The normal technique these days is to hide stylesheets [w3development.de] from them using their bugs against them. That way, they get the plain, unstyled HTML page (which should still be functional if you are doing things right).
Newer browsers have something called "doctype switching" [gutfeldt.ch]. Make sure you trigger standards-compliant mode so that they are at least trying to do the right thing.
Don't rush headlong into CSS if you've not spent much time with it before. There are plenty of things you can do to screw up a page (e.g. pt or px-sized fonts) that aren't immediately obvious to the newcomer.
Luckily, the things I'm working on are fairly new, so we'd need a pretty strong reason not to use the relevent specifications and separate content from presentation.
Re:Don't confuse the two! (Score:2)
Re:Don't confuse the two! (Score:2)
Re:Don't confuse the two! (Score:2)
Re:Don't confuse the two! (Score:2)
Re:Don't confuse the two! (Score:2)
This is what I was specifically objecting to. For broad layout, pure CSS works fine. Yes, you have to hunt down the spacings the same as you do in a table, but your recommendation of using tables falls short, imho. I don't see a real reason to abuse tables as a page layout anymore. I've converted a page which is similar to your standard page from a t
Re:Don't confuse the two! (Score:2)
That's the reason I use tables for tabular display but not for layout.
Simple validation is the key. (Score:5, Informative)
Most of the trouble with "IE-enhanced" pages is the interpretation of errors by parsers. If I write:
[p][strong]foo[em]bar[/strong]baz[br]
In what tags is the 'baz'? depends on who reads it, mmh?
Except for NN4, unrecognized CSS tags will just go unnoticed for lower-version browsers, so that if your structure is OK, it should be usable for most browsers.
You might want to test with Mac's browsers (IE5 at least) to make sure your ECMAscript works; some core methods are missing.
And, should you need an incentive to go table-less, there is a great presentation [hotdesign.com] that summarizes the advantages.
The css Zen garden [csszengarden.com] is a great example if you want to show colleagues why separating presentation from content is a neat idea.
Terminology! (Score:2, Insightful)
In what tags is the 'baz'?
You mean "elements", not "tags".
unrecognized CSS tags will just go unnoticed
There's no such thing as a "tag" in CSS. Are you talking about rulesets?
The Zen Garden is an exercise in graphic design, and a rebuttal to the myth that standards-based code is ugly. Most of the entries are highly fragile, not very usable or accessible, and are NOT suitable to use as examples for production websites.
Re:Simple validation is the key. (Score:2)
Zen garden is great, but I think it's still more in the "this is where we can go" category than the "production website" category. You can make a site with all your presentation in CSS, but because of the buggy CSS implementation in some browsers that are still out there (cough*IE5.5) there are some things that you can't reliably do yet. What the site looks like is still the most important thing to a lot of clients out there.
Your best strategy is still to use tables for the broad layout, as much as I hate
From an interoperability standpoint. (Score:3, Insightful)
When you're sure that everyone uses the same browser, it means you can use a 'standard' that works for you. But enterprises are increasingly called to support a wider range of hardware and software.
Using data standards is a key component to interoperability. The more universal the standard, the more likely the systems will interoperate. That applies to any enterprise and any system, from CD recording format, to Unicode, the NATO Phonetic Alphabet, to Webstandards, to the Incident Command System.
Heck, Law School's main purpose (besides removing your soul) is to teach you the standards and processes of working the legal system. For the most part, the Law is the system that ensures the interoperability of property (heh).
You can certainly roll your own standard, or stick to an old one, but you run the risk of not being interoperable. In a world of increasing interdependence, you will probably want to implement your own solution, but ensure that the "public" parts are interoperable.
More reasons for standard/cross browser compliance (Score:3, Interesting)
Regarding web applications: I believe it's always good to support multiple browsers - even if you don't need to because you write applications for a closed user groups, that uses only a known browser.
As soon as you start to automatically test your web applications with scripts (e.g. HttpUnit [sf.net]) there is suddenly another browser: The test script. The more browsers you support from the beginning, the higher the chance that you can easily automate tests for your application.
Your mileage may vary with read-only sites, but others have already elaborated about this.
we aim for browser compatibility (Score:2)
The development house I work at has a primary goal of our applications working on any of our major supported browsers. The major supported browser are based on Web statistics on the browsers our customer actually use. We dropped Netscape 4.7 finally a few months ago (thank god).
This seems a sensible approach, unless you can force you customer to use a specific browser, you need to make sure the app works on their browser. Standards compliance is one way to shoot for compatibility, but knowing the quirks of
Lots of solutions (Score:1)
Abandon All Hope Ye Who Enter Here (Score:2)
My 2 cents... (Score:3, Informative)
Do yourself a favour and go for the Strict versions of the (X)HTML markups directly. Don't waste time with Transitional markup, because you'll be creating the same old tag soup that all the browsers (old and new) will happily eat in quirks mode. When the day comes (after your transition?) and you finally set that DTD to Strict, all your pages will be blown to bollocks because the browsers will now render them in strict standards compliance mode.
Why bother? You can't really benefit from Style Sheets in quirks mode anyway? Remember, the rendering is completely different between quirks and strict standards compliance mode, and with good reason! The browser developers finally had a chance to do it right with strict standards compliance mode rendering because their implementations are made from scratch from the same thorough W3C spec. With quirks mode they just use their old layout engines from back during the browser wars.
You'll benefit greatly from the Strict versions of the (X)HTML markup. While taking full advantage of Style Sheets and ridding your old (X)HTML sources of the deprecated presentational tags, you'll end up with more easily maintainable (X)HTML sources. Think about it, most of your pages might already consist of 80% tags related to presentation. When you have removed these from one page and put the presentational information in an external style sheet, it won't be that much of an effort to apply these resulting style sheet rules to the rest of your pages. Why? Because most of the time you'll just be removing deprecated tags. Sure, there's still a bit of structure to deal with, but it's a worthwile task.
I've written "(X)HTML" in this comment a couple of times now. As I see it, the Transitional/Strict issue is infinately more important than the HTML/XHTML issue. When you have Strict HTML markup it's really a no-brainer to convert it to XHTML, because it's pretty much about syntax, well formedness. Try taking a look at W3C's HTML compatibility guidelines [w3.org] for XML. If you do yourself a favor and explicitly use closing tags, etc. you can convert your HTML to XHTML with a couple of regular expression substituions. That's pretty much it. Bottom line: the main difference between the Strict versions og HTML and XHTML is largely syntax. (There are some elements of your DOM that require special attention with respects to applying CSS, but this statement is essentially true.)
If you care about having the same result shown accross browsers (especially IE), then watch out for XHTML.
(Borrowing a bit from a previous comment I made here on /.) IE can be a stick in the wheel, because it
ignores the XML declaration in XHTML documents beginning like this:
<?xml version='1.0' encoding='iso-8859-1'?>
IE expects to encounter the DOCTYPE first, which doesn't make sense - and would be non-valid XHTML markup. When IE encounters the above declaration it throws itself into quirks mode, unconditionally!
Sure, the XML declaration is not strictly required, however if you read the W3C XHTML spec it says:
An XML declaration is not required in all XML documents; however XHTML document authors are strongly encouraged to use XML declarations in all their documents. Such a declaration is required when the character encoding of the document is other than the default UTF-8 or UTF-16 and no encoding was determined by a higher-level protocol.
Another point. XHTML pages should really only be created for the purpose of being served - by your web server - as application/xhtml+xml. See W3C's document on XHTML Media Types [w3.org]. IE doesn't support the application/xhtml+xml media type, and this together with the above mentioned deficiency makes for quite a showstopper with respects to the adoption of XHTML - it's sad, really.
Mozilla and Opera will handle XHTML documents served as application/xhtml+xm
Speaking of IE and DOCTYPES (Score:1)
I have found that IE really loves fucking up when reading the DOCTYPES. The W3C specification lists the DOCTYPE definition as using three lines (and in my experience won't validate otherwise - at least when writing XHTML) but IE decides that is incorrect and will ignore the definition thus NOT switching to strict mode and totally screwing up the rendering of your document.
I fully agree with using HTML/XHTML s
A Piece of Advise (Score:3, Insightful)
Matthew
www.para-docs.com
Re:A Piece of Advise (Score:2)
That's not true. There's gigantic amounts of CSS 2 that works in Mozilla, Opera and KHTML, but not in Internet Explorer. The most prominent areas are the selectors and tables.
The only place where Internet Explorer usually gets things "right" is where it actually does the wrong thing, but what a newbie developer expects.
For instance, text-align: center shouldn't centre block-level elements, just text. Internet Explorer gets that wrong, b
Re:A Piece of Advise (Score:2)
Dynamic HTML: The Definitive Reference [amazon.com]
Paid for itself twice over the first time I used it -- saved me probably a week's hassle right off the bat (working with text ranges and selections).
Excellent! (Score:2)
Eventually when browsers can rely on users producing correct code, their bloat will be reduced and they may see great speed gains.
I have personally found Opera to be the
this book seems to be a decent place to start (Score:2)
While the review I've seen on Amazon point out that it's more of an evangelical book (with a decent explanation of the technologies involved) than a technical roadmap, the table of contents (pdf) [zeldman.com] looks good. It seems that the book addresses the real world issues of refreshing an existing site (what to update vs. what to leave as-is) and instead of flash-bashing, a somewhat objective analysis of where it belong
What's the question? (Score:1)
Extremely high (Score:2)
Extremely high priority, and yes.
One big reason: lower total cost of maintainability.
My simplistic recomendation (Score:2)
2. Just do all your work with IE if that is what most people have. Try the site now and then in Mozilla, Opera, and Safari, whic
Re:My simplistic recomendation (Score:1)
Air Force web apps suck (Score:2)
I had the same dilema (Score:1)
Re: Using JS (Score:1)
Re: Using JS (Score:1)
Blame the company, not the W3C & Browsers (Score:2)
Why don't you still use JavaScript, however use cross-browser code? JavaScript conforms to ECMA 262 - and any standards compliant browser will understand it (more than will understand JScript or ECMAScript).
Since we started coding the front end at about the time of the browser wars, we didn't have the luxury of planning to use the W3 standards (especially since they were not complete, and browsers weren't honoring them anyways)
...our