Search code examples
programming-languages

Good combination of web application languages


I've looked around some of the asked questions and I noticed many questions dealing with THE best web application language. I'm curious into looking into a combination of web application languages, possibly some that would compliment each other well. At the moment my list of possible web app languages at the moment are:

  • PHP
  • Ruby on Rails
  • JavaScript
  • AJAX (not really a language on its own)
  • Grails

I know that certain ones like JavaScript and AJAX work well together but I'm curious about the rest. What about PHP and JavaScript? Does Rails play well with others? Is looking to use a combination of languages even a possibility? I know that some may be used for different kinds of applications but I would like to focus on more than just 1 of them. Thanks for the help. Any and all comments are appreciated.


Solution

  • You are mixing everything up.

    PHP and RoR (Ruby on Rails) are server-sided scripting technologies (and Rails is not really a programming language). They can generate content that is served to the user (ie: HTML files), but they can do a lot more. You NEED a server-side language if you want to interact with your users (ie: allow them to leave comments, and etc.).

    Javascript (and AJAX, partially) on the other hand runs completely on the client side. You'll mainly use JS and Ajax to improve user experience, but remember to code your site in such a way it works even if JS is off.

    Generally, as a complement to your server-side scripts you need a database, and among them the most popular ones are relational DB's that support SQL (Structured Query Language), like MySQL, SQL Server, Oracle, etc.

    So, what's the "best" combination for you? It really depends. Hosting with PHP+MySQL is widely available and it's cheap, and PHP has a massive user community, and many freely available libraries and frameworks for you to use. So if you are just getting into web development, I'd suggest starting with PHP+MySQL.