whats easier to learn, php or javascript?

Discussion in 'Programming' started by whiteblue1942, Mar 16, 2008.

  1. #1
    anyone?:confused:
     
    whiteblue1942, Mar 16, 2008 IP
  2. lofvenhamn

    lofvenhamn Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    lofvenhamn, Mar 17, 2008 IP
  3. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It is arguable which is easier but as said, it is like comparing oranges and lemons, both are a type of fruit but how they are used is totally different and so ease of learning really shouldnt be a deciding factor
     
    AstarothSolutions, Mar 17, 2008 IP
  4. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #4
    I think JS was easier to learn.
     
    joebert, Mar 17, 2008 IP
  5. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I dont know PHP at all but I am surprised that you consider a client side language to be easier given you have to contend with different clients and their interpritation of code - took me an age to sort out the simple thing of making the enter button act like tab on all main browsers due to the fact that IE, FF and Opera use a different method and in IE the event is read/write where as Opera and FF is read only. Didnt even try to get it working on Mobile versions of browsers that are different again.

    Given you have a controlled environment on any serverside language you dont have a concern with "will my SQL query work if the user is on IE Mobile rather than Safari"... the HTML it generates you have to be concerned with browsers but fixing HTML for cross browser compliance is generally a lot easier than JS, plus if you use things like .Net then the frameworks own controls have cross browser (including if JS ie enabled or not etc) compatibility built in which are updated via automatic updates as and when new browsers are created
     
    AstarothSolutions, Mar 17, 2008 IP
  6. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #6
    I can save HTML with JS in it on my desktop and start learning JS immediately in my own little sandbox.

    Before I can even find out I did something wrong with PHP, I either have to rent hosting or figure out how to setup my own HTTP server and secure it.
    Assuming I take the easiest route and rent hosting, I still have to contend with server-specific quirks equally frustrating to the quirks found in web browsers.

    Then there's the thousands of functions PHP has & inconsistant function naming. Where as with JS there's less core functions than PHP has different classes of functions.

    To each their own, but having spent a good amount of my personal time over the last 4-5 years with JS & PHP I'm going to have to say JS was much easier to learn.
     
    joebert, Mar 17, 2008 IP