Why standards do not work ?

Why standards do not work ? It is a question that i have been asking myself for quite some time. Its not only the problem of the web, its been a natural problem in all the areas, everywhere around the world. Perhaps, ironically, the humanity is trying to avoid some kind of an artificial control, even the nature in itself does not have standards defining everything with absolute(100%) precision, though a nature has a tendency to define some certain rules – gravitation, growth, life, death and so on.

I think that as long as the “manufactures” of the web-related software (“browsers”,”visual designers”, “readers”, and so on), avoid putting stricter rules to the web, there wont be a lot of standards following. Why ? Because, the most do not care. Sad, by true – have been working in some countries in some different companies, i have seen that the final results, and have heard the thoughts of the web-designers. Timeframes, technical difficulties, . Those who wish, wont get a lot of support from the administrative and marketing departments. Its like, its not easy to answer such questions as “Is is possible to sell ?” or “What will it give us ?”. As long as it is not a question of working or not working, there wont be a lot of thoughts about following the standards.

I think that W3C did a good job of introducing the XML. You have to have a good structure for it to be usable, and so i think, that the move to the xHTML was a very reasonable one. The problem is that almost noone has noticed and followed that move. I think that there are some requirements, that should be fulfilled, before the web standards will become widely accepted:

  1. Some good WYSIWYG visual editores, producing valid code. As of now – there are none on the market, though i have to name the Dreamweaver 8 ( it has surprised me very positively ), and until some editors wont be accessable to the mainstream public, the vast majority of webdesigners, will continue producing (?)HTML(?) code with GoLive, FrontPage and co. It is one of the reasons, why i think that the work of WebStandards group should be much more appreciated.
  2. Bigger browsers market – i think, that this one is pretty much clear. With an absolute dominating power of the crippled IE there are still no big alternatives, though Firefox is rising fast, it has allready awaken the sleeping giant, and the next IE version seems to be not so far (as it was 1 year ago) =O). I would love to see 3-4 browsers prevailing on the market – please, dont get me wrong, i dont wish to return to the Netscape-Microsoft case, but i think that if the market would be devided between IE-Firefox-Opera-Safari, we would have a different kind of progress, and even the marketing departments of those, who produce them, would be more then interested in fulfilling their job, by saying – “we have full standard compliance, and its 15% more then our competitors.”
  3. Web-applications giving advantages to the use of the standards – lets take a look at the browsers, for example. If Opera would give some additional functionaly(for example live content re-editing – curstomization and adoption by user needs) to those pages, which are not reendered in “quirks-mode”, then for any web-designer this would be an interesting and an important thing to not forget.
  4. There must be done some moves in promoting, advertising and convincing the web-community of moving toward the standards. There are a lot of “galleries” sites doing an amazing job, by promoting the use of (x)HTML and CSS, but i think that even more things can be done – for example by promoting competitions between the young designers (schools,universities,..), then a big (especially designer) companies (or big ones like Apple,IBM & Microsoft) could help out, by providing additional publicity and even some prizes. I know it sounds very naive, but “sky is the limit” and as Ghandi said – “You must be the change you wish to see in the world”.

For something to work, to function – there must be conditions and needs. If at least 50% of those requierements would be fulfilled, then i believe that the use of standards would start to be a normal requirement and an overall victory in the battle for the use of the standards would be not so far away.

Google Web Authoring Statistics

Google Web Authoring Statistics – are: nice, cool, interesting, useful & unusable, advanced (SVG), ignorant (no alternative solutions), fascinating (information).

First of all of course, as usual for Google (insert here a sad smile), – no doctype for those pages was found, at least no valid one. And then, no real alternative for firefox – i am strongly supporting the firefox, but not at the price of destroying everything else by not providing any alternative at all. Its a shame, that such imaginative company as Google, has had no ideas (?) about accessibility while doing such statistics. Safari, i have tried on this page has crashed (with the latest “panther” installed) – not nice, not nice at all, Opera 8.51 shows black squares instead of any useful graphics, Adobe SVG Viewer with IE has not provided any reasonable result, to talk about. And by the way, the only firefox versions to view the graphics are 1.5+, that means that a very big part of the firefox users are also not capable of viewing any result (SVG was included only since the 1.5 release).

They could have provided some alternative – images or text, why ignore more then 80% of the web users ? Very strange move, i have to say, and a pretty weird one. Anyway – from what i have managed to see inside those results – a majority of the pages are still “made with tables”, more then 50% of the <background>’s have “bgcolor” attribute, more then 80% of the scripts are have attribute “language”, and my favourite one – “A scary number of pages use <table gridx=”" gridy=”" showgridx=”" showgridy=”">, not to mention the multitude of <csscriptdict>, <csactiondict>, and <csobj> elements.” (see for yourself )

I hope that one day, the majority of the web developers will start looking at the WCAG, and at the other web standards, but until that day … enjoy the titles like “best viewed with not your browser“.

HTML 5 vs XHTML

Where are we going, what will prevail in the future ? XHTML, cause its a XML, better structured, more accessable, more generic, a W3C recomendation, Microsoft seems to wish to support it in the future, and so on, or HTML 5 – cause it brings something new, finally after a lot years of waiting something usefull for the web, cause Google, Opera, Mozilla, Apple and others are behind it. Or maybe there will be something in the middle, some kind of a hybrid?

Short descriptions:
HTML 5 – is a proposed extension to the current HTML, made by those, who currently provide us with a good internet experience.

  • <datagrid> – finally something to replace our favourite tables, some programming languages like c# have such elements, but inside HTML, this would be really cool and usefull
  • <canvas> – drawing without limits, but i am not sure how should it work together with SVG (Opera 8 and Firefox 1.5 have some support for SVG)
  • <event-source> – as i see it, a replacement for all those ugly frame and iframe things, nice !
  • <output> – would help the dynamic pages (think ajax)
  • input type=”range”, “time”, “date”, “email”, “url” – finally some help to get rid of the javascript checks
  • Attributes: autofocus, required, pattern, list, min – i think their names are self-explaining, very nice
  • Attribute: onstartdrag – a good substitute for javascript technics, i hope it would be some universal implementation
  • content = “editable” – yes, yes, yes – for a rich internet applications, this one cannot be missed
  • <section>, <article>, <aside>, <nav>, <footer>
  • <progress>, <gauge>, <date>, <time>, <menu> – we will see =O)
  • i18N(internationalization) – i dont really know what exactly do they want to do with it, but i hope to see some good features, eenabling us to do more stuff for international users
  • device independent, media independent, separation presentation from content, accessible, open standard

xHTML 2.0 – is a proposed standard by the responsable internet authority (W3C), who is responsable for the current standards

  • as generic XML as possible – more application and device independent, this is really important for the future growth and diversity of the web.
  • structure changes – at this moment i think there are other priorities, though i cannot deny, that it can be interesting
  • semantics = <person>, <note>, <length> – nice features
  • less presentation, more structure – sounds good to me
  • better paragraphs – finally ! The web is a about a text, so there must be some standards available for integrating the other elements with it together
  • images – nice idea, but i think that it can be done with css background-image attribute, also it is not backwards compatible, so it can create some problems with older browsers

It is just a small part of what they really should bring, but i think that the main idea becomes more or less clear. I found that the definition of the xHTML 2.0 by the W3c is – “XHTML2 addresses the remaining identified problems in HTML4/XHTML1″. Ok, so it is a bug-fix release ? Where are the new concepts, new features, new limits and so on ? I think that xHTML 2.0 lacks additional functionalities for the net – since the <ruby> tag there were not much addition to the web standards to improve the surfing experience, and the <ruby> wasnt really not really implemented nor used.

So far i know, some of the features are allredy being implemented in the next generations of browsers. Canvas for example is being implemented in Safari, Firefox (1.5) and Opera (8.5?). I would say that the “rich components” is the keywords to describe the general idea of the HTML 5, and i think with all that buzz that Ajax has made in the past monthes, and thousands of the applications being created based on this idea, the HTML 5 future seems to be closer to our reality. Anyway, my vote goes to HTML 5. Yesterday i have finally taken my decision in this “battle”, which will take in the years to come.

Apparently some firms like Google are starting using SVG on their pages, see this nice example about web authoring statistics.

But if i could chose i would go for a structural presentation of the xHTML and the all the “sweets”, that HTML 5 is promising to bring us. =O)

p.s.: useful links:

Usability & Design

Disclaimer: i am not pretending to be someone very special, in fact i know that i am not. I am not a kind of specialist like Eric Meyer or Jeffrey Zeldman or Molly Holzshlag nor even Jacob Nielsen nor Guy Kawasaki. No. I am just a web-designer with relatively few years of the experience, nevertheless i would like to share it with those, who might be needing it (everyone once was a beginner). =O)

Design is a great and powerfull instrument. It can be used as to create a masterpiece as a destroy a good piece of work. I have some good examples of both of them. Lately i have been doing some web-related projects with a professional designer, who was creating the visual definition of the websites. I had no possibilities to influence a lot of the design related decisions, so if you can imagine my role was merely a web-implementation of those projects.

Those designers did very nice stuff – the final result was an eye-pleasing content. It was a very masterfully done piece of the art, from my personal point of view, and in no way i could achieve such results alone. My problem was the fact that i had some different thoughts about the sites usabilities. As a matter of fact, i think that there are a lot of designers, who are more painters then designers. Design as a matter of fact should be usable. It means that we are working on providing something that the others are going to use, somethung usefull (at least we hope so).

In one of the projects, the biggest problem that we have faced upon some time, was that the space given for a lot of functionalities was too small to handle any reasonable amount of the information. Imagine a space for the news article with the capacity for only 5 small words. You are going to spend a much more time, rethinking your articles, then at fact were spent while designing. Or imagine a brilliant interface, where the big form occupies only 15% of the page space( the rest are nice images and usefull information). In the last case we came needing to add several big( and i mean really big ) fields to this form, and let me tell you, that we have spent some amount of time, trying to find “the right” words to describe the situation. I am sure, and i can see it all over the net, that such situations are more then common in each and every country as well as in each and every big firm.

We meet usability(“design”) decisions in almost every aspect of our lifes – buying clothes, cars, selecting the “optimal pathes” to our destination points, dressing up, and of course in each and every work, the usability decisions are affecting our productivity, self-confidence and so on. Even not being a specialist in languages, i would say that “the decision” is a matter of a fact an “usability issue”.

My first programming professor at the university, who was not a very nice person to the most of the students, once told us, grunts, one thing, that only a lot of years later i have started to understand and to adapt to my daily job. He said “A good programmer spends about 80% of his time on design decisions and only 20% on the programming.” When i heard that, i spent the rest of the day joking with my friends about “80% sitting in the front of the paper, and 20% writing an excuse for that”. Man, i was so wrong. I wont tell you that this proportion 80-20 is right for the most cases, but there are a lot of cases, when you spent a big amount of time just preparing and planning your work:

  • how are you going to do this project ? (modules separation)
  • is it possible and reasonable to implement the desired way ?
  • what are all the requirements to do the job ?
  • will it work with the other parts of your “construction” ? (outside module connections)
  • how are you going to extend this functionality in the future versions ?
  • how the biggest modifcations are going to affect your work ?
  • what is the escape plan ? (plan b)

I would say that for the most of the time, i am trying to follow the principle: “divide & conquer, while uniting”. Whats does it mean ? It means a creation of the independant modules structure, where each module is (in theory) more or less self sufficient, and capable of executing the desired task. Library – is the best word which i can find to describe this type of the structure. One of the best “software architects” i have meet in my life, was capable to say, in a few hours, which modules he needed to create to complete project, and which existing modules (in the most cases open source projects) he is going to use to achieve the final result. To achieve the same result, i believe, that all you need is a good practical knowledge and a good, secure planning.

The compensation for the well thought planning, can be even a bigger amount of time, which you wont have to spent by redesigning your work. Think about your job, as if you are a general in the front of the battlefield, preparing the major offenive. I am confident, that Alexander the Great, or Rommel could have been good software developers and project leaders. Or taking it from another angle – have you ever heard about an architect who has changed the number of the floors during the construction, without recalculating all the needs almost from the beginning ? Something like – “Oh, lets add 2 more floors here and on the right side we will add some pool, it would be nice ! Problems, no, this building wont fall !”. When we do something we have to have a plan for it, otherwise – we dont know what we are doing, and this is a first step to the disaster.

There a lot of tools to increase the productivity at your workplace. If you are thinking about an utility that would help you doing something, then take a look at the net, in 99% of the cases somebody allready thought about this before, and in about 95% of the cases you will find an utility in the internet for your need.

p.s. I am still trying to convince a lot of the people around me of not doing their daly stuff by copying, pasting, writing the same link, opening their favourite ftp program and their favourite archiver but instead of using such tools like the Ant and or the others. =O)

image fading with only one image element

Few days ago i found myself at the situation when i had to do some flash-imitation by using the fading method of changing the images, but in the HTML at that specific situation i could not put 2 images at the same position. The absolute as well as the relative positioning were not applicable, thanks to the IE. I have had just an “img” and a “div” in front of me with an alternative option of using a flash animation. I have to confess, that I am not a big fan of using a lot of flash on the same page. No, don’t get me wrong, i think that flash is wonderful and it enables doing a lot of advanced design stuff, which is much harder to do in HTML, but i don’t like the pages with 6-8 small flash “plugins” making from the web page some kind of a hybrid.
I am using the javascript Scriptaculous library for the visual effects, which is quite fantastic. If you have not tried it out, then do it as soon as possible, you are going to love it =O). Already for some years, i have my own javascript library, with a lot of different functions, including the fading in-and-out method, but lately i have found extremely useful their code, as i had no worries about updating and testing it for the most important browsers available on the market.

After some thoughts i decided using the background image of the parent element (“div”) as a second image storage for an image-replacement method. Instead of the “normal” step of load the next image into the second “image” element, while fading the first one out and the second one in, i decided to try out the following sequence:
1. Assign the current image source to the “backgroundImage” attribute of the parent “div” element
2. Fade out the image element with the defined speed
3. A few moments before fading out of the image completely, load the next image into it ( at this moment the background of the parent “div” is the prevailing visual element, because the opacity of the image is near 0%)
4. A few instants after the step 3 fade in the image element, thus visualizing the next “slide”, which will appear substituting the “old slide” with a newer one
5. Repeat the steps from 1-4 after a small pause.
I had to do some adaptation for the code i have written before, so the final result was looking something like this:

var slidesNr = 4;   // Total slides nr
var curSlide = 1;
var sliderSpeed = 3000;  // milliseconds, time of the fading effect
var sliderChangeSpeed = 8000; // milliseconds

function changeSlide(){

document.getElementById( 'photoId' + 1 ).style.backgroundImage =
'url(' + document.getElementById( 'photoId' + 2 ).src + ')';
new Effect.Opacity( "photoId" + 2, { duration: (sliderSpeed/1000),
transition: Effect.Transitions.linear,  from: 1.0, to: 0.01 } );
curSlide++;
curSlide = ( curSlide > slidesNr ) ? 1 : curSlide;

setTimeout( "document.getElementById( 'photoId' + 2 ).src =
'image_' + curSlide + '.jpg';", sliderSpeed - 200 );

setTimeout( "Effect.Appear( 'photoId' + 2 );", sliderSpeed-300 );
setTimeout( "changeSlide();", sliderChangeSpeed + sliderSpeed );
}

There are some small conditions for using this tecnic – all images have to have the same sizes and you will probably have to do some css adjustments like:

#photoId2{
width: 150px;
height: 150px;
}
#photoId1{
width: 150px;
height: 150px;
background: no-repeat left top;
}

The HTML for this experiment is very simple, and you can find it on the result page.

You can see the final result here. Its very far from being perfect, but i have found it to be acceptable for some projects.

p.s. This article is still a “beta” so any comments are more then welcomed =O)

Intranet & Extranet

Today i have helped solving some CSS problems for some intra & extranet sites for some big company. I was impressed by the quality of the code. Tables & Tables, no divs the most of the styles are still attributes with likes of style=”color: blue;”. Faaantastic … A person making this sites were impressed by the use of the !important rule, and in my turn i am impressed by the knowledge of the html, css & web standards. I mean even right know here nobody is giving a damn about the browsers, other then IE. Oh, it does not work in Gecko-based browsers ? Ok, but who does not have an Explorer installed on their computer ? ( hello to all the linux users ). Some of the city halls of Portugal have the “privilege” of using the sites created by the company where i am working (hello to all the users of this sites). I am thinking in organizing a small presentation of how the work should be done, maybe somebody will start moving into the direction of the standards, at least a person who i am helping allready suggested that i should do this.
As much as i dislike the Microsoft politics, the most people around me, and especially the responsable for the strategic decisions here are looking forward to each and every Microsoft product, ignoring any open source alternative decisions. Anyway i am having projects with .NET and even though i would prefer any alternative project there are none of them available in the nearest future.

I was looking at the forums of one european software company which produces digital signature software and i am deeply impressed by the fact, that as it should provide the best security for the users, the first and only available platform is windows. I hope that in the future there will be more solutions, and i think that each and everyone should do their best to offer alternatives.

TARH

TARH lda is the name of the firm, for which i am currently making a web site. TARH stands for “Terra, Ambiente e Recursos Hídricicos”, which is something like “The Earth, the Environment and the hidric resources” in english. Currently the still is under construction, we are still missing the fotos and some dynamic content, probably a small blog and so on. If anyone by any chance would visit and give me some critics i would be more than happy to hear it. I feel a big need to improve and i believe that critics is the best way to do it (as well as the hard work in the right direction) =O)

I am starting investing my time into SEO and it seems to be an interesting area, but which deserves a lot of time and experience to master.