Here are a couple book recommendations for those of you looking to improve your JavaScript: "JavaScript: The Good Parts" by Douglas Crockford "JavaScript Patterns" by Stoyan Stefanov
Preparing Yourself for Modern JavaScript Development
11–20 of 75 posts
Re: Preparing Yourself for Modern JavaScript Development
#12Here are a couple book recommendations for those of you looking to improve your JavaScript: "JavaScript: The Good Parts" by Douglas Crockford "JavaScript Patterns" by Stoyan Stefanov
The Crockford book is 4 years old now, is it still considered to be a good book to pickup? I've done JS off and on for a while, but mostly haphazardly (with an emphasis on the hazard). I'm looking to start doing some backbone.js and jquery and a book to help start off with it.
Re: Preparing Yourself for Modern JavaScript Development
#13Earlier quoted context omitted.
I've been working on following the good parts for my latest project. I've started to cringe any time people talk about the prototype or using "this"
That's unfortunate. Properly using prototypes and "this" is the only way to do high-performance JavaScript with objects. Get cozy with them -- they're useful.
Re: Preparing Yourself for Modern JavaScript Development
#14(function(){//do some work})();
Re: Preparing Yourself for Modern JavaScript Development
#15This is a nice, gentle introduction, but if you're going to start using modules you might as well go slightly farther and use something like RequireJS ( http://requirejs.org/ ) or Browserify ( https://github.com/substack/node-browserify ).
Re: Preparing Yourself for Modern JavaScript Development
#16I always find it odd that the same developers who deride PHP look at things like IIFE and think "wow, JS is a cool, modern language!" Thanks for the article though, if I ever need to write some JS this will help keep me a little more sane.
And even those Scheme uber-nerds considered it big hack, more useful in theory then in practice.
Re: Preparing Yourself for Modern JavaScript Development
#17Earlier quoted context omitted.
The Crockford book is 4 years old now, is it still considered to be a good book to pickup? I've done JS off and on for a while, but mostly haphazardly (with an emphasis on the hazard). I'm looking to start doing some backbone.js and jquery and a book to help start off with it.
Despite being a small book you can ignore a good third of it, and I think his constructor pattern is out of date? but - it does do a good job of explaining the actually idiosyncratic thing about js - the whole prototype chain thing, and the scoping.
Re: Preparing Yourself for Modern JavaScript Development
#18I'd be interested if one of these articles on modularity also addressed testability. For example, the IIFE pattern in the article: (function(window, $, undefined){ //do some work }(window, jQuery)); If instead of immediately executing this function, we kept a reference to the function, then reference it, the function can be supplied with mocks for testing. Obviously there's an issue that you'd pollute the global name…
oldJQuery = jQuery;
jQuery = mock;
//Run module
jQuery = oldJQuery;
Remember that IIFE's are basically equivalent to variable definition and assignment. The only reason we even have to go through the trouble of using them is due to JS not having block scope.Re: Preparing Yourself for Modern JavaScript Development
#19It's amazing how few tutorials there are out there that fill in that gap between being a traditional web developer versed in .net / php and knowing the basics of javascript to being an actual javascript coder.
Most articles and tutorials around the web seem to target the beginner while most hacker news front page pieces target the advanced coder who already understands closures / prototypes etc and there seems to be very little in between.
Re: Preparing Yourself for Modern JavaScript Development
#20Here are a couple book recommendations for those of you looking to improve your JavaScript: "JavaScript: The Good Parts" by Douglas Crockford "JavaScript Patterns" by Stoyan Stefanov
The Crockford book is 4 years old now, is it still considered to be a good book to pickup? I've done JS off and on for a while, but mostly haphazardly (with an emphasis on the hazard). I'm looking to start doing some backbone.js and jquery and a book to help start off with it.
It's not about modern web techniques, which is why it aged that well. For those, I'd personally recommend pulling apart some modern webapps or libraries, or reading modern tutorials. Usually you're somewhat outdated once your book reached its publisher… (Having said that, JavaScript Patterns is also pretty neat)