p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 (http://p2p.wrox.com/forumdisplay.php?f=174)
-   -   What do you want to see for 2nd edition??? (http://p2p.wrox.com/showthread.php?t=39821)

nzakas March 14th, 2006 06:53 PM

What do you want to see for 2nd edition???
I'm starting to pull together topics that weren't covered in Professional JavaScript to create a proposal for a second edition. My question to you, the reader, is this: what do you wish was covered that wasn't? Is there anything you'd change? Anything you think wasn't worthwhile? Post it here and let me know!

Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)

afisk March 16th, 2006 09:54 PM

Hi Nicholas-

First off, great book. I've read quite a few books, and I found yours to be the best by a good bit, although I must admit I haven't checked out some of the more recent AJAX releases. I'm more of a Java developer (I wrote a solid portion of the p2p app limewire), so I don't really know JavaScript as well as I'd like. Coming from the Java world, I find the all-in-one-file, functions flying around nature of JavaScript unsettling. It's clearly a great language that incorporates many of the nicest features of other languages, but it's almost the fact that it can do so much that makes it daunting.

So, I guess for me some sort of best practices guide would go a long way. I still don't really know what it means to write good, maintainable JavaScript, whereas I have 20 or 30 tools in my arsenal for doing that with Java. I know they're out there, but I just don't know what they are. I'd love to see something like "Effectice JavaScript" in the "Effective C++" tradition.

I think this is all basically the result of the fact that web developers have been the primary users of JavaScript up until now. I remember when I noticed this shifting in 2002 when a colleague of mine left for Google and starting doing almost exclusively JavaScript code. I thought, "what, you're writing JavaScript?. How horrible!" I didn't appreciate what a great langauge it was at the time, and I did not see the coming revolution with google suggest and everything that came after it (I know there was cool XmlHttRequest stuff before, but I just didn't know about it). Anyway, I feel like JavaScript hasn't really matured in the programmer community from a tools and methodology perspective, and it would be great to see that happen!

Detailed discussion of sciptaculous and prototype might be interesting too if you thought it worthwhile.

By the way, you want a job? Seriously.


schelti March 19th, 2006 01:29 PM

Hi Nicholas

I really like the table-sort script in your book, but it doesn't sort links like <a href="...">someLink</a>

Maybe in the 2nd edition?


ufo April 18th, 2006 10:25 AM


I have some ideas for future versions of the book...

First of all, what got me stuck for quite a while is that IE does not support innerHTML in tables or table elements... Now that's the kind of bugs to keep you going for a while... Maybe it is interesting to mention that at the section where you explain innerHTML, to save people's time in the future...

I think the XMLHttpRequest is really the powerful discovery I made when reading your book... This really allows interesting programming... making a javascript client handling the browser, without really ever having to refresh...
It also allows you to make any 'form' elements you like (graphical rollover menu's for a select for example), without even making forms, now that's power... maybe that's nice to mention so people realize this power.
Also you mention you can do any http request with this,not only get and post... I think http protocol is known by to few people, as for myself... I am now trying to find out what other interesting possibilities there might be in XMLHttpRequest... Maybe something to add also to go in a little deeper.

Apart from that, I must say like everybody else, this is the best book on javascript...congrats

(maybe i want to add what makes it so good for me... It seems that the ecma commission did half work on the javascript language (javascript offers much less functionality than most programming languages). On the other hand, they made it so abstract that you can almost rewrite the language (unfortunately you can't define new keywords like 'Class'...[xx(]). This gives a language which is powerfully abstract, but utterly user-unfriendly... Not a good thing for web development, where lots of developers are not programmers... It is like saying to students, write the other half of the language yourself, while you are learning it... DUH. This book seems to be a fair part of that other half, which turbostarts a student to understand how you can expand javascript. I don't think many other books do that. Also it offers cross-browser solutions that are neat and tight, where i found the browser compatibility sections in other books usually a bore...)


jheffernan May 18th, 2006 07:40 AM

I have not finished the book (on Chapter 14) but I would love to see more on making menus especially nested menus and menus that rely on the first (second, etc) selection to narrow down the next choices...

ninejaguar May 29th, 2006 01:00 PM

While I'm still going through the book, I'd like to mention that I'm finding it clear, thoughtful, and full of insight. But, since you asked for suggestions for a second edition, I thought I'd add my two cents. This isn't a criticism of the 1st edition (I'm not done yet, but I already suspect it's probably one of the two best books on JS out there). It's just that you asked for suggestions...;)

After reading a few things on the web, I'm beginning to understand that JavaScript can actually be considered a Functional programming language, and has quite advanced concepts such as Closures, which your 1st edition touched on briefly (kudos on even mentioning it!). I would love to see a proper treatment of JavaScript's more powerful and expressive aspects as suggested by the following links:


I find the idea of JavaScript as being a descendant of Lisp+Self very exciting. I've read that Lisp is one of the most expressive languages, but its use of parentheses is a put off to beginners (they say you begin to overlook, and eventually enjoy it). If JavaScript can be used as one would use Lisp, then maybe JavaScript can also be considered as expressive, but without having to balance parentheses.

There's a claim in the jibbering.com link that JavaScript (using Closures) can emulate anything. However, because Closures are so easy to create, it is also claimed that web-developers accidentally create Closures without realizing it due to ignorance of JavaScript as a Functional programming language. The results of accidentally creating Closures is said to be undesirable and potentially problematic for the application. The argument then is to improve one's understanding of Closures to reduce problematic code, and to enhance the code by judicial use of Closures. Perhaps, this can be done by studying JavaScript as a Lisp variant, without having to learn Lisp.

Apparently, JavaScript's relationship to Lisp is so close, there's a Lisp-dialect that compiles to JavaScript called Parenscript.

It's now been incorporated into the UnCommon Web:

I already have your 1st edition, and would jump to get the 2nd edition if you could simplify the full functional concepts in those links for us beginners. Or, maybe a new book dedicated towards Functional JavaScript...
"Expressive JavaScript"
"Professional Fun(ctional) JavaScript" (even has parens - :D)
"Professional Fun(JavaScript)" (okay, now I'm getting silly! - [:o)] )
"Professional JavaScript for Software Engineers" with lots of examples! A Functional type of book would be a first, even beating O'Reilly. Might even be the new JavaScript bible [:0]

On the chance no one writes that book (please do!), I've compiled what I hope to be a useful list of Lisp resources that might be applied towards learning advanced JavaScript as a Functional language:

= 9J =

nzakas May 29th, 2006 04:42 PM

Actually, it has been rumored that Brendan Eich, JavaScript's creator, modeled it heavily after Lisp, so you're not too far off in thinking of it as a functional language.

These are all really great ideas that I will definitely keep in mind as I'm putting together my proposal for Pro JS 2nd Ed. The goal is, afterall, to beat O'Reilly. :)

Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)

ninejaguar May 29th, 2006 08:11 PM

With all the buzzwords (making them no less important!) floating around JavaScript, it'll be tough to decide what topics to put in, and what to leave out. Maybe, one of your readers can help out. Hold on to your shortpants![}:)]

An example:

"JavaScript is: Functional, Object Oriented, Aspect Oriented, Monadic, Curried -
See it all in a great little presentation by Alex Russel, from FOSDEM 2006."
original source: http://calanya.livejournal.com/67299.html

I don't know what all that meant (Curried? I just had that for lunch!) but it looks important :)

JavaScript just recently seems to be getting the big momentum in the past couple of years. It's been around for over a decade(PJWB, pg.2 :D), but I think the importance of this new-age uber-QBasic has just begun to hit critical awareness beyond script-kiddie language status. I'm sure awareness of AJAX techniques helped tremendously. I'll never underestimate the importance of assigning catchy names to existing, but little known techniques.

I wonder if it's a gauge of language maturity and acceptance that its open source debuggers are getting fancy:

But, look at this...amazing! (Needs Firefox's built-in SVG support)

Any browser, I think:
http://trimpath.com/project/wiki/TrimQuery (JavaScript SQL Database - sort of)
http://www.cross-browser.com/toys/ (nice "Animations")

What's next, practical jokes?

All kidding aside, and to the point of the latter half of this reply, the ability of the browser to act as a server using JavaScript has tremendous possibilities. I could be wrong, but officepoltergeist appears to listen to requests, and responds (all using JavaScript compiled as a module they say). It might make for an interesting chapter, particularly if I could learn to write remotely to a friend's spreadsheet in another browser [8D]

Turning the browser into a transceiver (a trouser?) using JavaScript+AJAX+JSON+TrimQuery+InsertYourAcronym.. .would make it a form of direct P2P I suppose...chat, whiteboard, filetransfer, shared IDE for remote XP web programming...etc.


And, to find someone using the browser, maybe their e-mail address would be sufficient? I mean, the mail servers seem to find people without trouble. Can SMTP/POP be tunneled through HTTP from the browser(I don't even know what I'm talking about)? Even if that isn't possible, I'm sure someone might eventually find another way for a browser to talk to a mailserver without requiring the mailserver to have a webserver.

Imagine, no clunky P2P server would be needed to reach out and touch someone. Your mailserver is the "directory" you need. Of course, I'll have to knock politely first before someone will let me in their browser, even when I'm on their white-list.

Wow, where can I buy the book that'll show me how to do all that!

Imagine, a beowulf cluster of smartbrowsers...:D

Would it be too much to ask you to start writing the 3rd edition while you're looking for 2nd edition material? [:p]

= 9J =

ufo May 30th, 2006 04:54 AM

9J, your a genius...
Cheers for inspiring...

PS: if you are making browser servers, make sure to ship with a really good firewall, cause they don't ship with the protection of a server,,,lol

pannet1 April 10th, 2007 02:24 AM

Dear Zakas,

I am a novice. I do not know if my views would help. I would like to express that you could have included some good GUI examples in your book. Its easy and intersting to see the output more visually than text output.

I still wonder how to do things the yahoo toolkit has. Though the source code is open out there, it needs a lot of research. For getting a simple operating system like Bar and Application menu bar, I have to go through lot of code and lot of includes. If only, I have examples of these in your book, I would not have to do the trimming myself. Its as easy as copying the code to my applications.

Please forgive my ignorance if they are not relevant here.

Best Regards


All times are GMT -4. The time now is 02:18 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.