Step back in time…
I know what you’re going to say “there is only one type of JS!” but bear with me a moment.
I decided that I was going to learn more about JS but when looking at how & where JS is used I categorised it as:
- Client – specifically interacting with the DOM
- Server – code for interacting as a server, I’m thinking Node.js, Rhino here
- Language – JS itself, not linked to browser or server, think C#
For me I wanted to focus on JS the language, in my mind once I understand the language itself using it either on the client or server should be just a case of understanding the functionality and limitations of each environment.
Where to begin
So with my focus on the language I looked around for resources to help me learn looking for books, videos & blogs that would help me.
This is the book that anybody who starts to work with JS is told to read, the book focus’ on what Douglas Crockford considers the good bits of the language, to help you avoid the parts of JS that people frequently complain about causing them problems.
Its only after learning more about JS that I can see whilst this book is good it does limit you to using only part of the language, which if you’re a beginner is a really good but as you progress you can see does tend to limit your use of the language as a whole.
From reading reviews about this book it seems to be like marmite, you either like it or hate.
The book focus’ on objects in JS, which you soon learn are the building blocks of the language and reading it after the good parts I found it helped me understand more about the mechanics of the language lifting the lid on how the runtime works when executing your code.
There is a photo that I’ve seen several times that shows this book side by side with the good parts trying to say that the good parts are only a tiny part of the language.
This book is so much larger as it really does go into the details of exactly how the language works, if you want to understand why “false” == true this explains it.
In the end I primarily focused on pluralsight for training videos, partly because I had some free monthly passes, but also found them very easy to watch and learn from.
With C# being primary language I found this course excellent. It focus’ on JS the language and introduces you to it using familiar concepts from C# and shows you them in JS.
This course is really aimed at people completely new to JS so if you have some experience probably not the course for you but does have some good information for starting to test JS.
C# has structs, classes, assemblies and you can use them to structure your code but other than an object what is there in JS? This course shows you different ways you can structure your code such as closures, module, etc
I found the course really useful as it provided me with knowledge on some key concepts in JS and gave me options on how I could structure the code I was working with day to day.
This course isn’t related to the book of the same name, in fact it doesn’t deal with patterns like Singleton, Iterator, Facade, etc. instead it focus’ on some patterns of using JS usage such as promises.
Whilst the information in the course may not be immediately applicable in your development its good to have in your ‘toolbox’ so to speak.
Blogs & sites
I’ve followed many blogs but have a list of sites with various JS articles as long as my arm, here’s my list of the top few:
- DailyJS – blog daily post with links to interesting JS libraries
- How to keep up to date on Front-end technologies – lists people to follow on twitter, blogs to read, podcasts to listen to, etc.
What have I learnt
For me learning more about the language has helped me to understand the things that people often point to in JS and say its crazy behaviour.
So JS the language is based on objects and you can perform functional-like programming with it, but it isn’t either an object oriented or strictly functional language.
As with any language JS has its strengths and weaknesses and to get the most out of it you need to learn to leverage its strengths and how to mitigate some of the weaknesses often through best practices, patterns, etc.
I’m not going to list everything that I’ve picked up, that would be a long and probably tedious post, but I did make a few notes during the year (though not enough) which I posted on my tumblr. This year I’m trying to blog more so anything new and interesting I come across I’m hoping to post here.
Whilst it may seem that I didn’t cover a lot of ground I’ve left out all the stuff I did around Knockout.js and Angular.js which I was also learnt about during the year (perhaps more blog posts).
Unsurprisingly my plan is to continue learning, and although I read a lot last year I didn’t practice outside of work so as well as reading books & blogs I’m going to be building applications to develop my “muscle memory” where JS is concerned. My plan is to not only practice the JS language but to work with other JS libraries such as Knockout.js, Angular.js, etc and to then extend the apps to the server and use Node.js as well.