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
Jeff Mathis
3,935 PointsJava Script or PHP?
Which language would you recomend learning first, Java Script of PHP? I have a good grasp on HTML and CSS. from experience.... which one would you prefer to tackle next.
6 Answers
Rik Johnson
393 PointsWell, JavaScript will give your HTML & CSS 'behavior' - a lot of cool stuff to make your web pages interactive, etc.
Though I haven't studied PhP much, I believe it's a server side language. Obviously learning both wouldn't hurt and if that's your intention, I think you're good to pick whichever you like! : )
Jess Pendley
13,128 PointsI'm currently learning both and I'm actually on the PHP Track here, which happens to include Javascript. :)
Maybe it's just me, but I've found that learning them together has actually made them both easier to pick up.
Theodore Kruczek
8,800 PointsI would start with javascript. I found it easier.
Definitely worth learning the basics of both at a minimum. I would do the intro courses on them, see if either sticks better or is more enjoyable and then go from there on how advanced you study either.
I can make a site without javascript, but I rely on PHP to make my life easier. Javascript and jQuery make my sites beautiful, but PHP makes them functional.
Jeff Mathis
3,935 Pointsthanks man ! I plan on learning both eventually.... i figured maybe ill start with Java Script to get a better hand on programming and then move on to PHP. They are both rather frustrating at first ive noticed! In a nutshell whats so cool about PHP ? what do you use it for on most websites?
Theodore Kruczek
8,800 PointsPHP allows you to dynamically create a website. This means that the same code you wrote could show up differently for the viewer depending on some variables - for example (from TeamTreehouse course):
If I have a collection of shirts I want to sell, rather than make a page that displays all of the shirts and then 8 additional webpages, one for each shirt, I can make a PHP page that just changes the picture, title, and description based on what shirt you clicked on. This saves you a lot of time because you don't have to copy and paste all your code and it makes updating things super quick.
More advanced features would be sending email from a contact page, having login features, and much more.
Jeff Mathis
3,935 Pointsthanks for the help!! sounds like good stuff that will get me closer to designing a functional website. looking forward to learning!!!
Ben Plantinga
7,113 PointsOne important difference is that JavaScript will always be necessary on the client side as it's the only standard language used in the browsers. On the other hand there are a lot of different options on the server side - PHP is one of several - other alternatives include Ruby (for Rails), or... JavaScript (Node.js / etc). There is definitely movement towards JavaScript becoming a powerhouse on the server side. Just comparing on GitHub gives at least a rough idea of the number of projects for each language and the popularity (based on stars): Github search sorted by number of stars
No problem with learning both of them, I think it's always better to know more, but if you wanted to pick which one would be more essential - JavaScript would be the way to go.
Jeff Mathis
3,935 Pointscool thanks ben ! would you mind explaining to me what github is exactly? i have been on the site and kind of browsed around but havent really figured it out. would be stoked for an update !
Ben Plantinga
7,113 PointsSure, one good resource is here on treehouse - a course called Git Basics that introduces the basics of using the program 'git' for version control. This allows you have an organized way to keep track of changes to files and adds powerful options such as going back to a previous version, collaborating with other people and easily merging in their changes to your project. A little bit of work to get started with git, but it doesn't take too long to get going with the basics. It is very powerful and quickly becomes an essential part of the development process.
Github serves as a central repository for source code files on different projects. Github has both a free open source side as well as paid memberships that allow files and projects to be kept private. Github has become the place for open source projects to host their source code. There are alternatives, but Github is the main place to go. Many developers, and open source projects especially, will use git to store a central copy of their source code files at Github.
Github is also a great place to learn about new projects, and evaluate the quality of open source tools/libraries/frameworks that you might consider using as part of your own projects. I find it helpful when I learn about key people in a certain topic, to follow them on Github to see what projects they are working on or that they find interesting (by starring a project).
When you get a chance, definitely take the Git Basics course for a good introduction.
Jeff Mathis
3,935 Pointsthanks man !! your awesome. I will definatly be shooting some questions your way in the future!
Theodore Kruczek
8,800 PointsTheodore Kruczek
8,800 PointsPHP is definitely a server side language.