Wrox Programmer Forums
|
BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0
This is the forum to discuss the Wrox book Professional JavaScript for Web Developers by Nicholas C. Zakas; ISBN: 9780764579080
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 22nd, 2005, 01:33 PM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Again page 98
Performance testing of StringBuffer object versus string concatenation:
I love this idea, implementing this StringBuffer class as in Java.
I set up a testpage like you wrote, and indeed in IE6/WinXP I get
concatenation: 280 ms
StringBuffer: 90 ms
But in Firefox 1.0.4 (my preferred browser), it's the other way around:
concatenation: 20 ms
StringBuffer: 60 ms
(still 'alot' faster than IE)
Any idea? Did the Mozilla people optimise concatenation because that's the way it is most often done (sadly even in Java)?

 
Old May 22nd, 2005, 09:03 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

I'm just going to say this to anyone reading this forum: everything Alexei finds and posts is true! Good job again, Alexei.

Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/
 
Old May 25th, 2005, 03:53 PM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In the Web Services chapter, on page 518,
about the SOAP method in Mozilla:
var aSoapCall = new SOAPCall();
But then a bit later, the encode() method example:
oSOAPCall.encode(...)
which I guess should read:
oSoapCall.encode(...)

 
Old May 25th, 2005, 04:43 PM
AGS AGS is offline
Wrox Technical Editor
 
Join Date: May 2005
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Page 130, second paragraph
 
Quote:
quote:It is completely up to you whether you choose to use
Quote:
this method, but keep in mind that using external JavaScript files inside of inline code is a much easier
method of hiding code from older browsers.
may be instead of
Best regards,
Alexei

 
Old May 25th, 2005, 06:34 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Halans,

In answer to your first question, I'm not entirely sure. It's possible that Mozilla decided to optimize string concatenation the same way Java did. In my initial tests while writing the book, I still showed a performance gain in Mozilla (wish I could remember what version it was), but that very well could have been fixed by now (ah, the joys of open source software).

And you're correct about the SOAPCall issue. It should be "oSoapCall", not "oSOAPCall". Good catch.

Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/
 
Old May 25th, 2005, 06:35 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Alexei,

Right again, it should be "instead of".


Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/
 
Old June 5th, 2005, 02:51 PM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Page 162, DOM Basics.
The end of the first paragraph:
"The second line of the XML file need not always contain the document element; it can come later if comments or other (???)"
This sentence would need to be finished in one way or the other, I guess. Maybe something about added stylesheet processing instructions, like the example a few paragraphs later?
 
Old June 5th, 2005, 05:45 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Wow, that's very weird. Nice catch.

I think it should read "it can come later if comments or other markup are necessary."

Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/
 
Old June 6th, 2005, 08:01 AM
AGS AGS is offline
Wrox Technical Editor
 
Join Date: May 2005
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Regular expressions, page 193, first paragraph
 
Quote:
quote:Languages such as Perl implemented
Quote:
a solution called regular expressions based on a Unix administration tools such as gred
and ed.
May be grep?

Best regards,
Alexei

 
Old June 6th, 2005, 09:23 AM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Another good catch, Alexei. I wonder if this was a case of Word "fixing" what it thought was a spelling error automatically.

Thanks!

Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/





Similar Threads
Thread Thread Starter Forum Replies Last Post
mistake in code yami56 Access 3 February 24th, 2005 04:04 PM
mistake in my topics zakarya_hazara Classic ASP Basics 1 October 9th, 2004 02:49 AM
Dangerous mistake revinchalil SQL Server 2000 4 February 4th, 2004 12:06 PM





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