Jump to content

Learning Javascript/AJAX from PHP


graham23s

Recommended Posts

Hi Guys,

 

i figure it's about time i took a dive into javascript i really want to learn about AJAX , but obviously need to learn some javascript first, my question is , have any of you guys found it easy/easier going to another language from another? from what i can see javascript used if/elses and functions like PHP , so should that make it easier for me to learn kinda thing?

 

cheers for any input

 

Graham

Link to comment
Share on other sites

PHP belongs to the class of programming languages labeled as procedural (or even object oriented) I guess.  All languages belonging to this class of languages will share the same concepts, stuff like functions, variables, statements, looping, conditional testing, etc.  If you understand the concept in one language, you should understand it in all of the others.  Where the languages can differ is in the syntax:

 

PHP

if($value == true){
  echo "Hello";
}

 

Some other language

IF value = true THEN
  print "Hello"
ENDIF

 

If you understand the general concepts of PHP, then you should be able to figure out that the other code does the same thing.  You should be able to draw the correlations between a variable in one and a variable in another.  And if I were to ask you to write code in the "other" language that tests value against false and prints "Bye" as its message, you should be able to do it based on what I've shown you so far.

 

To take your question even further, PHP, Java, C++, Javascript, and several other languages, are all essentially built off ideas from the c language.  As such, they all have a lot of similarities in syntax, such as with if-statements as you already pointed out.

 

Lastly, the best place to learn is from a good book by a good author.  I find that overall, books published by O'Reilly are very high quality.  I knew a little bit about Javascript, mostly derived knowledge from what I knew of other languages, but the book I purchased on Javascript really gave me an in depth look into features and ways of doing things that 90% of all online articles neglect to mention.

 

IMO, skip the online tutorials for Javascript.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.