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

Choosing the appropriate language for the situation

Just a quick question, I recently completed the java-script & jquery basic videos and now have moved on to learning ruby on rails. I was wondering how does one pick which language to use for their project. Do you use both together? Or pick one or the other?

2 Answers

That is the real difficult question, IMO.

In my experience, the language gets usually dictated to me by some factors. I get more re-design website jobs than anything for some reason, and for that reason, the client already has a hosting server and is not willing to change, or will only accept to switch into a new server after a certain date. That comes attached with what languages are available, for most of my clients are smaller companies who have multi-tenant host available to them, like Bluehost, GoDaddy, Hostgator kind of services. Some of those companies haven't heard of cloud computing yet.

Sometimes if you suggest moving on from PHP into Ruby it may mean they have to switch hosts or pay more for their hosting, which is why some clients will be resistant to different languages.

If you're the one picking, and you are in liberty to choose the host and everything, you can pick one you like, because it is most familiar to you or make your choice based on features available, and whatnot. If you offer to move the files and handle the whole migration for the client, they are often a lot less resistant to change... And if you can offer free hosting for a year somehow, they would have a real advantage in the switch.

Rarely there will be a case (in smaller companies at least) where the language actually matters. Maybe you need to interact with a specific kind of database that is shared by other applications, like a stock app, or whatever. In those cases, usually there is a local programmer who can help you understand their needs and might be willing to give you a hand or a starting point in the migration and will often be able to discuss what's the best language with you.

Camilla said a lot of truth of the situation there. I would also point out that using Ruby on Rails as a framework doesn't keep you from using JavaScript in your application, nor PHP. A combination of the three, or different combinations of any languages can be beneficial in many cases. Working with many different languages and integrations of languages and feeling out how you fit them together is beneficial for you as a developer to begin to piece together what languages you feel work well together.

This all makes sense, hopefully as I learn more about Ruby it will make sense which language is more appropriate for different parts of my projects.