learning javascript
I've never been a big fan of frameworks. They are often clunky, contain a lot of excessive features and most importantly, they make things a little too easy, hiding many common problems behind a screen of smoke and preventing you from really getting to know the ins and outs of a language. But rather than explain myself, I usually give out a link to an article on 456 Berea Street which describes the problem a lot better than I can.
hitting a hard wall
Then came the day that I wanted to update my blog and remove all the obtrusive javascript present. Now, I've worked with javascript before, my masterpiece being a back office application that contained more javascript and ajax than it had html. A truly magnificent disaster that was impressive to look at but failed to pass any serious accessibility test. Long gone are those days and I wanted to create javascript code that was clean and unobtrusive.
So following my own advise, I was supposed to dig into the whole unobtrusive javascript thing. After doing a whole xhtml rework on the site, creating new templates for my gallery, re-engineering my back office and css the whole damn thing again, somehow the appeal of starting to learn javascript from scratch was not all that appealing anymore. Even more so because I'm quite aware of all the browser inconsistencies that exist within javascript.
So I did what any curious web developer would do. I went to the jquery site and downloaded their library. In secret of course.
magic moments
I have a background in javascript, but I haven't been occupying myself with it for a pretty long time (maybe the last javascript thingy I made was three years ago). After about 30 minutes fiddling with the jquery library I made myself a whole tab-pane which worked in every browser and degraded as gracefully as a ballet dancer, only making use of my own html. I was quite astounded that it could actually be this easy to get something done with a javascript library without resorting to pre-made components.
Of course it was a big help that I could directly target elements on a page using css selectors (quite sad though, seeing a javascript library that has better css support than a certain unnamed browser family), but the syntax too was incredibly easy and intuitive, and the built-in functionality seemed to be tailor-made to the needs of a modern web developer.
all hail the libraries?
Even though jquery did help me to set up the needed javascript in no-time, I still believe that a language is best learned from scratch. Maybe I've managed to write some nice and unobtrusive javascript code, I realize that I learned very little of the actual language this way. And when I run into some trouble later on I'll have little to no knowledge to fix them. So don't claim to be an expert in whatever language if you only know how to work with a certain library.
Still, this experience did teach me something. While I still believe that no library can make you an expert in anything, it could be a good starting point for learning a specific language, especially if you lack the time and as long as you make up for that by digging into the more detailed issues afterwards. As for the results of my jquery adventures, I hope I'll be able to showcase them by the end of this month.