learning javascript/reality check

January 09, 2009 / 12:04

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.

blog archive

All my articles are neatly filed inside the archive. Search and filter your way to the article you like:

contact me

If you want to leave me a quick message or you have any questions, drop me a note.

Comment author
3 comments in total
h3
January 09, 2009 16:49

A lot of people think of frameworks this way and obviously knowing a JavaScript framework does not makes you a better JavaScript programmer, I agree.

That said, JavaScript frameworks are not designed to be a gateway entry for people who know nothing about JavaScript much like Django isn't designed for people who don't understand Python.

Frameworks exist so we can avoid reinventing the wheel over and over. Think of it as a toolbox, it's designed to make your life easier and more productive while avoiding common pitfalls and repetitive tasks.

If the flagship of a framework is something like "make awesome things even if you know nothing about ", it's probably not a good framework to start with.

In other words, if you use a framework you should be able to understand what it does for you and how it works. If not, your experience with that framework has good chances to be disastrous.

Personally I consider myself as a JavaScript expert and I could not live without jQuery anymore. I have already enough browser inconsistencies to manage, jQuery gives me the JavaScript consistency I need to stay sane.

January 10, 2009 17:11

Completely agree with you there, but many people still make the mistake of thinking a framework allows them to use something without knowing anything about it.

Now most Javascript frameworks are pretty solid to begin with, I've tried out some css frameworks myself and none of them was very helpful. I guess my main issue with frameworks comes from seeing too many html page constructed with jsf components and whatnot (I'm talking breadcrumbs implemented as a string of buttons, each having their own form with the action attribute being the link value).

January 13, 2009 18:25

It is always a tricky one, I've heard advice from loads of people that you should make sure you thoroughly understand a framework before using it in anger. I tend to take a pragmatic view though. Would it help me to drive better by knowing how the internal combustion engine works, probably yes but it isn't essential and there are plenty of people who manage to drive perfectly well without knowing anything about the mechanics of a car.

* required fields

Leave your data
Leave a comment