Petri Wessman's weblog

Life wins, slowly

Spent Sunday at the salle, Ilkka held a seminar on Bolognese sidesword and dagger techniques. Was a lot of fun, once again, and it’s really nice to be back to normal health (if not good shape, yet). I had a really long-term flu / throat infection thingy, and since that carries a small but non-zero danger of heart injury it you exert yourself too much, that meant a month+ of no exercise for me. Which was doubly nasty because the flu wore me down and the lack of exercise did the same. Finally felt well enough to come to the salle last Monday, but a month’s pause in training shows. Oh well. It’ll come back, it always does.

The training, I mean. The flu can stay away, as far as I’m concerned.

I’m also slowly waking up to the fact that Christmas will soon be here. I’ve only begun to think about presents, and only have a few taken care of so far. So… some shopping this week.

Work has been really interesting (if very busy) during the last month or so, since I’ve managed to convince my bos(ses) that doing a certain new app with Rails, with a REST datasource in our Java/JBoss main server end, is a good idea (and I honestly do think it is a good idea). This means that I’ve been coding Ruby/Rails a lot, and also tinkering with some lesser-known aspects of it like ActiveResource. It took a while to puzzle out the HTTP/XML format Rails expects and to duplicate that on the Java side, but once it’s in place it’s pretty impressive: the Rails app can now get a data feed from our server with just a few lines of code, and that feed behaves in many respects like a normal ActiveRecord database object. Cool stuff. I’ve also dived into testing with rSpec, with heavy use of mock objects and dynamic fixtures (since I want to keep the tests independent of server data). Figuring out HttpMock took a while, but now that also works.

Rails rocks, it’s by far my favorite wep app framework nowadays. Nothing else comes even close.

Added later: …though I do have to say that some of the lesser-used facets of Rails (like ActiveResource, especially with nested resources) can be pretty poorly documented, or not at all. I’ve quite often had to resort to hacking the Rails core code to figure out what the hell is going on. Today has mostly been spent in figuring out how the hell I can actually create nested REST resources. Finally figured it out, but it wasn’t exactly documented anywhere I could find. Today’s headaches also include puzzling out the exact XML format for server-side validation errors (no, it’s not what the docs claim it is) and in working around the fact that the XML formatter wants to turn all underscores into dashes in element names. Sigh.

Rails still rocks. But prepare to enter “Here There By Tygers” territory if you use some of the more bleeding-edge facets of it.

Published on by Orava, tags , , , , , , ,

comment Life wins, slowly

Trackbacks are disabled

Powered by Publify – Thème Frédéric de Villamil | Photo Glenn