Use standards

Use standards

No, you guessed wrong. This will not be the nth post about W3C standards.

Well, maybe one paragraph: while I know the use of W3C standards is favourable, the usability of your project/application should be your number one priority. Not adherence to a standard which would render your application unusable for (a part of) your audience. Every once in a while people tend to forget this. Of course no one will argue that W3C standards actually are a blessing.

But, this post is mainly about 2 simple standards:

  • The ISO 639 standard for representing languages. Please use “en” or “fr” in your database, routing, scripts,… . It is unbelievable how many times people pick something like “FR” or “F”.
    Next time, consult the ISO 639-1 list.
  • The ISO 3166 standard for representing countries. Same case: please use “US”, “FR” or “BE” or use the ISO 3166-1 list.

Additionally, use the Unicode CLDR list when working with locale’s (e.g. nl_BE).

Standards in general provide a major productivity benefit: you do not have to lose time discussing, implementing, mapping,… other peoples personal preferences (whether or not their choice can be motivated).

This also applies to coding standards/guidelines. We have probably all had (or will have) discussions about them once in our life because there are no “official” ones as far as I know. Specifically about PHP: please (yes, I am on my knees right now) use one of the major ones that are already available: e.g. Zend Framework (my preference because it is or will become the industry standard), PEAR or … . Do not create your own flavour (I do not have to explain why this does not make sense).

A hot topic at your company, project or team? Have a look at Weble Subversion hosting: you can force a list of predefined guidelines/standards by a mouse click. This will prevent SVN users from committing their code if it does not comply and, in such a case, an overview of the deviations will be displayed.


Tags:

 
 
 

Leave a Reply