Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 24th, 2005, 10:31 AM   #1
MrMan9879
Programmer
 
MrMan9879's Avatar
 
Join Date: Sep 2005
Location: Nanaimo, BC, Canada
Posts: 97
Rep Power: 0 MrMan9879 is an unknown quantity at this point
Send a message via MSN to MrMan9879
Is learning JavaScript worth it?

I recently got a fairly good book on learning JavaScript, but with seeing what I could do with PHP and Perl... I'm starting to wonder whether it's worth learning. My dad did buy this book for $40 though so I'll probably read it anyways, but do you guys think JavaScript is a good thing to learn?
MrMan9879 is offline   Reply With Quote
Old Sep 24th, 2005, 10:42 AM   #2
Simon Gray
Programmer
 
Join Date: Aug 2005
Location: Ålsgårde, Denmark
Posts: 62
Rep Power: 4 Simon Gray is on a distinguished road
Send a message via MSN to Simon Gray
Well, JS and PHP/Perl aren't meant for the same thing (and can't do the same things). If you want a dynamic frontend (e.g. the user can operate widgets on your html pages, stuff moves, roll-over events) there's JS, if you want a dynamic backend (databases, proper use of GET and POST variables) there's the server-side programming languages.

Most of the visual effects of JS can be handled with CSS nowadays, but JS recently had a small renaissance with AJAX (dynamically loaded content on events). AJAX application examples: Google's Gmail and Google Maps.
__________________
Visit my blog, about all that stuff in between your nostrils >_>
Simon Gray is offline   Reply With Quote
Old Sep 24th, 2005, 10:42 AM   #3
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
Well PHP is a lot more powerful and can do more things.
But it is worth learning JavaScript anyway, it will help you understand the concepts of PHP and it can prove useful. You may as well read the book and not waste it.
When you want to learn PHP, ther eis no need to buy a book IMHO, because php.net has great documentation.
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline   Reply With Quote
Old Sep 24th, 2005, 10:46 AM   #4
MrMan9879
Programmer
 
MrMan9879's Avatar
 
Join Date: Sep 2005
Location: Nanaimo, BC, Canada
Posts: 97
Rep Power: 0 MrMan9879 is an unknown quantity at this point
Send a message via MSN to MrMan9879
Thanks for the help, I'll learn JavaScript. I don't build websites professionally or anything (although I may get paid for some soon) I've been making them for the swim club I'm in and for my uncle's home theater business, and I think my uncle has found me more jobs to do that i'll get paid for! So basically I just want to learn as much as I can so I can make great websites. After I'm done learning how to make good websites with DHTML, PHP and probably Perl, I can move on to things like C/C++, because I have Visual Studio 2002 on my computer.
MrMan9879 is offline   Reply With Quote
Old Sep 24th, 2005, 11:08 AM   #5
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
Nice, it seems that you have everything planned out

C++ would be a great step after you have learnt some web technologies.
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline   Reply With Quote
Old Sep 24th, 2005, 11:33 AM   #6
MrMan9879
Programmer
 
MrMan9879's Avatar
 
Join Date: Sep 2005
Location: Nanaimo, BC, Canada
Posts: 97
Rep Power: 0 MrMan9879 is an unknown quantity at this point
Send a message via MSN to MrMan9879
Yeah, I'm not sure what books I should get to learn about this though, i've been reading the For Dummies books, I think they're pretty good, but if there's any other series you can recommend, that would be great! I'm reading JavaScript for Dummies (4th Edition) right now... I'm a little bit confused with JavaScript so far, but I'm hoping that it's because I've never used it before...
MrMan9879 is offline   Reply With Quote
Old Sep 24th, 2005, 12:42 PM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Let me reiterate what Simon Gray said, because I think ColdDeath missed a vital point. PHP, as typically used, is server-side code. It runs on the server, possibly builds a page dynamically, and transmits that page to the client to be rendered. The page, as it lives on the browser, is no longer in contact with the server. There is no interaction beyond what you can achieve by making a new request to the server and getting another page. I don't think you'd want to accomplish mouse interactions in that fashion.

JS (and other scripting languages) runs on the client. Interaction with client-side events is immediate. There is no demand on the server, and no demand on the internet's infrastructure, unless that event requests a new page (or the old page, again).

A lot of people now disable scripting on the client. These people won't be looking at something using the Google Map API, for instance, because the API is implemented in Javascript and loaded as part of the page load.

Another good reason, for example, is client side validation of forms. You always need to validate on the server, also, because forms can be farbled with. Nevertheless, if you validate on the client, you likely won't have to have additional request/response transactons between the client and server just to straighten the dumbass out.

Sometimes these repeated transactions don't seem important in the light of the speeds many people have, connection-wise. Who cares if you go back to the server forty times, if the pages load rapidly? Well, for one thing, not EVERYONE has cable or DSL or similar. Some still have slow modems. For another thing, someone is still paying for the bandwidth you are requiring with the additional transactions. Most web-designers don't pull out the pocketbook -- their client does. If your client ever catches on to the fact you're blowing bucks needlessly, your client will be shopping for a new web-designer.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Sep 24th, 2005, 1:07 PM   #8
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
There goes DaWei again, just inflating his post count :p
__________________

tempest is offline   Reply With Quote
Old Sep 24th, 2005, 1:28 PM   #9
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
javascript is like a "lite" programming language and can help you ease into the harder stuff. it's syntax is very OO Java style.

btw, javascript for dummies is the worst goddamn book i've ever attempted to read. put it on the back of your toilet in case you ever run out of toilet paper. i don't say that because i'm some kind of literary elitist and despise anything that says "for dummies" on it, but in that particular case it should have been called "javascript by a dummy". like 6 pages into the book it shows this example program with all these foreign constructs that's like three pages long, and your first impression is "whoah, this is TOO hard". it's NOT. the book never explains anything very well. i was really upset when i bought it because that was when i first got into this stuff and i thought maybe it was just too damn hard.

i GREAT javascript tutorial for someone with no programming background can be found at www.htmlgoodies.com and it's free, so what the hell. :p
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Sep 24th, 2005, 1:34 PM   #10
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
Nice avator, bl00dninja.
__________________

tempest is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:09 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC