DominoCompleteDocType Considered Essential

Friday, May 4, 2007

After reading this post by Ferdy I thought I'd get something off my chest I've been thinking for a while, as I leave Domino development, probably for good.

I've used a few OpenNTF web apps in the past and I've always wondered why, on my servers, they look crap on first installation. I've realised that all these web apps are designed for the standard Domino installation. Problem with that is the standard Domino installation outputs an incomplete Doctype declaration and puts all browsers into Quirks mode. The fix for this is simple, use the notes.ini setting DominoCompleteDocType=1, which I have for all my servers.

So when I place an OpenNTF app on a server of mine, my browser is put into standards mode by the doctype but the CSS of the apps is written for Quirks mode; the result is a complete mess. For example domBulletin fails to load any CSS in Firefox (it's served as text/html) and DominoWiki is misaligned and the sliding panel is buggy in IE and fails completely in Firefox. I've attempted to fix the problems but when faced with the tangle of messy HTML and confusing CSS that seems to be ubiquitous with Domino apps, I give up: life's too short. I simply patch it up to make it work.

This is a bad situation. A lot of Domino apps use very outdated webpage layout techniques such as table based layout, non-semantic HTML and poor CSS and Javascript. A lot of Domino developers groan about CSS, browser incompatibility and so on and honestly, I can understand why they say these things and resort to these outdated methods - trying to do CSS based design in a quirks mode situaiton is a pain in the bum, I'd probably resort to those things too. However in this situation, they make a rod for their own backs.

For the sake of the platform, I encourage Domino developers everywhere to look into standards based web design, semantic markup and modern CSS techniques . The first step has to be set Domino for Standards mode:

Do these 2 simple things and you'll suddenly find difficulties just melt away and you can get on with making great web apps without fighting with CSS. No CSS hacks needed anymore and you can use all the great modern CSS techniques all the gurus use.

9 Comments

#1
On the May 4, 2007, Gary Barber wrote:

lol.. easy to say when you are leaving Domino behind. But still people should try and move away from tables (shudder). 

#2
On the May 5, 2007, Ben Poole wrote:

Cool, thanks for the heads-up!

I was aware of an issue with the sliding panel in DominoWiki (it's on my list to replace: the underlying Javascript is excruciating, I want to replace it with scriptaculous or JQuery events), but didn't know about the misalignment.

In my defence, I don't use tables for layout (beyond views, which are tabular), and I express the correct mime type for CSS etc.

FWIW, I have fixed a lot in the forthcoming verion :o)

#3
On the May 5, 2007, Ben Poole wrote:

An update:

Notes.ini file setting duly added to my dev. machine, and DominoWiki (dev) fixed. My thanks!

#4
On the May 5, 2007, Andrew Tetlaw wrote:

Hi Ben! Wow, that's encouraging. I was expecting a lot of negativity but that's a very positive result. DominoWiki is a great Domino app, BTW.

#5
On the May 7, 2007, William Beh wrote:

There are ways for domino to serve CSS as text-css
http://notesweb2.blogspot.com/2006/05/quick-tip-css-using-page.html

#6
On the May 8, 2007, Bo Frederiksen wrote:

"When the browser is in standard compliance mode, the css selectors become case-sensitive."

Read the rest at:
http://www.bofrede.com/en/tips/doctype-fix

#7
On the May 8, 2007, Andrew Tetlaw wrote:

@Bo, yeah there are a few gotchyas like that. For me it's all about professionalism, CSS is just not as trivial as some developers think.

When skinning an app is as simple as changing a CSS file then you know you've got it under control. I don't some developers even realise it's possible to do that.

#8
On the May 8, 2007, Bo Frederiksen wrote:

@Andrew, you are so right. A lot of developers don't even care about valid html. No surprise websites and applications are so poor looking in different browsers. Web-coders craftsmanship is rare.

So what do we do about it?
Besides switching to Ruby on Rails, so WE can make valid semantic strict xhtml.

#9
On the May 10, 2007, Ben Poole wrote:

I wrote about having Domino serve up correct MIME types for resources like Javascript and CSS a while back.

I use this in DominoWiki, and it builds upon an old technique, very common amongst Domino developers, whereby such resources are stored as documents in the NSF rather than design elements:

http://benpoole.com/weblog/200602231126

Ferdy's also written some good stuff re serving up XHTML from Domino. Ultimately, it's a hack, but it's a righteous hack if you NEED to do XHTML. So long as you don't mind coding your own pass-thru HTML (I know some people get hot under the collar about that).

Random outings from a chaotic mind

The Dexagogo Rocket Australian Web Industry Association logo

Delicious

Twitter