• Post Reply Bookmark Topic Watch Topic
  • New Topic

jQuery in Action: did you add a whole lot of examples and explain them?  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm looking at the reviews for the 2nd edition, and it said there are very few examples. Did you add a whole lot of example and explain them because that's the most popular report of the 2nd edition according to amazon reviews. I've read some javascript (half a book), not strong in it at all, but I'm wondering will I get lost in this book? I've read the other thread where you said it'll be okay if someone has some javascript experience.

Thanks.
 
Author and ninkuma
Marshal
Posts: 66729
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

ganon wanewbie wrote:I'm looking at the reviews for the 2nd edition, and it said there are very few examples.


To be honest, I was confused by that review. Other reviews point out that there are plenty of well-explained example in the 2nd edition, and yes, the 3rd edition adds many more.

I've read some javascript (half a book), not strong in it at all, but I'm wondering will I get lost in this book?


The book does assume you have some JavaScript experience. But there is an appendix that talks about JavaScript concepts that you may not yet be strong in that are needed to use jQuery effectively (namely functions and closures).

If you feel you need more than is offered in that appendix before reading jQuery in Action, then I'd recommend Part II of my Secrets of the JavaScript Ninja book which explains functions and closures in much more detail than was possible in the appendix.
 
ganon bie
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Bear.

1)
How does your JS Ninja compare with the Good Parts? Some on the review say that's too dry. You've referred me to the 2nd half of the Ninja book. One review said this about the 2nd part: "Much of the second half of the book is various nitty-gritty details about coding around all the cross-browser and language-version and interpreter-implementation issues one runs into. Specific examples of the various quirks and workarounds were sometimes so bizarre it was clear there'd be little chance of an individual ever solving them. My overall takeaway from the second half of the book was that in almost all cases one should code to some sort of covering library (like jQuery) that handles all the quirks in a transparent way, rather than to Javascript directly. (I also picked up the suggestion Javascript would be easier in some future where IE6/IE7/IE8/IE9 have only insignificant market share.)" I don't get it.. I thought we should use / learn JQuery instead of doing things manually.

2)

The book that I have is Beginning Javascript 4th edition by Paul Wilton and Jeremy McPeak. 2010. The book is exceptionally clear on subjects in my opinion, and verbose. The topics are:
1- intro to javascript
2- data types and variables 17
3- decisons, loops, and functions. 51
4- common mistakes, debugging, and error handling. 87
5- javascript , an object based language 133
6- programming the browser 189
7 - html forms: interacting with the user. 219
8 - windows and frames 263
9 - string manipulation 301
10 - date and time and timers.347
11 - storing information: cookies (do people actually still use this?? i thought people are using sessions)367
12 - dynamic html with w3c document object model page 391
13 - using activex and plug-ins with javascript 469
14 - ajax page 491.
15 - javascript frameworks page 527
appendix a - answers to excerises. 591
appendix b - javascript core reference 665
appendix c - w3c dom reference page 697
appendix d - latin 1 character set. page 725
index page 733.

Currently, I'm looking at javascript code at my internship and trying to read through this book. currently on page 269.

What topics are required going from my book to your JQuery book or even your Ninja book? I read that your ninja book isn't exactly for beginners? From your reply, I would need to know about closures. Personally, I found the syntax of the js functions difficult to remember .. I'm coming from a java background. Am I way behind or ..? My original goal was to finish the book I have and then move onto the Good Parts and JQuery.

3)
How does learning JQuery on the JQuery web site compare with your Ninja book? I hear from my coworker that the JQuery site has pretty clear tutorial.
I hope you didn't mind that I posted the above book and page numbers - I did so for you to have an idea of where I'm at.

4)
Lastly, according to the reviews, it said that the book is mostly written by John? In looking at the reviews for John's 2006 JS book Pro JavaScript Techniques:

"I agree with only one other reviewer who commented on the typos, etc. The demo code does not work until you debug it. The first couple of chapters on Javascript code are very good. The chapters on Forms (8) and Lightbox(9) are so poor I stopped reading. I am a jQuery user and admire Resig's contribution, but this book should be skipped."

I then looked under John again and see that he has the 2nd edition Pro JavaScript Techniques, 2015. No reviews. It's 400 pages. I have no idea if that book is full of typos and again need to debug it. I'm curious between the difference of "2nd edition Pro JavaScript Techniques, 2015" vs. your ninja book that you also co-authored with John.

I looked here for John's 2nd edition of the book:
http://www.apress.com/9781430263913

Professional JavaScript Techniques
Features, Functions, and Object
Creating Reusable Code
Managing JavaScript Code
The Document Object Model
Events
JavaScript and Forms
Introduction to Ajax
Other JavaScript Libraries
The Future of JavaScript

VS. your Ninja book:

http://www.manning.com/resig/excerpt_contents.html
Well, it appears you cover far more topics? I'm not sure if John's 2nd edition book covers closure etc.

As for Javascript: THE GOOD PARTS, that's 2008! But it does have Closure. Is the Syntax out of date in that 2008 book? My major worry with any book is ambiguity, or worse, difficult if not impossible to read / understand because I tend to require things to be verbose and use of words clear and defined, otherwise, I would be re-reading it again and again, and just go into frustration mode.

I also do have a copy of "JavaScript and JQuery: Interactive Front-End Web Development" - bought it because I thought it had tons of reviews, but I found the explanation not verbose enough where I'm lost / have more questions due to ambiguity. That went back to the shelves, and the binding was horrible! I did find Beginning Javascript 4th edition to be very good because he literally explain through the code, but unfortunately, it's dated, 2010. Closures is on page 501, and maybe just one sentence or so if not a page?

Thanks for your time, and hope you don't mind be writing so much.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66729
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

ganon wanewbie wrote:How does your JS Ninja compare with the Good Parts?


The two books take very different approaches. Good Parts is Crockford's take on what he sees as how to use JavaScript, while Ninja strives to explains how JavaScript works so you understand what the code is doing. I can see an audience for either approach.

You've referred me to the 2nd half of the Ninja book. One review said this about the 2nd part:


He's actually talking about the 3rd part.

"Much of the second half of the book is various nitty-gritty details about coding around all the cross-browser and language-version and interpreter-implementation issues one runs into.


Yes, that's exactly what part 3 is all about The reviewer apparently did not read the preface well if he was disappointed that the books covers exactly what we said it would.

What topics are required going from my book to your JQuery book


Two important concepts are functional programming and closures. Appendix A fills in anything that people might be missing.

or even your Ninja book? I read that your ninja book isn't exactly for beginners?


It's not. It assume you have some JavaScript experience. We don;t explain what a variable is, or what a loop is. You are assumed to understand rudimentary programming and JavaScript. You are not expected to understand functional programming or closures. That's what part 2 of Ninja is all about.

I'm coming from a java background.


As have I, and many others. Sometimes it seems that's a disadvantage. But as long as you approach JavaScript with the knowledge that it's not Java and shouldn't expect it to be Java, you should be OK.

How does learning JQuery on the JQuery web site compare with your Ninja book?


It doesn't. Ninja isn't about using jQuery. The latter parts are about the lessons learned about JavaScript while developing jQuery.

I hear from my coworker that the JQuery site has pretty clear tutorial.


It is a good reference, which is very different from a tutorial.

Lastly, according to the reviews, it said that the book is mostly written by John?


How would a reviewer know that? Let's just say that I put two and half years of effort into the book.

"I agree with only one other reviewer who commented on the typos, etc.


I have not read John's other books and cannot comment on their reviews.
 
whippersnapper
Ranch Hand
Posts: 1843
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As an aside, I tried reading John Resig's Pro JavaScript Techniques early in my JavaScript career, on the advice of a colleague I greatly respect and admire. She loved it. I found it very difficult to understand and put it down and never finished it. It's in a pile on the far corner of my desk at work. Within easy reach are Bear's books and Stoyan Stefanov's. Crockford is kicking around somewhere too. Eloquent JavaScript by Marijn Haverbeke is a wonderful, odd piece too. (I've only read the second edition of that. The third is greatly expanded.)

(Colleague I greatly respect and admire and I used to play "dueling JavaScript authors." She was a fan of Karl Swedberg and his jQuery book. (She went to his training class years prior.) I am a big fan of Bear. We both agreed and disagreed with many points of Crockford.)
 
Michael Matola
whippersnapper
Ranch Hand
Posts: 1843
5
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Allow me a moment of fanboyism, if you would, please.

Bear Bibeault wrote:You are not expected to understand functional programming or closures. That's what part 2 of Ninja is all about.



There's a bit in the chapter on functions where Bear & John (may I call you Bear & John?) are working up to the example of implementing your own forEach method. The discussion points out that in imperative programming you might pass a collection into a function/method and write some code inside that loops/iterates the collection and performs some action on each item in the collection. Then it goes on to show that in more functional programming you'd more likely write a function that operates on a single item and pass that function as a callback into another function (each/foreach/$.each/whatever) that handles the looping/iterating and calling the function with each element as the function context.

I've been writing code like that for some time, but didn't fully appreciate the shift in mindset until I read that chapter. (I'm also more comfortable now with call(), apply(), and bind().)

(I've also also pointed out to colleagues several times -- why are you doing a for loop here? why not jQuery each() or $.each() (or _each())? or do you realize that each() isn't even necessary here because if you pass in a function at this point in the jQuery chain it'll call the function for you on every element in the jQuery set for you already?)

 
ganon bie
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


"How does learning JQuery on the JQuery web site compare with your Ninja book?"
It doesn't. Ninja isn't about using jQuery. The latter parts are about the lessons learned about JavaScript while developing jQuery.



My mistake, I got your took books mixed up. The question should be "How does learning JQuery on the JQuery Web site compare with your jQuery in Action book? See below.

I hear from my coworker that the JQuery site has pretty clear tutorial.
It is a good reference, which is very different from a tutorial.



Bear, to confirm, your JQuery book IS a tutorial? Thanks.
 
ganon bie
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear, do you have an early MEAP release for the next edition of JavaScript Ninja by chance? Not sure if I should buy the Ninja or go for the MEAP Ninja if you have one.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66729
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no MEAP for any future editions of Ninja.
 
ganon bie
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear, is your JQuery Book a tutorial?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66729
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is intended to teach you how to use jQuery, and to use it effectively. To that extent, yes. But I usually the work "tutorial" to mean short, web-based article, and the book is much more than that.
 
ganon bie
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66729
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:There is no MEAP for any future editions of Ninja.



But now there is! It's finally gone public.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!