"Charlene Russ" <lo******@bellsouth.net> wrote in message
news:ge*******************@bignews3.bellsouth.net. ..
Learn on-line at your own in a user-centered format with
plenty of interaction and personal attention.
It is an unfortunate truth that there are many poor books and Internet
sites/pages intended to, or attempting to, teach the authoring of
JavaScript for scripting web browsers. Many of these (probably most)
promote practices that are out of date, unwise or actively harmful, and
create misconceptions, misperceptions or just omit important aspects of
the language and its application.
It is to the comp.lang.javascript newsgroup that the victims of these
"resources" often turn and, with that in mind, if c.l.j is to be used to
promote a new JavaScript course it doesn't seem unreasonable to attempt
to examine the quality of the teaching that is being offered.
This is a basic level coursed designed to introduce the
novice to intermediate computer user to the JavaScript
language,
Presumably then the intended end result is to leave the student beyond
the "intermediate" level.
and focuses on creating user interactivity on personal
websites. This Object Oriented Language is known for creating
a high level of interactivity with minimal coding, and is
fairly simple to learn.
We will begin with an overview of Javascript, describe its
applications and compare it to other web programming
languages. Flash integration with Javascript will also be
addressed throughout the course. Topics we will be covering
include, Incorporating Javascript into an HTML page, Simple
Scripting, Time and Date,Data Variables,Writing Output, User
Prompts, Working with images, Creative Scripting, Data Types,
and Navigation with Javascript.
Presumably not in that order.
Objective:
To provide the student with an enjoyable learning experience
complete with personalized instruction.
So increasing the knowledge of the student is not an objective? ;-)
Course Requirements:
<snip>Netscape 6 or later
Internet Explorer 5.5 or later
You will be covering "both browsers" then?
<snip>The Eclectic Academy
http://www.eclecticacademy.com
'The Better Choice in On-Line Learning'
An attempt to asses the value of the propose course is seriously
hindered by the fact that the only information available about the
course on the Eclectic Academy web site has already been transcribed
verbatim into the preceding post.
It might have been nice to see a representative chunk of course
material, preferably something less mundane and demonstrating some
implementation code.
However, in the absence of other sources of information (and to some
extent, in any case) any organisation purporting to provide instruction
in web authoring can reasonably be assessed by examining the
implementation of their own web site.
Though it would have been nice I did not expect the Eclectic Academy web
site HTML (and/or XHTML) to validate. I was not disappointed but
although the HTML is, in places, very bad the use of JavaScript is more
pertinent to the current subject. So, starting with the home page:-
<quote cite=" http://www.eclecticacademy.com">
<script language="JavaScript">
// -- hide from old browsers
var days = new Array(7)
days[1] = "Sun.";
days[2] = "Mon.";
days[3] = "Tues.";
days[4] = "Wed.";
days[5] = "Thur.";
days[6] = "Fri.";
days[7] = "Sat.";
var months = new Array(12)
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";
var today = new Date()
var day = days[today.getDay() + 1]
var month = months[today.getMonth() + 1]
var date = today.getDate()
document.write(day
+ " : " + month + " " + date)
// -- end hiding
</script>
</quote>
The JavaScript comments:-
// -- hide from old browsers
- and -
// -- end hiding
- are quite unexpected because, not withstanding the questionable worth
of hiding scripts from browsers so old (pre 1996?) that they would not
suitably handle script tags, these comments will not achieve their
stated intention.
The rest of the code demonstrates an obvious misconception about
JavaScript Arrays (and how they are indexed) and the inefficient use of
the getMonth and getDay methods of the Date object to index those
Arrays.
<quote cite="http://www.eclecticacademy.com/websitedev.htm">
<script language="javascript" type="text/javascript">
if (!document.getElementById) {
document.write('<link rel="stylesheet"
href="n4.css" type="text/css">');
} else {
document.write('<link rel="stylesheet"
href="btstyle472.css" type="text/css">');
}
</script>
</quote>
A page that has no other LINK elements makes the use of CSS completely
and needlessly dependent on JavaScript and then uses object inference to
decide which style sheet to use, basing that decision on an object that
has no implied or real baring on the CSS support offered by the browser.
(This falls into the category of an utterly stupid thing to be doing
with JavaScript.)
It is also interesting to see that this page starts with:-
<quote cite="http://www.eclecticacademy.com/websitedev.htm">
<html xmlns="http://www.w3.org/1999/xhtml">
</quote>
- and then goes on to make a generally misguided (and erroneous)
impersonation of XHTML, but the link elements written into the document
by the above script are in HTML format, which is inconsistent to say the
least.
The next script on that page:-
<quote cite="http://www.eclecticacademy.com/websitedev.htm">
<script type="text/javascript">
//<![CDATA[
//Popup Window Script
//By JavaScript Kit (
http://javascriptkit.com)
//JavaScript tutorials and over 400+ free scripts
function openpopup(){
var popurl="psppainting1.jpg"
winpops=window.open(popurl,"",
"width=600,height=228,status,")
}
function openpopup2(){
var popurl2="bitmapproj.jpg"
winpops=window.open(popurl2,"",
"width=410,height=307,status,")
}
function openpopup3(){
var popurl3="vectorhouse.jpg"
winpops=window.open(popurl3,"",
"width=608,height=423,status,")
}
//]]>
</script>
</quote>
- could hardly be clamed to make the best use of functions, defining
three otherwise identical functions with a hard-coded URL string value
instead of one function that took the URL as a parameter. And includes
the usual inappropriately incautious attitude towards the use of the
window.open function, not even going to the effort of verifying that the
browser in question implements that function.
In context it is not really important that the functions could error in
the face of a browser that does not implement window.open because
although the code that defines the three function is included in the
page none of the functions are used on that page. So the user is
needlessly burdened with downloading a chunk of code and the author of
the page demonstrates that they didn't really understand what they were
doing.
Those two pages seem representative of the other assessable pages on the
site.
In the absence of anything that could speak for the quality of the
JavaScript course itself I am forced to conclude that if the course
teaches/promotes the techniques, practices and coding style demonstrated
at
http://www.eclecticacademy.com it would be positively harmful to
exchange money for the information it provides.
Richard.