Win a copy of Rust Web Development this week in the Other Languages forum!

Eric Freeman

+ Follow
since Jun 21, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Eric Freeman

Congrats everyone! Thanks so much for the attention to the book. You've all given us some great ideas for where to go from here.

As soon as we have some follow on things (videos, case studies etc) done for the book JavaRanch will be the first to know (we'll post here!).

Totally agree with Louis-Philippe Breton. JavaScript is a great first language, especially if you follow some easy guidelines:

(1) JavaScript didn't come out a heavily peer-reviewed, academic or (until recently) standards-based environment, so it has some quirks. Learn the good stuff, and navigate around the not-as-good stuff (you don't need it). Our book (Head First JavaScript Programming -- not to be confused with Head First JavaScript) teaches from this perspective, and if you really want a long treatment of the good/bad take a look at Douglas Crockford's book "JavaScript: the good parts".

(2) JavaScript gives you a great environment to play in (the browser), that said, knowing HTML & CSS will help you do more interesting things with you JavaScript. So learn them in this order (HTML&CSS->JS), or concurrently.

(3) Don't get too married to the browser environment, JavaScript is a language useful beyond the browser, and you're going to want to understand languages down the road that aren't browser centric.

(4) Start simple--this is the real advantage of JavaScript (and why it's so popular), you can start very easily. And grow your knowledge from there. Start with variables, iteration, conditionals, and then move on to collections (arrays, etc.), then simple objects, simple functions. At that point you can start to move on to advanced topics like event-based programming, object construction and orientation and high-order functions/closures.

(5) Try not to get hooked on libraries too early. Work with the bare technology and understand it, and then you'll truly understand the libraries you're using, and how to best use them.

Hope this helps...

The other aspect too is the "bringing it all together aspect". Not only bringing all your JavaScript knowledge together, but combining it with markup and CSS. Rather than expand the book, we're thinking of doing this as an online video where we build a music step sequencer (or you can think of it as a drum machine, somewhat similar to the one in Head First Java), which is great for using lots common JavaScript techniques (async programming, events, timers, modifying the DOM in "real time" and using an API). This would be a multi-part video where we step through every aspect of building this together.

What do you think?

The first thing you have to get used to up front is that JavaScript's idea of "OO" is a quite different take of object orientation. Unless you've spent time around languages like Self (or say, NewtonScript, anyone? anyone?), it may seem quite foreign to you. JavaScript uses a prototypical model for OO, not a class based one. As has been mentioned, discussion of which is often becomes a religious argument (although I'll just say that a class-based OO system is more easily subsumed by a prototypical one, than vice versa---proof left to reader).

Prototypical inheritance is a powerful thing, but like a lot of JavaScript it has a dynamic, training-wheels off nature to it. You can do a lot with it, but,not to overuse my popular culture references, with great power there is great responsibility.
Right, we definitely spend time on closures and treat it as an important topic. Recursion was left to the "things we didn't cover" (which ironically means we do cover it, just not in great detail). I will say that if you get through the book, recursion will be a incremental step to understand. Recursion sounds like a great topic for some additional online content.
Right, agreed with Elisabeth, at your level the book will be useful if you still need to nail advanced fundamentals like JS scope, closures, constructors. It's easy to get a lot done with JavasScript and not know some of the finer details. The type system is another place that it's worth spending some time on (in particular in areas like truthy and falsey values and other JS weirdness).

Hi all! Sorry to be late to the party, but glad to be back on JavaRanch... sorry CodeRanch. It's been a long time!

Personally I like the fact that we're really embracing the way developers write HTML, and rather than going off on a strict, XHTML type language, we've gone to HTML5, which supports the past. Things are both simpler and more forgiving. If interested, you might want to look at all the design principals that went into HTML5, which you can find here:

That said, I love the new APIs, it really allows us to start building pages that feel like applications.

Another resource you might want to look at for a quick introduction, is our recent webcast on O'Reilly, it is available here for free:
My two cents: when we looked at what people needed to make the transitions from HTML to using HTML5 and its APis, it was JavaScript. It's a big transition from working in the land of structure and style, to one of behavior and interactivity (interactivity in a few ways - in the page, with the web, etc.). We then asked ourselves if (1) readers were ready to jump in after reading HF HTML, or if (2) it was a good thing to point them to HF JavaScript and let the read that first.

For a number of reasons we didn't think (1) or (2) worked above, and JavaScript was so core to the HF HTML5 mission, we needed to attack it and attack it in a way that you could get maximum benefit from in your goal of learning HTML5 (not to mention, how to create web apps with HTML5).

So, the big difference is that we've written the "straight line path" to learning the JavaScript you need to approach the material in the book. Sure, you'll still have some work to do in fully becoming a JavaScript professional, but we do all we can in < 700 pages to get you there and up on the most important HTML5 Apis.

Hope this helps!
Thanks, glad people are enjoying the format and the books. What topics do you want to see in the future in this format?

For starters the geolocation API, along with local storage and offline support. Beth will probably have some comments on the CSS side.

Thank you!

A couple things:

(1) we are looking for reviewers/readers for an update of the second book.

(2) we'd love feedback on topics in HTML5 that you'd like more material on (video instruction etc)

Agreed with all Elisabeth said, you've got the right foundation with HTML/CSS, now you just need to add the computational side (JavaScript).

I'm not close enough to metro to know how they are handling the various libraries. Would love to hear from someone closer to it how this is setup. Are these just JavaScribe extensions, or something more proprietary?

Let us know what you think!