Thursday, August 11, 2011

Javascript: The Good Parts

In my projects I've encountered many problem involving doing something in JavaScript. First when I've came to problem when I needeed to use it I've searched the internet and found jQuery - which is very helpful. I copied it and it works! Really simple!

But later when I've stucked with some unknown for me problem and nobody could help me with that I've realized something is wrong. I knew really well object programming but here with this strange syntax I was helpless. Then I found this book:,jscmoc.htm

When I read the table of contents I realized what I was missing. After reading it I can now say that I understand what really JS is. Author definetely described solutions for my problems - and now it was clear for me what I was misunderstanding.

In all languages we can always solve one problem in multiple ways - it's up to us which way we preffer, but some ways are easier to do than others and some ways just produce cleaner code. JavaScript is a language in which beginner with experience from other objectives languages can do a huge amount of mistakes. Programming in JS is very tricky, but also very fun. You must ensure yourself that you're really know what you're doing and what's happening in the code before doing something real big.

Author explains typical anti-patterns and shows what dangers are waiting for us if we do something wrong.

So now, after reading this book and several talks with smarter than me I can say that there are very few people who know this language very good - but it's a shame, because I see some perspectives in it. Its popularity is growing really fast in the dev community.

To sum up I recommend this book to every developer.