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
*******************************************************************

Reply via email to