Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Confused! PHP or JavaScript ???

After learning Front End Development course from Teamtreehouse, which one i choose next and which one is most important to start work in web development industry......PHP or JavaScript????

Both are great choices. If you've completed the front-end track then you've already used some JavaScript. You can build on that knowledge and learn how to use Javascript in a variety of ways with the full-stack JS track. Alternatively, you can learn how to make HTML more dynamic with PHP and SQL. Both tracks are equally good and will greatly enhance your resume.

2 Answers

It really depends on what you want to build. If you are really not sure, first ask what do you want to build and what tools do i need to build it. Then learn that language. As an example, are you going to build a SQL database? yes, then php is the go to because you can not access an SQL database with Javascript. Its about what project you want to build and with what tools. Find out what you want to build then break down the process and use the correct tool for the part of the build.

"yes, then php is the go to because you can not access an SQL database with Javascript". That's wrong! You can access a mysql database with javascript.

Thank you

Jaro, If using Node, then yes, Node is a javascript server side environment, but for the purpose of this thread, ie. learning what language to learn. PHP is the correct way to access a SQL database and then have javascript interact with the data. You can not call a database using vanilla javascript. Javascript is a Client-Side script, not a Server-Side script.

Jacob, i know. But in this thread he asked about which track he should go for web development. In my opinion, your answer is wrong. Your saying something like this: if you want to interact with a sql db, you need to go with PHP. And that's just wrong. You don't have to, although for learning purpose it is maybe easier to understand. Its clear that you need a server side language, but you can make use of JS if you want to. Also, in my opinion, there is no "right" way to access a SQL DB, there are just many possibilities which all of them have their weaknesses and strengths.

The thread is about which language to learn. Node, as you said, ins't a language, the language is javascript. So you can stay with js all the way if you want to..

Both are great choices. If you've completed the front-end track then you've already used some JavaScript. You can build on that knowledge and learn how to use Javascript in a variety of ways with the full-stack JS track. Alternatively, you can learn how to make HTML more dynamic with PHP and SQL. Both tracks are equally good and will greatly enhance your resume.