Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old May 22nd, 2005, 01:33 PM
Registered User
 
Join Date: May 2005
Location: , , Belgium.
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)?

Reply With Quote
  #12 (permalink)  
Old May 22nd, 2005, 09:03 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Peabody, MA, USA.
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/
Reply With Quote
  #13 (permalink)  
Old May 25th, 2005, 03:53 PM
Registered User
 
Join Date: May 2005
Location: , , Belgium.
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(...)

Reply With Quote
  #14 (permalink)  
Old May 25th, 2005, 04:43 PM
AGS AGS is offline
Wrox Technical Editor
Points: 267, Level: 5
Points: 267, Level: 5 Points: 267, Level: 5 Points: 267, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2005
Location: Russia
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

Reply With Quote
  #15 (permalink)  
Old May 25th, 2005, 06:34 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Peabody, MA, USA.
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/
Reply With Quote
  #16 (permalink)  
Old May 25th, 2005, 06:35 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Peabody, MA, USA.
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/
Reply With Quote
  #17 (permalink)  
Old June 5th, 2005, 02:51 PM
Registered User
 
Join Date: May 2005
Location: , , Belgium.
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?
Reply With Quote
  #18 (permalink)  
Old June 5th, 2005, 05:45 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Peabody, MA, USA.
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/
Reply With Quote
  #19 (permalink)  
Old June 6th, 2005, 08:01 AM
AGS AGS is offline
Wrox Technical Editor
Points: 267, Level: 5
Points: 267, Level: 5 Points: 267, Level: 5 Points: 267, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2005
Location: Russia
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

Reply With Quote
  #20 (permalink)  
Old June 6th, 2005, 09:23 AM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Peabody, MA, USA.
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/
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:50 AM.


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