“You know CSS, right?”

Posted by amy on June 29, 2007

Sure, I know CSS. Just like I know Javascript. But then your CSS does something weird, and you can’t figure out how to fix it, and you look online and you find stuff like this:

Be aware that most of the demos in this site employ the Holly hack to work correctly in IE, but now IE7 fails to read the old star-html hack which was the vehicle for feeding the Holly hack hasLayout fix. Further, IE7 cannot be shown a small height to trigger hasLayout as has been customary.

Or this:

Liquid layouts have their own problems in the wide screens, stretching both text lines and designs beyond belief in some cases. Besides the obvious, Explorer for Windows can also have very nasty bugs in liquid layouts when rigid content that shares space with floats happens to “lock up” the page width. When that happens, the bad old 3px bug induces content dropping, and the only cure is to use min-width to stop the shrinkage before lockup happens.

Unfortunately, IE does not support min-width as well as it supports the 3px bug, so a JavaScript is then needed to coerce compliance in IE. It’s a big pain in the you know where.

Really?That’s a big pain? You’re kidding me.

Anyway, all I want is for my footer to stay at the damn foot. This is only possible, apparently, if I can tell you in advance which one of three columns will be the longest. Or maybe there are some weird hacks that no longer work in IE7 that I could use. I’m not quite sure, because it turns out that CSS is not, as I’d previously believed, a mere aid to ensuring that your design is consistent across web pages and your html not too big, but an arcane alchemical pursuit, complete with footnotes.

More thoughts on this, but it’s my birthday, and apparently my son has bought a cupcake to share with me, that must be shared RIGHT NOW!

JSON, XML, and REST

Posted by amy on May 02, 2007

Last time I paid attention, XML-based web services were the next big thing. My informatics department was very cutting-edge, implementing web services for our apps to talk to one another and to our company’s intranet portal. XML was the big thing you had to know. It seemed enormously complex and confusing, and yet at the same time, simple. At the bottom, XML was data. People piled more and more stuff on top of the data, and made more and more tools to parse the XML that surrounded the data, and insulate us all from the XML, even though the whole point of XML was that it was supposed to be human-readable data.

It got to be that every single job posting you ever saw demanded that you be an expert in XML. This was ridiculous, since to the extent that XML is simply data it means nothing to be an expert in it, and to the extent that it was all the crap you threw on top of the data, it was impossible to be an expert, because even the experts weren’t experts.

Anyway, now all the cool kids are throwing XML out the window, and using JSON to send data back and forth to each other. JSON sounds incredibly dubious since it’s based on Javascript, and you all know what I think of *that*. But even javascript can’t quite manage to screw up the basic data structures, so maybe it’s fine. In addition to throwing XML out the window for data transfer and remote procedure calls between apps, the cool kids now hate it for configuration files (Rails people use YAML, for example.) And also, everyone’s web apps must be RESTful, a thing I don’t totally understand yet but which definitely means *hyperlinks should never, ever have side effects*.

The moral of this story is that by ignoring the world of software for a couple of years while being on the mommy-track, I have avoided, I hope, ever having to figure out what all those fifteen thousand XML standards meant, and jumping in now, I am no further behind on technology than all those other people who are still trying to grok what it means that Rails Edge now supports fully RESTful URL routing.

The Web, 2007: Why does javascript still exist?

Posted by amy on April 25, 2007

Oh, man. AJAX.

So I’m working through the canonical rails text, Agile Development in Rails, and I’m breezing along, thinking “this rocks!” The last web app that I wrote, back in 2002-ish, was a Java/JSP thing, with some web services thrown in, toward the end. I had some exposure to Ant, JUnit, and the other open-source tools people were starting to use then, but not a lot. STRUTS was still bleeding-edge.

Anyway, so that web app I wrote at Millennium, for the Mol Path department, was an enormous undertaking, at least for one not-very-experienced developer. Legacy code, legacy database, ties to 5 or 6 other systems, disgruntled and demanding users, the works. I worked my ass off on that app, and most of the functionality of most of the code I wrote is now provided, from the start, in Rails. I’ve been breezing through the rails tutorial, excited as all get-out to think how much more quickly one can develop web apps with rails. It’s all awesomeness.

And then I get to AJAX. And I cringe. Because ye gods, I hate javascript with a fiery passion. I hate the DOM. And yet, if I want to write code, and I do, desperately (I’ve done doc-only gigs, and it’s not my favorite thing), then I’ve got to know the DOM. I have to fiddle with the CSS, make the shopping cart update on the fly, zoom the links, and all the rest.

Why is javascript still around? Why doesn’t someone, you know, standardize it? Why can’t it work the same way in all browsers? Why does IE have a “quirks mode”? I have long been convinced that javascript was invented to drive programmers insane. It looks sort of like a programming language, but actually it’s voodoo. I know with Rails I get to stay pretty far away from the actual javascript , thank goodness for small mercies, but still, not as far away as I’d like to be. And again, why is javascript still around? Still around, and used more now than EVER?? Grrr.

Still and all, Rails is damn cool.