Re:Recreating the button
by Daniel_Newby on Thursday February 05, 2009 @06:24AM
(#467586)
The article says why: to make it more easily skinnable by simply referencing a different style file. Skinning tables takes more work.
[ Parent
| on HN ]
I see, but I assume(d) that it would be just as easy to skin the 9-slice table method through CSS. But then, I am not a web developer...
You're also adding a ridiculous amount of markup, it's less semantic (you have a table in your button!), and requires use of an image which requires yet another http request. If you look at the "just barely enough to be renderable" mark-up of the G homepage, you'll see that they're really big on conserving size...
I guess you might save a couple of bytes on the markup (but not like an order of magnitude), and I guess you save the HTTP request for that 200 byte image that gets cached. I guess that could make sense for Google. The semantic argument I don't get though - it's not like anyone reads web pages in source view. Unless that's the state of the art in web development and you're literally programming to the browser-metal.
Re:Recreating the button
by Daniel_Newby on Friday February 06, 2009 @02:53AM
(#469509)
The semantic argument is what you get when graphic designers and web monkeys try to articulate separation of concerns. The only way they know to partition a system is at the CSS-HTML boundary, because that's what they were spoon fed. This mindset forces them them to viciously make all HTML human readable: it is their only tool for managing system complexity. They take things like the W3C's statement that tables ought to be for tabular data only as Revealed Truth, to be enforced without question. (Seriously. A lot of them consider violating these principles to be a career-ending move, and adjust their hiring policy accordingly.)
The engineers think that separation of concerns is something the system designer imposes. Does your fancy button use a squirrelly pile of implementation weirdness? No problem, just create a templating mini-language with a simple syntax for expressing a button; hive off the squirrelly stuff into its own module. In their minds, making a button with a 9-cell table is Baby's First Custom Widget, at least compared to frameworks like GTK+.
Naturally there is ... friction between these two schools.