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

JavaScript Node.js Basics 2017 Introduction to Node.js Why use Node.js?

Aaron Duke-Wood
Aaron Duke-Wood
13,526 Points

Should I be focusing on Node.js over other Back-End Languages?

Hey, I am starting to become more confident in my Front-End Development, but am now wanting to stretch out into the Back-End world.

Can Node.js complete the majority of tasks I will need for creating databases on simple websites?

Will this language be just as good or better for e-commerce, login storage, email databases, etc?

Or should I also learn other languages as well such as PHP / Rails?

Thanks in advance!

Bryan LeBlanc
Bryan LeBlanc
2,482 Points

From my experience and after talking with other developers, Javascript is the future of web development. PHP might still be the number one server-side language but thats only because its been around for so long. The Ruby community is quiet right now which is never a good sign.

With that said, If your trying to be a freelance developer stick with PHP and Laravel. Most of your clients will need WordPress sites and you will want to edit using PHP.

5 Answers

Dom McKellar
Dom McKellar
6,052 Points

There's no correct answer. The tech world is fluid and things will always evolve. As someone who wasted a lot of time obsessing over picking the "perfect" language and framework, it now seems like a wasted time and energy.

  • Watch a couple of intro tutorials, you may like one more than another.
  • Also as an indicator, you may want to check job openings in your area. For example, Rails has been a popular choice for startups. So having experience with Ruby - Rails would help you land a job in San Francisco but may not be as helpful in other areas.
  • Also recognize you're asking this question in the Node.js section. Asking the same question in either Ruby, Java, or PHP sections will likely result in different responses :)
Oziel Perez
Oziel Perez
61,321 Points

Agreed, that's why it's so important to grasp the fundamentals of programming first, then learn about programming patterns and techniques for the specific environment that you will be working on (such as a server) and then finally picking the language you want to use. Different agencies may use different languages, so it's up to you to familiarize yourself with what's more in demand in your area. You should aim to master at least one language and at least be familiar with how other ones are used. Because of this, I'm more proficient with PHP than with anything else because I've used it the longest and was the simplest for me to learn and implement into my projects. I also got familiar with Python at the flask framework because it's a more robust programming language, but now I realized that what's in high demand nowadays is the Node.js platform and so I'm focusing on that, in case I ever lose my current job and have to find another one. Additionally, I have my eyes on working with Java or ASP.net if I have to work with a windows server; If anything I should be focusing on that since my employer uses windows servers and I want to build applications that will work well with their accounting software....

It's all about what the job calls for, so each language has different tools and strengths.

Kevin Gates
Kevin Gates
15,052 Points

Here's my "junior developer" 2 cents. If you only know JavaScript at the moment, I would encourage you to learn Node.js first. But to continue to learn other languages for the back-end as time permits.

Reason 1: This will allow you to learn a back-end technologies and start learning important back-end concepts, without the distraction of learning another language at the same time. Reason 2: Node is popular and in high-demand, so it won't be a waste of your time. Reason 3: After you understand back-end core concepts with Node (JavaScript), you will more easily be able to adapt your understanding to a new language. Luckily for you, this time you'll be focused on learning the language itself primarily (along with some unique back-end functionality related to that language).

Hello, Aaron Duke-Wood. I will begin by answer your doubts. You can indeed create an e-Commerce, Authentication system, and anything else that you can accomplish with a backend language with Node.js. Likewise, PHP can accomplish the same tasks, I know since I've used to be a PHP programmer. Only the approach is different.

I will not recommend you to learn either one over the other since that is just stupid. Because let us face it. You are a web developer, and you want to develop dynamic web pages, right? You can do it with either one of them. Why should you care about Node.js possibility to create cross-platform application, run on Raspberry Pi, or whatever else people can do but not need? Or how about PHP's command-line application?

Do not lose track of your goal. But if you have time to learn how to create cross-platform application, program Raspberry Pi or create a command-line application, then surely you have the time to learn both languages.

Jonathan Kuhl
Jonathan Kuhl
26,133 Points

You can focus on one. But it's better to at least know a few other options like Flask or Django so you can have options to chose that can better fit your web app.

I wouldn't really try to be a master of all, because that's impossible, but just get a handle on what their strengths and weaknesses are and pick whatever language/framework suits you best.

Oziel Perez
Oziel Perez
61,321 Points

Exactly. Since he mentioned Flask or Django, I would point out that those usually have to be implemented on a VPS or deployed to an app hosting service like Heroku. If you are on a shared server, very often you will not be able to use python on your hosting account because it will have to be configured to work with the servers settings (I was lucky that Dreamhost provided Passenger as a wsgi interface so I could use python), which you will not have access to, in which case, your best option might be to use Slim for PHP, especially if you are building templates for a lot of web pages. The point is to choose the right tool for the environment.

wildgoosestudent
wildgoosestudent
11,274 Points

If you're just starting out I would recommend choosing a language (in this case js) and sticking with it. I learnt Ruby/Rails first and now, since I understand the dev/programming concepts, it makes learning a second language (js for me) significantly easier.

You can always learn a new language so just focus on the concepts for now.