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

General Discussion

What language should I learn next (after HTML & CSS) ? Should it be JavaScript or PHP ?

Hello everyone,

I am in a bit of a phase, where I can't decide, which programming language should I learn next. I have a decent understanding of HTML & CSS, so now I am thinking, as to what should I choose next. I want to be able to make fully functioning websites eventually, and i know that JS and PHP are both important, however, I once tried to grasp JS and it was very hard.. So now I am not sure what to do, I would love if someone could answer my question honestly, and give some reasons as to why they suggest me that. Thank you in advance!

3 Answers

It depends on where You want to go. If you want to head towards Backend development then PHP, if you want to continue mastering the Frontend development then JS is the way to go. That is completely up to you on what YOU want as a developer. Eventually ofcourse its good to know both.

If you're on track to become a fluent front-end designer/developer, you'll definitely want a grip on JS. PHP is one of the shorter tracks on Treehouse, so you could run through it and come back to JS. Another idea would be to wait a bit before picking up another language and, in the meanwhile, work on some sites showcasing your HTML and CSS -- rock some animations! -- then come back to it with a fresh mind. You'll know what's best -- GL!

I would say if you have done html and css, you are learning a lot of front end stuff, you should complete your front end knowledge by learning javascript and then move onto server sided stuff. I think it's a good idea to do both, but javascript maybe first. This way you have a full arsenal of skills before moving onto the server sided stuff which I think would be the next step. I would also say it's important to make sure that you absolutely have a good grasp of HTML. CSS and Javascript, perhaps by building multiple projects to showcase your skill until you move onto the server side of things.

PHP and Javascript are quite different, not just in the way they work but in what they do. You can do a lot of things and build a lot of websites without PHP (or any server sided language) and if you have good enough skills plus can showcase these you can also find employment as a front end web developer/designer, but usually javascript is something you will also be required to know in this area, if you skip ahead and do PHP, you are leaving this area of your skill set out and will have to come back to it later. You mentioned that you found javascript difficult previously, I wouldn't say personally that learning PHP will make javascript learning any easier, so I would recommend just jumping in and mastering this first, as you will most likely be required to do it at some stage.

In short, my view is that it is best to finish one area before moving onto the next and the next logical step for you is Javascript, I am sure you believe this too, but perhaps your resistance towards it, is due to you trying it before. Doing this will round off your front end development skills before you move onto the next step with is server sided skills (which you may also want to explore other languages than just PHP)

+1 to this

Hello, I have read your message and I am grateful for the insight! I think I will do JS now, I will try to grasp it fully, I tried to do "Eloquent JavaScript" book, and for me, it was quite hard, like there were a lot of parts I didn't get, so now I got this JS-phobia that I need to get over somehow. I will try it now. I am not sure if my plan is good enough, but I will try to learn JS and when I am not learning JS, practice HTML and CSS, since they are necessary. If you have any suggestions, please tell me them, I am grateful for your long message and time !