Introduction to JavaScript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Charlene Russ

    Introduction to JavaScript

    Learn on-line at your own in a user-centered format with plenty of
    interaction and personal attention.

    This is a basic level coursed designed to introduce the novice to
    intermediate computer user to the JavaScript language, 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,Writi ng Output, User Prompts,
    Working with images, Creative Scripting, Data Types, and Navigation with
    Javascript.

    Objective:
    To provide the student with an enjoyable learning experience complete with
    personalized instruction.

    Course Requirements:

    Internet and Email Access
    Text Editor Such as Notepad or Textpad
    Ability to send attachments,
    or webspace to post assignments
    Netscape 6 or later
    Internet Explorer 5.5 or later

    Preferred but not mandatory

    HTML Editor ( *Dreamweaver MX has some nice features)
    Flash 5 or Flash MX
    Printer Access (printing out the lessons can be very helpful)

    Introduction to JavaScript, currently only $20 per six-week session!

    To enroll visit us on-line at:

    The Eclectic Academy

    'The Better Choice in On-Line Learning'


  • Richard Cornford

    #2
    Re: Introduction to JavaScript

    "Charlene Russ" <lorena29@bells outh.net> wrote in message
    news:ge3Gb.1368 5$Ol1.13414@big news3.bellsouth .net...[color=blue]
    >Learn on-line at your own in a user-centered format with
    >plenty of interaction and personal attention.[/color]

    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.javas cript 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.
    [color=blue]
    >This is a basic level coursed designed to introduce the
    >novice to intermediate computer user to the JavaScript
    >language,[/color]

    Presumably then the intended end result is to leave the student beyond
    the "intermedia te" level.
    [color=blue]
    >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,Writi ng Output, User
    >Prompts, Working with images, Creative Scripting, Data Types,
    >and Navigation with Javascript.[/color]

    Presumably not in that order.
    [color=blue]
    >Objective:
    >To provide the student with an enjoyable learning experience
    >complete with personalized instruction.[/color]

    So increasing the knowledge of the student is not an objective? ;-)
    [color=blue]
    >Course Requirements:[/color]
    <snip>[color=blue]
    >Netscape 6 or later
    >Internet Explorer 5.5 or later[/color]

    You will be covering "both browsers" then?

    <snip>[color=blue]
    >The Eclectic Academy
    >http://www.eclecticacademy.com
    >'The Better Choice in On-Line Learning'[/color]

    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.eclecticaca demy.com">
    <script language="JavaS cript">
    // -- 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.eclecticaca demy.com/websitedev.htm" >
    <script language="javas cript" type="text/javascript">
    if (!document.getE lementById) {
    document.write( '<link rel="stylesheet "
    href="n4.css" type="text/css">');
    } else {
    document.write( '<link rel="stylesheet "
    href="btstyle47 2.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.eclecticaca demy.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.eclecticaca demy.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="psppain ting1.jpg"
    winpops=window. open(popurl,"",
    "width=600,heig ht=228,status," )
    }
    function openpopup2(){
    var popurl2="bitmap proj.jpg"
    winpops=window. open(popurl2,"" ,
    "width=410,heig ht=307,status," )
    }
    function openpopup3(){
    var popurl3="vector house.jpg"
    winpops=window. open(popurl3,"" ,
    "width=608,heig ht=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.


    Comment

    • Charlene Russ

      #3
      Re: Introduction to JavaScript

      I totally agree, that's why I use a simple user-centered approach devoted
      to teaching a novice student the basics which he or she will need to move on
      to a more advanced level. Unlike many professors and instructors, I have a
      stake in each students success and devote all my efforts to such. The
      Introductory course will provide all students with a solid logical
      foundation so that they do not have difficulty when they move on to advanced
      scripting technique. Also in my classes, students learn high level creative
      technique using more streamlined and efficient code.

      Also, yes of course I teach both browsers, I can't imagine offering an
      interactive JavaScript course without doing so.

      Thank you for your response. :)


      "Richard Cornford" <Richard@litote s.demon.co.uk> wrote in message
      news:bsauua$cmf $1$8302bc10@new s.demon.co.uk.. .[color=blue]
      > "Charlene Russ" <lorena29@bells outh.net> wrote in message
      > news:ge3Gb.1368 5$Ol1.13414@big news3.bellsouth .net...[color=green]
      > >Learn on-line at your own in a user-centered format with
      > >plenty of interaction and personal attention.[/color]
      >
      > 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.
      >[/color]



      Comment

      • Lasse Reichstein Nielsen

        #4
        Re: Introduction to JavaScript

        "Charlene Russ" <lorena29@bells outh.net> writes:

        Please don't top post.
        [color=blue]
        > Also, yes of course I teach both browsers, I can't imagine offering an
        > interactive JavaScript course without doing so.[/color]

        I think the point was that "both browsers" is a concept that should
        have been dropped five years ago (or more).

        First of all, there are now significantly more than two browsers (I,
        for one, use Opera for all my browsing). There are browsers inside
        mobile phones and PDAs, and even WebTV.

        Second, and more importantly, the point should be to teach standards,
        not browsers, methods, not technology. If you know the W3C DOM, then
        all you need to know about, e.g., IE, is where it doesn't support it
        properly, and you can write code that works in all modern browsers.

        /L
        --
        Lasse Reichstein Nielsen - lrn@hotpop.com
        DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
        'Faith without judgement merely degrades the spirit divine.'

        Comment

        • Dr John Stockton

          #5
          Re: Introduction to JavaScript

          JRS: In article <7v7Gb.13998$Ol 1.6444@bignews3 .bellsouth.net> , seen in
          news:comp.lang. javascript, Charlene Russ <lorena29@bells outh.net> posted
          at Tue, 23 Dec 2003 22:39:25 :-
          [color=blue]
          > Also in my classes, students learn high level creative
          >technique using more streamlined and efficient code.[/color]

          If the example quoted is typical of what you teach, ISTM unlikely that
          they will do that.

          You create arrays of length 7 & 12, and then assign, one by one,
          elements to them that make the lengths 8 & 13.

          var days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]

          is much nicer. Perhaps, though, your students expect eventually to be
          paid according to quantity of code and not by quality.

          var days = "Sun,Mon,Tue,We d,Thu,Fri,Sat". split(',')

          is shorter, should download time be considered worth reducing.

          --
          © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
          <URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang. javascript
          <URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
          <URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.

          Comment

          • Janwillem Borleffs

            #6
            Re: Introduction to JavaScript


            "Dr John Stockton" <spam@merlyn.de mon.co.uk> schreef in bericht
            news:fS8bYNFz8a 6$Ew3h@merlyn.d emon.co.uk...[color=blue]
            >
            > You create arrays of length 7 & 12, and then assign, one by one,
            > elements to them that make the lengths 8 & 13.
            >
            > var days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
            >
            > is much nicer. Perhaps, though, your students expect eventually to be
            > paid according to quantity of code and not by quality.
            >[/color]

            IMO, this isn't where a course should start with. The first step would be to
            learn how to explain what an array in JS is, the second step should teach
            how to create arrays from an instance of the Array object followed by an
            overview of alternative methods.

            Apart from this, I think a course should not be judged by the code of the
            website it is advertised on. It is well possible that the webmaster's
            expertise isn't JavaScript but this doesn't mean that he or she has
            followed one of the classes to gain basic knowledge.

            Another thing is that it's in general not a very good idea to promote
            trainings in programmer newsgroups, because a lot of programmers have the
            tendency to look down on anything that doesn't follow their own pattern of
            thinking. But I think by now, Charlene will realise that ;-)

            Let the flaming begin....

            JW



            Comment

            • Eric Bohlman

              #7
              Re: Introduction to JavaScript

              "Charlene Russ" <lorena29@bells outh.net> wrote in
              news:7v7Gb.1399 8$Ol1.6444@bign ews3.bellsouth. net:
              [color=blue]
              > Also, yes of course I teach both browsers, I can't imagine offering
              > an interactive JavaScript course without doing so.[/color]

              "Both browsers"? There are at least five families of browsers in
              widespread use, and within each family there's widespread variation in
              their support for various host-dependent features of Javascript.

              Comment

              • Lasse Reichstein Nielsen

                #8
                Re: Introduction to JavaScript

                Eric Bohlman <ebohlman@earth link.net> writes:
                [color=blue]
                > There are at least five families of browsers in widespread use,[/color]

                IE, Gecko, Opera, KHTML, and ... ?
                What's the fifth? (Is it for Macintosh, I don't know enough about
                those?)

                /L
                --
                Lasse Reichstein Nielsen - lrn@hotpop.com
                DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
                'Faith without judgement merely degrades the spirit divine.'

                Comment

                • Dr John Stockton

                  #9
                  Re: Introduction to JavaScript

                  JRS: In article <3fea31d4$0$196 $1b62eedf@news. wanadoo.nl>, seen in
                  news:comp.lang. javascript, Janwillem Borleffs <jw@jwscripts.c om> posted
                  at Thu, 25 Dec 2003 01:39:50 :-[color=blue]
                  >
                  >"Dr John Stockton" <spam@merlyn.de mon.co.uk> schreef in bericht
                  >news:fS8bYNFz8 a6$Ew3h@merlyn. demon.co.uk...[color=green]
                  >>
                  >> You create arrays of length 7 & 12, and then assign, one by one,
                  >> elements to them that make the lengths 8 & 13.
                  >>
                  >> var days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
                  >>
                  >> is much nicer. Perhaps, though, your students expect eventually to be
                  >> paid according to quantity of code and not by quality.
                  >>[/color]
                  >
                  >IMO, this isn't where a course should start with.[/color]

                  This is not where the course is starting.
                  [color=blue]
                  >The first step would be to
                  >learn how to explain what an array in JS is, the second step should teach
                  >how to create arrays from an instance of the Array object followed by an
                  >overview of alternative methods.[/color]

                  Surely one does not create an array from an instance of the Object; it
                  already is an array, albeit empty on creation. IMHO, where there is an
                  efficient way of doing something, it should be shown, although not
                  necessarily explained, when said something is first discussed - too many
                  students follow only the first method in the course or book.

                  [color=blue]
                  >Apart from this, I think a course should not be judged by the code of the
                  >website it is advertised on. It is well possible that the webmaster's
                  >expertise isn't JavaScript but this doesn't mean that he or she has
                  >followed one of the classes to gain basic knowledge.[/color]

                  A Webmaster should be capable of accepting code from an expert; and a
                  teacher should be an expert in what he or she teaches, at least in all
                  the material that the course remit can cover. Who would buy a suit from
                  an ill-dressed tailor?

                  --
                  © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
                  <URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang. javascript
                  <URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
                  <URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.

                  Comment

                  • Eric Bohlman

                    #10
                    Re: Introduction to JavaScript

                    Lasse Reichstein Nielsen <lrn@hotpop.com > wrote in
                    news:7k0lf808.f sf@hotpop.com:
                    [color=blue]
                    > Eric Bohlman <ebohlman@earth link.net> writes:
                    >[color=green]
                    >> There are at least five families of browsers in widespread use,[/color]
                    >
                    > IE, Gecko, Opera, KHTML, and ... ?
                    > What's the fifth? (Is it for Macintosh, I don't know enough about
                    > those?)[/color]

                    Miscellaneous browsers (many of which don't support scripting, though) for
                    Windows and at least a couple for Macs (including the Mac version of IE,
                    which is a completely different product from the Windows version).

                    Comment

                    Working...