Learning Javascript...

2 views
Skip to first unread message

Michael Nelson

unread,
Mar 13, 2006, 3:53:18 AM3/13/06
to Tafe...@googlegroups.com
Hi all!

I've just posted the following on my blog, but thought I'd ask for feedback here too!
From: http://liveandletlearn.net/learning-javascript/

Learning Javascript March 13, 2006

Just wondering if anyone has got some tips for introducing learners to JavaScript? Whether you've learned Javascript on your own or you're currently helping others to learn - I'd be keen to hear your ideas!

I find the difficulty is finding practical examples of where simple Javascript is useful to students. In the past we'd use image rollovers or scrolling text as nice visual examples, but thesedays they're both no-no's as they can either be done with just HTML/CSS or are simply bad practise! A year or two ago it seemed that there was nothing useful that Javascript could do and it was on the way out.

But now Javascript is making a huge comeback with excellent AJAX  features on websites that are really useful and usable - meaning that there's real worth for students to learn Javascript. On the other hand, the code for this kind of stuff is definitely not for learners… so where does that leave us? How can learners be introduced to Javascript with useful examples that can be applied straight away?

I can think of only three simple applications of Javascript:

  • The great pop-up window - ok, so it's not always the best idea, but it can be useful for browsing image galleries, and is a great visual example.
  • Form validation - again, Javascript might not be the best tool for this. These days most people prefer to use the server-side programming as you can provide more helpful feedback (and we don't need to worry as much as we used to about the page re-loading). None the less, it provides a great way to see if-statements in action.
  • Expanding/collapsing sections on a Form - nice way to see Javascript tied in with CSS to provide a useful feature.

Hopefully you can think of other simple applications of Javascript, or maybe you disagree totally… let me know! Perhaps we should just be helping learners to utilise Javascript rather than write code from scratch? It'd certainly be more useful...



--
Michael Nelson
http://liveandletlearn.net/

Shaggy

unread,
Mar 15, 2006, 6:32:07 PM3/15/06
to TafeWebby
Hi Michael,
first up: thanks for some great resources.

AFA JavaScript exercises go - I think a re-creation of the death clock
http://www.deathclock.com/ might be fun - doing the client side
checking of the user inputs (perhaps with some regular expression
matching, displaying colour coded error messages using the DOM),
allowing for bmi conversoin of ft/in/lb to m/cm/kg using a js function
and radio button (or look at some other conversion method, like:
http://www.onlineconversion.com/weight_common.htm) and displaying the
result as a visual countdown of seconds-till-death on the same page
without a round trip back to the server.

wrt client side form checking - it's still helpful, because it gives
instant feedback (less load on a busy server, faster feedback for the
user), of course you have to do server side checking too, but client
side still has a place.

hope that gives you some food for thought,

Peter

Reply all
Reply to author
Forward
0 new messages