First steps in Javascript

I haven’t been in much of a coding mood lately, thus the scarcity of posts. But I think that’s changing. Today I made my initial foray into Javascript coding. At work we’re porting our genealogy extraction software to the web, so I’m writing some code to manage the thumbnails. Right now I’m not using any extra Javascript libraries (Prototype or Dojo or whatnot), because I want to get a feel for what plain Javascript is like. Then I can actually appreciate the benefits of the other libraries. :)

My first impression is that Javascript is actually pretty fun to code. Easy, too. I should’ve started learning it years ago…

Back to the thumbnails, the next step is to implement a draggable preview. On top of the thumbnail image we overlay a slightly transparent rectangle showing which part of the image is in the viewport. The user can draw a new rectangle on the thumbnail, which then moves the viewport to show that part of the image. Kind of like the rubberband select in fluxiom. I’ve got to figure out how they did that…

Come to think of it, though, I wonder if this thumbnail navigation is even useful. I don’t think I would ever actually use it — the normal navigation via the main viewport would be enough (along with keyboard shortcuts). The thumbnails would mainly be useful for choosing which image shows up.

Well, enough thinking aloud. :) It’s been forever since I did anything with Ruby or Rails, and that needs to change. Finals are this coming Wednesday and Thursday, so life’ll be a little hectic, but then I’m done with classes till September. ~sigh of relief~

Update: I forgot to mention how incredibly helpful Firebug has been so far. In fact, I can’t imagine what web coding would be like without it. Seriously.

No comments yet

Leave a Reply