Sunday, August 17, 2014

First Javascript function

Well, I put it off for years. Today I wrote an (albeit short) javascript function to toggle a check. I find the checkbox with the name specified, and set it to on. I meant to have a much more rich selection of all items by name, but I was getting confused between the code I was using to call this, and the code I was writing in.

I think the web developers deserve credit for existing in three levels and three languages simultaneously (php/perl/python/ruby/whatever for programming the server, html/css for presentation, and javascript for manipulating the page content and animations). When I was using lisp more, I think I would have solved this problem by moving one syntax into each of the three domains, and maybe adding a translation to the outside language. I'd have to look more into hunchentoot and seaside to see if this is how those are done. It looks like the dominant pattern now is a rich set of client side processing in javascript/jquery, and a gradually thinning server side logic for persistence and ubiquity.  I don't think I can ignore javascript any longer, and may need to make this my next language (along with relearning python at a functional competency.)