Go to the bitwise magazine home page...

 

 
Rants & Raves Home
bitwise Home
Archives...
About...
 
Need a writer?
Contact me...
 

SapphireSteeel Software

 

 

Huw

June 2006

Standards, sir! By Jove, yes, we have standards and we'll jolly well force them upon you! This month Huw rails against the forces of convention that are determined to homogenise the web....

 

Call me old fashioned, but in my opinion, you really shouldn’t need to count the hyphens in a comment! What am I blathering on about, you may ask? I’ll tell you – Firefox. That sainted web browser so beloved of all those champions of ‘web standards’ and Anything That Is Not Microsoft. Well, I’m sorry, but any browser that screws up thanks to a hyphen is not a browser that gets my vote.

Standards, be damned! Why are all those people who rabbit on about standards so in awe of W3C the ‘world wide web consortium’? This is, after all, just a self-appointed committee of faceless bureaucrats – a stodgy, top-heavy talking shop. When was the last time innovation came out of a committee?

Standards, Who Needs ‘Em?

Standardization – when people keep banging on about how great it is I cringe. Does anyone here remember ISO Pascal? ISO – now there’s another great organization whose sole aim in life is to enforce conventionality. ISO is not just a committee; it’s a committee of committees. By their own account “ISO is a network of the national standards institutes of 156 countries”. Does this sound like a good, fast, flexible and responsive way of dealing with the rapid changes of modern technology?

As I said, who remembers ISO Pascal? My recollections of it are so vague that I had to look for more information in Wikipedia . Apparently it was standardized in 1983. Ha! And much difference that made!

The only Pascal that made any impact was a totally non-standard version called Turbo Pascal which later went on to become Delphi. That version of Pascal was created by Anders Hejlsberg – the same man who later on developed another new language called C#. The C# language certainly wasn’t a standard anything - though it has now been ‘approved’ by ISO and ECMA (the European Computer Manufacturer’s Association). Gee, I bet it really made Bill Gates’ day when their seal of approval came through!

Attack Of The Clones

Which brings me back to W3C. My blood runs cold when I come across a web site that has one of those “WC3 compliant” buttons on display. It’s no more than a badge of conventionality. The Borg Collective would be proud of it. 'Bring on the Clones,' I seem to hear them cry!

Don’t be fooled. While all these evangelists of standards talk about the importance of universal accessibility, they don’t really mean it. What they mean is that they don’t like Microsoft. A W3C compliant logo on a web site is another way of saying “this site hasn’t been tested in Internet Explorer so of that’s what you are using, the folks round here don’t want your type!”.

Firefox is the favoured browser of many of these W3C compliant sites. Heaven knows why. As far as I can see, Firefox is an entirely unremarkable piece of software. As I’ve said before, Opera is by far my personal favourite but I really don’t get too worked up one way or the other about mere browsers so if you prefer some other one that’s fine by me.

Dash It All!

I don’t know if the Firefox hyphen bug is defined as a WC3 standard (in which case, no doubt someone will write to inform me that it’s not a bug, it’s a feature). I really don’t care. For all I know it may have been authorised by two dozen different committees and rubber stamped in triplicate. As far as I am concerned, it’s still a bug.

comment bug
Same HTML first (above) in Internet Explorer then (below) in Firefox

Try it yourself. In HTML a comment begins with these characters ‘<--‘ and ends with these characters ‘-->’. Everything inside the comment should, in theory, only be visible when you are looking at the source code. It should never be displayed in the browser itself. However, Firefox has decided that if it comes across two or more extra dashes at the start of the comment, it will treat the comment as text. So if you enter this…

<body>
Hello world
<!-- --This is a comment -->
</body>

…Firefox displays this:

Hello world <!-- --This is a comment -->

Whereas Internet Explorer and Opera simply display “Hello world” and keep the comment to themselves. Pah! Standards! You can keep ‘em!

It makes You Want To Spip!

My battles against HTML (not to mention bloody CSS – ah, but I’ve already had my say on that so I’ll try to bite my lip for now) came to the fore this month due to the fact that I’ve been setting up two new sites using the SPIP CMS system. What a great piece of software this is. I don’t often wax lyrical about open source projects but for SPIP I shall make an exception.

spip
The SPIP site (above) shows the W3C compliant button.
The Uzine site, created with SPIP (below) has a radical alternative. Guess which one I prefer...

My first SPIP site was www.sapphiresteel.com – the home of the Steel IDE for programming Ruby in Visual Studio. The second one (still under construction) is BW2, the Bitwise colour supplement. I have to admit that it took me a week or two to get used to the SPIP way of doing things. While it isn’t hugely complicated to create a SPIP site, I would say that at least a basic familiarity with some kind of programming would be an advantage.

SPIP constructs pages by iterating over data inside loops (or ‘boucles’, this being French software) and you can apply various criteria to select and filter specific elements. For example, this is how I create a loop to display a list of the ten most recent articles {0,10} by date {par date} ordered inverse order – the most recent first {inverse}:

<BOUCLE_article_un(ARTICLES) {par date} {inverse} {0,10}>

Don’t be put off by the slight Gallic accent of the syntax, by the way. You don’t have to be a fluent French speaker to use SPIP. Moreover, the English language documentation is excellent. Simple loops like this are pretty easy to set up but you may need to experiment when you use loops within loops – say an outer loop to get the names of the authors of an article and an inner loop to get the names of other articles written by the same authors:

// Outer Loop
<BOUCLE_auteurs(AUTEURS) {id_article} {par nom}>
          // ….more HTML here
     // Inner Loop
      <BOUCLE_articles_auteur(ARTICLES) {id_auteur} {par popularite} {inverse} {0,5}>
          //… more HTML here
      </BOUCLE_articles_auteur>
</BOUCLE_auteurs>

               
The layout and content of SPIP pages are defined by templates which are written as ordinary HTML peppered with special bits of SPIP code similar to the above. There are special problems posed when trying to design pages containing tags (such as <BOUCLE>) which do not form a part of normal HTML. Dreamweaver, for example, blows the proverbial gasket. It really screws up the visual display of the layout and reports coding errors which aren’t really there.

dreamweaver
Now I can edit my SPIP pages complete with little graphics for the non-standard tags, in Dreamweaver...

Fortunately, there is a way of fixing Dreamweaver which (unfortunately) I only discovered rather late in the day. What you need to do is create an XML file in which you define any special tags. This XML file can be saved in the \Configuration\ThirdPartyTags directory beneath your Dreamweaver installation directory. You create a series of tagspec definitions and, optionally add an icon to be displayed in Dreamweaver when the matching tag is found. You also have to create a graphic image (for example, using Fireworks) for each icon. This is my definition of the BOUCLE tag which I saved in the file, spip.xml:

<tagspec tag_name="Boucle_1" start_string="<BOUCLE" end_string=">"
detect_in_attribute="true" icon="spip.gif" icon_width="30"
icon_height="12"></tagspec>

<tagspec tag_name="Boucle_0" start_string="</BOUCLE_" end_string=">"
detect_in_attribute="true" icon="spip.gif" icon_width="30"
icon_height="12"></tagspec>

You can find more information on defining custom tags in ‘Extending Dreamweaver’ which is available from the Dreamweaver Help menu.

Ah, this stuff is all wonderfully non-standard. I love it…!


Copyright © 2009 Dark Neon Ltd. Not to be reproduced without permission.


Go to the bitwise magazine home page...