Re: [WSG] seeking JavaScript Bible comments

2009-02-27 Thread Keryx Web

Den 2009-02-09 03:02, Joseph Taylor skrev:

I wouldn't worry about document.write examples too much.
You just need to keep in mind that the book is designed to teach the
language from scratch, and quite possibly the reader hasn't scripted
before.

Starting from point zero, document.write is a good way to get started
learning and making things happen fast. I'll guess that the Bible-series
programming books aren't necessarily considering standardistas.


An exceptionally late reply, since I've been incredibly busy the last 
month...


The problem with using document.write or some other bad practice in an 
example is that the code tend to be used in real solutions. Students 
(and real developers) often search for the first solution that works.


Simple examples of how to use e.g. a control structure can be 
illustrated using console.log() or the JavaScript shell, even 
window.alert() is preferable.


I taught complete newbies JavaScript last semester. The very first thing 
I did was showing them the console in Firebug. (The computers at school 
do not have Opera or a webkit based browser installed, but I told the 
they have got similar tools.)


Using Firebug for my examples was a huge timesaver when showing how the 
syntax or built in objects work, compared to using any technique that 
relies on document.write. There simply is no need for it any longer.



Lars Gunther


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



Re: [WSG] seeking JavaScript Bible comments

2009-02-08 Thread Keryx Web

Paul Novitski skrev:
I would love to get your critical comments on Danny Goodman's JavaScript 
Bible

http://ca.wiley.com/WileyCDA/WileyTitle/productCd-0470069163.html

I'm updating the book to its 7th edition and am making some significant 
changes, including upgrading it to include separation of layers  
progressive enhancement.


OK. You are addressing my biggest gripe. I'm sure you will get the word 
unobtrusive in there as well!


JQuery has just demonstrated that even a library can be built using no 
browser sniffing at all. Capability testing a.k.a. feature detection and 
the new kid on the block, bug detection, really takes a lot of focus 
away from the compatibility tables.


Do you have any other criticisms of the book, either minor or major, 
that I should consider in the rewrite?  I would be grateful for your 
detailed remarks.


I am developing the DOM Scripting courses for the Web Standards Projects 
Educational Fask Force. High on my personal wish list is a chapter on 
JavaScript from an academic, computer science, perspective.


Also, the first examples of JavaScript tend to use document.write when 
illustrating the simplest parts of the language. Usage of document.write 
should be banned from day one. Encourage the readers to test simple 
stuff in a console (e.g. Firebug) or the JS-shell instead. (Appendix C)


Namespacing (or the lack thereof) is another issue that should be 
addressed early on. As soon as example code becomes realistic, it should 
be enclosed in a self executing function or in some other way be hidden 
from the global scope.


ECMAScript 3.1 is coming along soon(?). It warrants a discussion.

ES 3.1 will have built in functionality for JSON. JSON is missing in the 
6th edition *entirely*.



Lars Gunther


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



Re: [WSG] seeking JavaScript Bible comments

2009-02-08 Thread MichaelMD
 Also, the first examples of JavaScript tend to use document.write when 
 illustrating the simplest parts of the language. Usage of document.write 
 should be banned from day one. Encourage the readers to test simple 

A decade ago (Netscape 4 era) I used document.write in some javascript
widgets for people display some content from another site by using a
script tag. 

They still work in current browsers but javascript has come a long way
since then!





***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



Re: [WSG] seeking JavaScript Bible comments

2009-02-08 Thread Joseph Taylor
I wouldn't worry about document.write examples too much. 

You just need to keep in mind that the book is designed to teach the 
language from scratch, and quite possibly the reader hasn't scripted 
before.


Starting from point zero, document.write is a good way to get started 
learning and making things happen fast. I'll guess that the Bible-series 
programming books aren't necessarily considering standardistas.


Joseph R. B. Taylor
/Designer / Developer/
--
Sites by Joe, LLC
/Clean, Simple and Elegant Web Design/
Phone: (609) 335-3076
Fax: (866) 301-8045
Web: http://sitesbyjoe.com
Email: j...@sitesbyjoe.com



MichaelMD wrote:
Also, the first examples of JavaScript tend to use document.write when 
illustrating the simplest parts of the language. Usage of document.write 
should be banned from day one. Encourage the readers to test simple 



A decade ago (Netscape 4 era) I used document.write in some javascript
widgets for people display some content from another site by using a
script tag. 


They still work in current browsers but javascript has come a long way
since then!





***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***

  



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***