Web Design Forum: Learning Javascript - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Learning Javascript

#1 User is online   welshhuw 

  • Web Guru
  • PipPipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 1,755
  • Joined: 21-October 08
  • Reputation: 20
  • Gender:Male
  • Location:South Wales, UK
  • Experience:Intermediate
  • Area of Expertise:Web Designer

Posted 07 January 2010 - 06:52 PM

Hello,

I have been studying javascript thru my home course, and have my exam to do this year when I am ready!
Even tho I have re-read my study book I just can't seem to 'get it'!!??
I understand the basics but when I am asked to try and create a little harder script, I think I know it but get it wrong.
When I check the correct script then, i think to myself: "Oh yeah, that's obvious"!!

Anybody else have/had this trouble?! It's soooo frustrating!

Any really good tuts out there to help me?

Thanks
0

#2 User is offline   sunwukung 

  • Expert
  • PipPipPipPipPip
  • Group: Validating
  • Posts: 1,150
  • Joined: 28-March 08
  • Reputation: 57
  • Gender:Male
  • Location:Bristol
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 07 January 2010 - 07:16 PM

Javascript is an absolute biatch to learn - first you need to get your head round lexical as opposed to block scope (and 'closures' as a result). If you're used to PHP, that can be a bit tricky. Then there's a whole bunch of gotchas with data types and whitespace among others, and finally you get to see if your script works in IE, and you want to cry (or kill Bill/Ballmer). That, in a nutshell, is why most people end up using a library to deal with all those nasty issues.

There are some great books:

Simply Javascript: Sitepoint
http://www.sitepoint...ks/javascript1/ (recommended to me by ElanMan - very good)

JavaScript: The Definitive Guide, Fourth Edition - the ultimate, but perhaps a bit heavy for a beginner
http://oreilly.com/c...g/9780596000486

DOM scripting: Jeremy Keith - great starter book
http://domscripting.com/book/

Advanced DOM scripting - not as good as the others, but some good material
http://advanceddomscripting.com/

ppk on Javascript: a great source, and the website is brilliant too
http://www.quirksmode.org/book/

Mozilla's JS reference - brilliant resource
https://developer.mo...g/en/JavaScript

Professional Javascript for Web Developers: WROX
http://www.wrox.com/...0764579088.html
I've found WROX actually write some really good books, halfway between O-Reilly's hideously formatted and dry tomes and the lightweight, coffee table-esque Sitepoint material.

JS is just a very tricky beast - if I were you, I'd complete some typical tasks without a library first (create a form validator, write some basic event handlers, use some timers to do some animation) to give you an idea of what it's about - then I'd probably start thinking about adopting a library for general use on critical projects when you just need to get a job done (you'll learn a lot about JS just trying to choose one...). Then I'd go back to your vanilla JS in your spare time and try and master it slowly.
0

#3 User is online   welshhuw 

  • Web Guru
  • PipPipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 1,755
  • Joined: 21-October 08
  • Reputation: 20
  • Gender:Male
  • Location:South Wales, UK
  • Experience:Intermediate
  • Area of Expertise:Web Designer

Posted 07 January 2010 - 07:31 PM

Thanks for the advice.
Most jobs require html/css and javascript so I really need to get this learnt!
Is it common practice to use a ready-written script/s for certain things? Save writing one from scratch every time.

Also, what elements of javascript do you use in your websites?

Thanks again.
0

#4 User is offline   ElanMan 

  • In, out, shake it all about...
  • PipPipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 3,298
  • Joined: 11-March 08
  • Reputation: 54
  • Gender:Male
  • Location:Darlington
  • Experience:Nothing
  • Area of Expertise:Nothing

Posted 07 January 2010 - 07:55 PM

SWK has pretty much hit the nail on the head.
JS is 'different' from other languages. If you don't have experience with other languages, then you may not appreciate this at first.
Definitely try to get your head around basic vanilla js before using a library (jquery, mootools et al).
Firstly, this will make you realise how great these libraries are and how much pain they take away from everyday js.
Secondly, when scripts don't work how you'd expect or you wish to add your own functionality, it'll be far easier :)
As for using ready-written scripts, there's nothing wrong with that (why re-invent the wheel?) but make sure they're decent.
A lot of the free scripts are hideously dated.
Douglas Crockford vids are always worth watching too: linky
0

#5 User is online   welshhuw 

  • Web Guru
  • PipPipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 1,755
  • Joined: 21-October 08
  • Reputation: 20
  • Gender:Male
  • Location:South Wales, UK
  • Experience:Intermediate
  • Area of Expertise:Web Designer

Posted 07 January 2010 - 08:01 PM

What is vanilla JS!!! :)

Am reading Sitepoints simply javascript right now!

Thanks
0

#6 User is offline   MrBrightside 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 855
  • Joined: 05-May 09
  • Reputation: 25
  • Gender:Male
  • Location:In the Diary of Jane
  • Experience:Web Guru
  • Area of Expertise:Designer/Coder

Posted 07 January 2010 - 08:09 PM

View Postwelshhuw, on 07 January 2010 - 08:01 PM, said:

What is vanilla JS!!! :)

Am reading Sitepoints simply javascript right now!

Thanks


What's the world coming to! Looks like frameworks have total domination! :lol:
"Vanilla" is raw JavaScript written without any frameworks such as jQuery.

EDIT: Vanilla in nerd terms refers to "plain" or "basic".
0

#7 User is online   welshhuw 

  • Web Guru
  • PipPipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 1,755
  • Joined: 21-October 08
  • Reputation: 20
  • Gender:Male
  • Location:South Wales, UK
  • Experience:Intermediate
  • Area of Expertise:Web Designer

Posted 07 January 2010 - 08:15 PM

View PostMrBrightside, on 07 January 2010 - 08:09 PM, said:

What's the world coming to! Looks like frameworks have total domination! :lol:
"Vanilla" is raw JavaScript written without any frameworks such as jQuery.

EDIT: Vanilla in nerd terms refers to "plain" or "basic".

Right, thanks for clearing that up!
I have written a few basic scripts thru my studies and have used some jquery sliders on my webpages.

Will keep on reading....!
0

#8 User is offline   craftedpixelz 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 644
  • Joined: 28-June 08
  • Reputation: 5
  • Gender:Male
  • Location:Manchester, UK
  • Experience:Web Guru
  • Area of Expertise:Web Designer

Posted 07 January 2010 - 10:32 PM

View Postwelshhuw, on 07 January 2010 - 08:15 PM, said:

Right, thanks for clearing that up!
I have written a few basic scripts thru my studies and have used some jquery sliders on my webpages.

Will keep on reading....!


Although you have to be able to write raw javascript for your course, when you're done I'd recommend using a library such as jQuery when writing Javascript. It makes everything so much simpler, and it's cross browser.
0

#9 User is offline   ElanMan 

  • In, out, shake it all about...
  • PipPipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 3,298
  • Joined: 11-March 08
  • Reputation: 54
  • Gender:Male
  • Location:Darlington
  • Experience:Nothing
  • Area of Expertise:Nothing

Posted 07 January 2010 - 11:15 PM

View Postcraftedpixelz, on 07 January 2010 - 10:32 PM, said:

Although you have to be able to write raw javascript for your course, when you're done I'd recommend using a library such as jQuery when writing Javascript. It makes everything so much simpler, and it's cross browser.

Basic js is a must, whether you're on a course or not. Learn the basics first before jumping on the 'library bandwagon'.
If you only need a little script/functionality, a library is overkill but if you can't write that little script by yourself you're buggered.

Start with the basics if you want to learn the language.
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users