Wednesday, June 09, 2010

Poor man's CSS Framework



If you have simple site structure, for example classic: header, left panel, content panel and footer, then it may be an option to skip full scale css framework. JQuery introduced "position" utility. Here is how I stitched my content panel to the left panel:

$('#pages').position({
of: $('#main-menu'),
my: "left top",
at: "right top"
})


No stupid tricks with css margins!
Taking into account that css3 layout won't be ready any soon and taking into account not the best architecture of css overall, jQuery can become layout engine of the choice in the future.

JSON and WCF


Microsoft JSON implementation just pisses me off.

First, they serialize enums as numbers.

Second, this strange date type serialization. Ok, I can understand that jscript has no hint that given string is a date, but when client sends '2001-12-31' to the server, which does know the type, how stupid it is to demand: "DateTime content '2000-01-01' does not start with '\/Date(' and end with ')\/' as required for JSON"???