Jump to content
xisto Community
Sign in to follow this  
Ayla1405241517

Best Way To Learn Javascript I would very much like to know.

Recommended Posts

Well, I know HTML, I know CSS, so the next step is learning Javascript. I have heard that it is sort of an easier way to do things than PHP, though I would very much like to learn PHP as well. So, I thought that if I learnt Javascript, I might find it easier to learn PHP when I get to that point. The problem though is actually finding out the best way to learn Javascript.I have been to websites and things, but every time I read through the tutorials and articles and things, I didn't learn anything. It when in one ear and out the other, you could say. So, that is why I am psoting this. I would very much love to know what the best (easiest and quickest) way to learn Javascript.Thank you in advanced. :)

Share this post


Link to post
Share on other sites

I personally think that javascript is a lame language, go with php and don't worry to much about javascript. I never learned javascript deeply, just the basics and the structure of it, you can do powerful things with it, but I usually do this: I have a friend who knows javascript, but it is hard for him to learn php, so many people I know who got deep into javascript, it is hard for them to go deep into php. Javascript, the stuff it does, to write it properly is quite hard and if you encounter some problem, sometimes it is really hard to catch it even with js error consoles.Furthermore, there are plenty of written javascript code out there, of course php too, but most of the php scripts written by others are not really of good quality, people who really wrote good scripts, usually use them for them selfs or they are just lazy to rewrite them for public usage or even document it. As I said, this is just my personal opinion, because I don't know superb knowledge of javascript and never liked it to much, always liked the alternatives.. B)

Share this post


Link to post
Share on other sites

As my professor always says. "The best way to learn programming, is to do it." Study the Document Object Model, and you'll get a basic understanding of how to access content via javascript. The language itself is very similiar to any other scripting language. Like mentioned before, PHP would probably be a better choice, but if you want Javascript for a reason, it's always good to know. I recommend looking at online tutorials and finding examples. The one thing about javascript is it's hard to debug. Mozilla Firefox has a javascript debugger that works alright, and firefox has the extension, but it's still aggrivating to debug. I definately suggest using firefox because it has the javascript console over internet explorer to develop javascript.

Some places to find a good primer are
http://www.htmlgoodies.com/
http://www.w3.org/TR/REC-html40/interact/scripts.html

Just look into the DOM and event handlers. That plays a large role in javascript. As far as advanced Javascript, I have no idea. I would like to know myself. B)

Share this post


Link to post
Share on other sites

I had always wanted to pursue Javascript and/or PHP and learn more about it. But i find it extremely hard to learn if i don't get to apply it myself. Like when i first started HTML, i had a bunch of questions about how to do this and how to do that and display everything like i see in other sites. When i started CSS, its because i wanted an alternative to iframes and to better organize my source codes well. So basically, I've been using HTML and CSS for every coding I've done. Javascript isn't necessary in making a good-looking site which is why i never really used it and PHP too.

Share this post


Link to post
Share on other sites

I would not avoid learning Javascript, it can help speed things up, especially if a lot of things can be done clientside rather than using the server.I'd say, read the EMCA-262 on Javascript, it's not really going to help you learn like a tutorial would but it's more like a reference and guideline, it's also the standards.I know a lot of web languages, but you shouldn't avoid using javascript, as long as you apply it correctly, it can dramatically help speed things up. The term coined "AJAX" is definitely something to keep an eye on, as more and more web applications are built using it. Learning the DOM API also would be required.There's some who don't use Javascript, but you'll find that in most situations it's neccessary to run, since web developers don't degrade nicely without it. So do try to learn how you can also get by without using Javascript, since that's important to do too.Cheers,MC

Share this post


Link to post
Share on other sites

Có ai có địa chỉ để download ebook về JS không? chỉ cho tôi với! Tôi cũng muốn có 1 quyển để học và hiểu để lảm về AJAX

 

Does anyone have an address to download ebook about JS not ?just for me ! I also want to have a book to learn and understand to make the AJAX

. Edited by moderator
Translated from Vietnamese to English (see edit history)

Share this post


Link to post
Share on other sites

Head First Javascript helped me learn. You can get a paperback version for $20 on Amazon.w3schools.com is a really helpful website with all kinds of scripting examples to look at and downloadI know you said you didn't like online tutorials, but if you take it slow w3's are really quite helpful.

Share this post


Link to post
Share on other sites

I think the best way to learn Javascript is to create in text editor a simpliest HTML file and save it on your local machine.

For example, you can create something like:

 

<html><script language='javascript'>  function mytest() {	   // any javacript code for testing purpose  }</script><body>  <input type='button' value='Do My Test' onClick='mytest()' /></body></html>

Having this you can put into the mytest() function any javascript code whatever you want -

for example, you can take any part of code from the tutorials and execute immediately.

For debugging purposes it is very useful to use the method Alert(). It gives a possibility to visualize any intermediate calculation results etc.

I think the method Alert() can be considered like an altervative of debugging breakpoints, used in Java and C++ IDE.

 

For example, I want to use some simple math formulas in Javascript and I found in tutorial how to do this.

I am updating mytest() function:

 

function mytest() {	 alert('mytest started');	 var arg1 = 2;	 var arg1 = 3;	 alert('before finding result');	 var res = Number(arg1) + Number(arg2);	 alert( res );}

When I open my test page in the browser and click "Do My Test" button, I see alert message "mytest started".

So, I am sure that mytest() function is correctly called by Javascript.

After that I see the message "before finding result". It means, that I still di not have any errors in Javascript.

But I do NOT see the message with the result of calculation. It means, I have some script errors on the line

var res = Number(arg1) + Number(arg2)

What is wrang???

I am looking on my code very attentiavelly and I see:

variable arg2 is not declared, but used on the right side of Javascript statement

because I decraled two times variable arg1!!!

 

I correct my Javascript code:

 

function mytest() {	 alert('mytest started');	 var arg1 = 2;	[b] var arg2 = 3;[/b]	 alert('before finding result');	 var res = Number(arg1) + Number(arg2);	 alert( res );}

After re-opening updated page in the browser, I see all alert messages, including the message with result "5".

It means, my Javascript code is perfect and ready for using anywhere in my future job!

I can add this debugged source code to any other Javascript code (with a very complicated business logic) and I can be sure it will work correctly.

 

So, step by step (looking at tutorials and realizing immediately), I can create with Javascript any bussiness logic for my project!

Edited by moderator
Code tags added (see edit history)

Share this post


Link to post
Share on other sites

Umm, the best site there is for basic scripting learning:http://forums.xisto.com/no_longer_exists/ will teach you everything you need, begging at HTML, through JS, XML and others...Strongly recommended..

Share this post


Link to post
Share on other sites
I know exactly how you feelBest Way To Learn Javascript

I will share with you a great YouTube channel that demystifies the basics of JavaScript:

http://forums.xisto.com/no_longer_exists/

(Don't mind the wallpaper there...)

If you are intermediate or advanced you may scoff at this, but for a total noob like me it has been extremely helpful. At present there arejust 27 tutorials, but they are presented in a way that is easy to comprehend.

I can relate to how you feel about PHP. I began learning PHP with a book and some video tutorials I pay to subscribe to, but when it came to setting up a testing server and getting a MySQL database up and running, those resources were poorly documented. They assumed the user already knows how to do this. After searching desperately for online MySQL tutorials, I eventually found none that answered my questions and in the meantime I forgot the PHP I had learned. That's the problem with PHP: you have to learn it in conjunction with a database language. And in MySQL's case that leads down a dark and winding labyrinth to nowhere. You need to learn about Wamp/Xampp/Mamp, phpMyAdmin, how to set the testing server up in Dreamweaver, how to import a database, etc. You are on your own in this web-wide scavenger hunt to put the fragmented pieces together.

I knew that JavaScript requires no testing server, so I decided to learn that instead. With the growing popularity of Ajax, I think it is an important skill to have. I plan to revisit PHP at some point, but as of now there are just not enough good resources for learning the MySQL that goes hand-in-hand with it.

Share this post


Link to post
Share on other sites

The best way to learn js - is start from this:

JS and of course ajax

But, when you will try do some scripts in diferent browsers, you see different behavior of js. So you should take a look at some framwork. My chooise is jQuery for usual programming, and if yo want something for very rich ui - your choise can be Dojo or ExtJs.

Tutorials for jquery can be found here .

There are great documentation with a lot of examples.

Good Luck.

PS: imho  :o

Share this post


Link to post
Share on other sites

JavaScript is quite easy to learn, once you get the hang of it, I used to hate it, but as the situation in web has changed dramatically, you need to use a lot of JavaScript these days. It's best to use tutorials and do it yourself, learn it, once you get the hang of javascript, in my opinion it's best to grab some kind of a framework, like jQuery, even though it's not a framework, it's more a javascript library.At first it my look quite hard to learn and understand it, but once you get the hang of it, it's really great and there's a lot of plugins for it you can use. It adds a lot of code to the site, when you include jQuery and a lot of plugins, but it gives you a lot of possibilities to make your site much more interactive.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.