What should I study next? - JS or PHP?

A pleasant evening guys, I just want to ask (especially the experienced and the 'pro’fessionals) what’s the next subject I should study after I learned XHTML and CSS 2.1.

Should I go to JavaScript or PHP? Some people told me to jump to PHP since it gives a good programming practice, but Mr. Ian Lloyd suggested in his (very good) book to study JS first then server-side programming - PHP.

What should I choose?

Sorry for asking a bit naive question, but it is really bugging me for a while. I really like to learn them both, but don’t know where should I start.

I’m sorry for my bad english. :sick: :sick: :sick: Please help, thanks you in advance.

I would go with PHP first.

+1 for PHP,
Javascript is powerful, but optional (i.e. users can disable it. Most don’t, but you shouldn’t pin core functionality on it, particularly security).
PHP is less “impressive”, but gives you so many more options - and is less of a moving target than Javascript to learn. I also think you might find JS easier to learn after PHP, server side is a bit more “stable”, JS implementation can change from browser to browser.

I would continue with javascript.
First learn everything there is to know about client-side programming and then use server-side programming to enrich what you can do with client-side programming.
Also, imho, javascript is easier to learn than php.

PHP is the foundation for most front end coding. JS is very nice to know, but as someone mentioned, it is optional. I would suggest PHP, as it is kinda a must know, especially with web development.

And a good evening to you too, Jelome! :slight_smile:

After learning (X)HTML and CSS most people would actually suggest learning JavaScript. I strongly recommend that you learn JavaScript before PHP because of the following reasons:

  • After learning JS you’ll know all of the three main Front-End / Client-Side Web Development languages and you could get a decent job with such a nice skill set.
  • In my opinion from learning both JS and PHP, I would say JS is slightly easier to learn than PHP and I recommend it as a persons first scripting language.
  • It’s common that you’ll develop your skills so you’re either a Front-End / Client-Side Web Developer or a Back-End / Server-Side Web Developer. You don’t really want to mix them up. I would suggest being a Front-End Web Developer and then extending that knowledge to PHP & MySQL when (and if) needed.
  • You don’t need to have a server that supports PHP and you don’t need to start spending on any Web hosting that supports PHP. You don’t need to have any frustrations and hassle (a lot of people seem to, but it depends on whether you like reading a lot) trying to install a server platform on your local machine to use PHP. You can just practice JS in the Web browser locally as you do with HTML and CSS.

And another very good reason to learn JS (now as in today!) over PHP is that SitePoint itself is going to be running a LIVE JavaScript Course for just a meesly $9.95! Seriously! Have a look at the blog post - Introducing Kevin Yank’s JavaScript Live for more information. You might find that you’ll get everything you need from that course, and if not then you’ll have experienced some new learning method rather than just books, which cost a lot more. I highly recommend it.

All the best in your Web adventures Jelome! Whichever language you decide on, you know where to come for more help! :wink:

Andrew Cooper

Sorry, you mean PHP is the foundation for most Back-End coding, right? And I wouldn’t say that that statement is entirely true either, but hey ho! :slight_smile:

Andrew Cooper

Yeah, thanks for the correction on my typo, but agree to disagree.

Thank You sir,

You’re right Sir, that’s the weakest part of JS (when turned off or when certain devices doesn’t support JS). And so that is true, thanks for confirming that starting from PHP to JS will start good programming habits. Thank You sir for your inputs.

Maybe my position is quite complicated, because I’m studying to find a job. If I jump to PHP (which is a server-side programming), I may end up wasting my knowledge of XHTML and CSS, if however, I continue to JavaScript, I can concentrate on doing web pages, enhancing knowledge on front-end/client-side scripting. Although I really like PHP, but my job insight says that I should have a focus (I only have 2 months to study), because I cannot do both jobs in a company (unless I’m an expert, which is not the case as of now). Thank You sir for your inputs. I’m still in the process of weighing what should I continue next. Thanks!

That’s the reason why I’m hesitant to jump to PHP, because it’s already server-side, but hey thanks, we have the same thoughts about the issue. Thank You sir.

Thank You Sir Andrew for that broad yet brief explanation (sorry for the english), you cleared my doubts by your simple statement “It’s common that you’ll develop your skills so you’re either a Front-End / Client-Side Web Developer or a Back-End / Server-Side Web Developer.” Because I’m in a hunt for a job, then maybe a company can easily hire me as a client-side web developer. Then I’ll just extend (as you have suggested) my knowledge on server-side when I already have a foundation on client-side scripting. Thank You sir for that very good input. Thanks!

That’s a no brainer. Javascript first. You should control front-end and then go for back-end.

Regarding Javascript turned off… Javascript is to enhance and make the site more usesable, but the site should work perfectly without it: Progressive enhacement :wink:

That JavaScript can be turned off by the user is just one of the things you need to take into account in deciding what processing should be written in JavaScript. Not everyone makes the right decision there - particularly when the person deciding is not someone who writes JavaScript.

Thank You sir for that input, and yes, that’s true, the way how the books (that taught me XHTML & CSS) unanimously stated that JavaScript should only be used to enhanced websites (behavior), and not to rely on it when dealing with presentation, except when solving some css bugs for old browsers like IE 7 and earlier.

Yes sir, that’ correct, any aspiring web developers should always consider usability than presentation, and I believe JS is only to be used to enhance a website, not to replace structure (xhtml) and presentation (css). Thanks for the inputs Sir. (sorry for my bad english).

I’m happy reading everyone’s opinion, because I’m learning a lot. Thank You everyone. ^^,

Good day Guys!

I am now completely convinced that I’ll first pursue JavaScript then PHP later on (after enough experience on Client-Side, I have much to learn). But before I jump to JS, I’m going to tackle Microformats first, which will teach me how to properly use of tags and css’ ids/classes.

Thank You everyone for sharing your thoughts/views about this simple issue, I learned a lot.
I don’t know how to close this thread, but I’m leaving it off now.
Again, thank you everyone. These were nice discussions ^^,

That’s a good choice too :wink:

Best of luck.

To close a thread, you contact a member of staff (orange, green, blue and red badges).

I happen to be green so I’ll close it for you. Now it is officially closed :lol: