SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Evangelist Fleeters's Avatar
    Join Date
    Jul 2003
    Location
    Dumpsville
    Posts
    406
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    im retarded.....

    ok, so now that i have your attention. I know PHP and javascript are complete different languages. but is it a good idea to know javascript before going to PHP, im getting frustrated with javascript because of all the different ways you have to code. I know theres a standard dom now but there are still kinks in that.

    I already know how to do what everyone uses javascript for. Image rollovers, and style switches; basically. So my question, is it a bad idea to skip javascript and move right onto php. i know php isnt client side but if the only thing you use javascript for is image rollovers or styleswitches (oh and dynamic menus with css) then what does it matter? also is it possible to write cookies and style switchers in php. i really want to get into php and for some reason i got the impression that i had to know javascript. is there anyone out there that knows php and mysql but could care less about javascript???
    Aaron Smith
    smithaaronlee.net

  2. #2
    SitePoint Enthusiast Zero G's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I would say just move on to PHP. You sound like you know enough JS to get by so you should be fine. Plus if you ever need to know more JS you can always go back to JS.

    Yes you can right cookies in PHP and I Think you might be able to do style switches (Iím not to sure what youíre talking about).

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2002
    Location
    Toronto, ON
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all, you're not retarded...just a beginner We were all beginners once...

    Yeah, you can switch styles in php, but you will have to reload the page--you can't do it dynamically like with javascript.

    I use primarily PHP but sometimes javascript. Often you can find a javascript on the net somewhere that will suit your needs, so it's not necessarily a "bad idea" to skip it.

    PHP and Javascript use many of the same operators and control structures, but you don't need to know javascript first.

    I'd say go for the PHP, but that's just me because I love PHP

    Matt

  4. #4
    public static void brain Gybbyl's Avatar
    Join Date
    Jun 2002
    Location
    Montana, USA
    Posts
    647
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've never actually written any Javascript (other than turning off a submit button once it's been clicked).

    If you learn PHP and have some idea about data types and objects then it will actually be easier to learn Javascript.

    It's the same with any language, really -- Once you learn one language well enough, the only trick to learning a new language is that you have to learn the specifics of the syntax in order to become proficient (essentially, unless you are going from something like Javascript to something like C, where the differences are so huge that you get frustrated and punch things (yourself) in the face.))

    Go for PHP -- Use javascript as you need it.
    Ryan

  5. #5
    SitePoint Evangelist
    Join Date
    Jul 2001
    Location
    Michigan, USA
    Posts
    414
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's completely unecessary to know Javascript in order to learn PHP. Sure, a little bit of any other language will help a bit in the way of learning PHP, but it's not needed. PHP and Javascript are used for entirely different things to; you may have a use for one and not the other. I have never had a need for Javascript, and don't know proper syntax in it, yet, I can program in both PHP and Perl.

    If you feel PHP will be more useable than Javascript, learn PHP first

  6. #6
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Retarded people are people too.
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  7. #7
    SitePoint Evangelist
    Join Date
    Jul 2001
    Location
    Michigan, USA
    Posts
    414
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Jeff, you are exactly right. I am disappointed in how socially accepted the phrases "I'm retarded" and "You're retarded" have become. Completely inappropriate. I'd love to throw some rating points your way, but it seems I've recently given you some.

  8. #8
    SitePoint Zealot Ghandi's Avatar
    Join Date
    Sep 2002
    Location
    Kansas
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:

    Well people are not really referring to the "mentally challenged". It is more like "I can't believe you did that/said that/thought that" ect ect ect.


    Now back to the topic at hand.

    It does seem that you know enought JavaScript to get around. I say go for PHP, but you can come up with some reallly cool things if you mix PHP and JavaScript. As for me I can never figure out why the JavaScripts won't work. But definitely if you combine the two you can get some really cool stuff going on.
    W.W.G.D. :: What Would Gandhi Do
    http://patkohler.blogspot.com/

  9. #9
    SitePoint Addict Viral's Avatar
    Join Date
    Nov 2001
    Location
    Washington DC
    Posts
    294
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is a strange question to me. You point out that you understand they are completely different languages, used for completely different reasons. but then you ask if you just skip learning JS before learning PHP. In my opinion, that's like asking "Should I skip learning to swim and just go straight to learn how to drive? I already know how to tread water, so I'm not going to drown in most circumstances, so should I just concentrate on learning to drive a stick shift?"

    As you pointed out, they are COMPLETELY different languages. They have nothing in common. PHP is server side, javascript is client side. At the end of the day, know both will make your coding life much easier, but you could live your whole life only knowing one or the other if it suits your needs (just like driving a car and swimming).

    My advice would be to learn both, but learn PHP first. It a more useful (and structured) language. And JS should be a breeze once you get the basics of php down. It's an extremely easy lanaguge to pick up.

    --Viral
    A computer without Windows is like a chocolate cake without mustard.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •