The article says, among other things, one really true thing about Microformats. They’re really not perfect, they have their flaws. But I believe Jeff Atwood is wrong when it comes to what these flaws are.
His main problem with Microformats is that they’re using class attribute to make they’re magic. Read his arguments.
I believe that almost in every book about html & css will be a note on naming classes. It’ll say you something about naming them “semantic” and not to use something like “left-blue-column” because you could move the column to the right in the future and make it, I don’t know, orange. Unless the authors are completely stupid and nobody noticed that ‘till now, I suppose there is some true in they’re advices.
Then we have the all-mighty progressive enhancement technique. If I apply it to html + css coding, it basically says: “Write your html markup first - as semantic as you can, worry about the css later”. So if I would follow it to the letter, I would write my markup WITHOUT any class name and then use CSS3 selectors so heavily, that only nightly build of Webkit could display my site correctly. It would be nice, if all my costumers would be using nightly build of Webkit (which they, what a surprise, don’t).
So I need to add some classes.
So I think really hard to come out with the right set of semantic class names. But even I think I was really successful, someone else will always say - “hell, it’s stupid class name”. And we have one more thing to argue about in discussions.
Microformats, HTML5 and ARIA are about to change all that. I believe soon there won’t be any need to use my own class names. (Today I might use my own class names if I need to support some version of our bellowed IE.) We all will just use Microformats class names, ARIA attributes and new structural HTML 5 tags. That’s it.
I don’t know where this approach will take us (I can imagine some snippets libraries, OOCSS frameworks applied to it, some magic with JavaScript, etc.), but I can tell you - I’m looking forward for this future. What I found after 7 years in this beautiful industry, is one thing - we web designers are pretty creative and smart bunch of people. So if we take class names as given and focus our creativity to different areas, it’s likely to move the web design industry another step further.
And If you think the Microformats are piece of shit - that’s fine by me. Use RDFa instead. In the end it does the same thing from this point of view. You’ll just need a bit more advanced selectors. And when Microdata arrives? Still the same! (Except at RDFa and Microdata you won’t need to use classes at all. :))
Btw. if you’re thinking not using any of these, go right now and find yourself a new job. Because this is not a matter of choice since Google got on board.
I think commenting your CSS files is really important thing to do. Recently I discovered cssdoc.net, a project aimed to port JavaDoc comment style to CSS. I tried to use it on one of my projects and I want to share here my comments structure and I humbly ask you for an opinion. Is it good? Do you see some space for enhancements? How do you comment your css files? I’m looking forward for your opinions, I hope we’ll together find some best practices.
Some notes:
This is the beginning of my CSS file.
This is basic structure of my CSS files for easier orientation.
This comments one part of my CSS file.
When this projects goes live I’ll share a link with you to see it in practice. Follow me on Twitter.
I did most of the important work in my career to date using crappy old equipment. Unless you’re editing high-def video or creating feature film animation, you don’t need great hardware to do good work. You just need a passion for the work.
There are literally thousands of content management systems out there. Many of them open sourced or free to use, some of them as hosted services, some of them as classic shareware. And still many of us have an urgent need to WRITE OUR OWN CMS to fit our needs.
In 21. century, when there’s an library for almost everything. When everyone is using some framework. When everyone tends to do different things then reinvent the wheel. Isn’t it kinda stupid? I think so. But…
CMS as we know them are systems of the past. They look and work the same way today as they did in 2000. They didn’t respond to the Web 2.0 (or we may call it a “social networks era”). They didn’t catch the change of the web design industry. There were times when one man could be an expert in every part of web design process. When web sites looked mostly the same (header, navigation column, content and footer). Today we need a whole team to create really great sites. And today’s web sites? They definitely don’t look the same.
Today we tend to play with every word on the web site. And a typical page has a number of important areas, not only one “content” area. For instance your product advertisement, quick info about your clients, embedded Twitter and so on. And not even after a day of searching on Google for some CMS even remotely capable of handling these things, I ended up with empty hands. So the only option remains - to write your own CMS (or something similar) to address your needs.
And there comes the Question (oh yeah, big one). If you worked hard on the text, if you paid a lot of attention to every pixel, how much power should you give your CMS user? Should he be able to edit texts on the site? Or only few defined areas? Should he be able to add images where he wants? And isn’t it better to just ask him to send you an email when he’ll want to make changes? Maybe his site would in the end work much better.
And when building CMS just for yourself, should even you have such a power? Isn’t it better to do the process of changing something on live site a bit difficult to make you think before doing changes? (We all know what happens when you send an email when tired, right?) Is it worth the costs to build an CMS? And if to build one - what should it be capable to do? In my opinion we need something like CMS but I think that what we’ll use in the future will have completely different approach to content, will support social networks etc. Unfortunately I don’t know how it will work or look like. I believe they will be be paid services and they’ll be hosted by some companies, not the creator of the web site. But the rest remains hidden. What do you think?
PS: Note that I’m not talking about CMSs for blogging, it’s completely different situation and I think that current CMSs handles this pretty well.
The CUE-2 teams reported 310 different usability problems. The most frequently reported problem was reported by seven of the nine teams. Only six problems were reported by more than half of the teams, while 232 problems (75 percent) were reported only once. Many of the problems that were classified as “serious” were only reported by a single team. Even the tasks used by most or all teams produced very different results—around 70 percent of the findings for each of these common tasks were unique.
I uploaded my presentation at SlideShare. I’m not sure if it’s to much use without words, but maybe video will come out soon too. It’s in Czech, if someone’s interested in translation to English, please ask politely in comments. But no promises :) I feel pretty good about the presentation and the response of the audience had blow me away. I’m happy you liked it, it was an honor to be a speaker at such a big conference.
So I’m giving a talk about Web Fonts at WebExpo 2009 in Prague this Saturday (17.10. 2009). And because a presentation is a bad place for links I’m posting few of them here. Hope you enjoy them.
There’s so much going on in Web Fonts. Every day there are new discoveries & problems & solutions emerging. I’ll try to keep this list as up-to-date as possible, but no promises.
The bold one are must read for everyone interesting in @font-face.
For a better part of my (short) life I was convinced it does. But lately I can’t help myself not to think that it would make more mess then good.
About a month ago Jeffrey Zeldman published an article “Why Standards Fail”. Among other things he shows there how CSS become so popular. It evolved from a really simple set of rules, which made your web pages look so much better, into an giant and complex standard which, without a doubt, is CSS 3.
To quote Jeffrey Zeldman:
“If CSS had initially offered the power, depth, and complexity that CSS 3 promises, we would still be designing with tables or Flash. Even assuming a browser had existed that could demonstrate the power of CSS 3, the complexity of the specification would have daunted everyone but Eric Meyer, had CSS 1 not come out of the gate first.”
So CSS was made simple, without variables or similar things, and it’s popularity shows it was probably a good decision. CSS 2 and 3 slowly adds more control over typography, layouts etc. And all of that I can choose to use right now because it’s nicely backward compatible - if older browser doesn’t now a property it simply ignores it. Therefore any visitor can read my site, only in modern browsers the site will look a little bit nicer. But who cares if he finds information he needs, right?
And now imagine that we would add variables and nesting to CSS. I would suddenly have a pretty hard choice - to use them and forget older browsers (Or detect them and serve them different stylesheet, which I’m against, so I’m not going to do it. And it’s 2 times that much work.) or not to use them and wait till the old browsers disappear. I would say that most of the people would choose not to use them. So now we would have in CSS something nobody uses and it pretty complicates the language. But shouldn’t we do it for the future?
I simply don’t think so. Why?
We can always use something like LESS. Something that will compile my own syntax which suits me to classic CSS file.
I’m not convinced that we need something like that. Sure selector blocks like those Eric Meyer proposed might be useful. As well as variables. But I’m much more into writing compiling programs than adding more complexity to already complex specification.
When we could add it now to the spec (which we can’t and it would take many years) and browsers would add support into their next version (let’s say it would take about a year) we would have to wait about six years for old browser to leave the market so we would be able to use our new cool selector blocks or variables. 7 years from now. Wow. Will anyone who wants to add those things to CSS now interested in them after so long?
And what do you think? Would you use variables or selector blocks or other similar things? Please comment!
And if you’re interested in using variables and selector blocks in CSS be sure not to miss my next article in which I’ll be talking about LESS and how it allows you to use variables and selector blocks. This was just a small theoretical introduction, hopefully it wasn’t too boring. :)
I’m sorry I didn’t write here anything for quite a long time. But I’m going to change it. Starting today I’m going to publish at least 2 articles per week. If I won’t, well… I’ll do 100 pushups. Sounds fair, right?
In a meantime I would like to invite you to WebExpo 2009, the largest Czech web conference which takes place in Prague from 16/10 to 18/10 2009. There are still avalaible tickets and the program looks wonderful. Among many talks you can find even my talk about Web Fonts & CSS3 (Saturday 17/10, 13:00-13:45, Webdesign & UX Room (E I)) and my best friend’s (Tomáš Jukin’s) workshop about UML and Unified Process (Saturday, 9:00 - 12:30). We’ll definitely look forward to meet you there!
From the topic of my talk you can guess what I’m going to write about till the conference. I have a plan in mind that I’ll be preparing my talk here on the blog and than I’ll ask you, my dear 3 readers, for you opinions and ideas. I’m really looking forward for this kind of cooperation, I hope you’ll be willing to help. I’ll be most grateful!
Few last weeks I’m keep thinking about the concept of OOCSS (Object Oriented CSS, first presented by it’s author Nicole Sullivan at Web Directions North in Denver). It is aimed to make it easy to maintain huge projects with thousands of sites and to make it easy for even beginners to participate in the project.
It works like this: If something on the site looks and behaves somehow it will look and behave the same way anywhere on that site. If you want to change the way it looks you have to add a class to that. The name however comes from related concept of “extending” elements look with classes - in OOCSS is pretty common to add multiple classes to one element. That’s all. Pretty simple, wouldn’t you say?
First time I heard this idea was after a huge project which I have written with the classic coding style - containter element has some class and a look of the content inside depends on the class of this container. This allows you to use CSS selectors at max and produce really nice looking and clean code which is pretty maintainable - well, for coders.
Then the problem comes in - programmers. They are really nice guys but they mostly know only basics about CSS and HTML. So if they want to move something on the page they usually just use cmd+c and cmd+v. And than it’s not working, they want to fix it, you do it and than it all happens again and again and again.
OOCSS promises to set you free of this. But as always there’s a darkside..
You have to change the way you write and think about CSS and HTML. Your code is suddenly flooded with classes, some of them with not really semantic names (what is semantic on .size1of2?). I’m semantic kind of guy, I really love Microformats and RDFa, I think about the meaning of every HTML element, I WANT my classes to be semantic.
Despite that I decided to give OOCSS a try. I want to try if its really going to make a difference for programmers and I wonder how will it work with Microformats - will I need much more classes even after applying them? And what about the diference of the file size - will it be noticebly bigger? Or smaller? And how will it work with LESS CSS?
There’s too many questiong waiting for answers. And I’m really looking forward to explore these things and to share my thoughts. I hope you’re looking forward too.