views:

73

answers:

3

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.

+2  A: 

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.

NullUserException
I second this answer: PHP is a language (did you mean for it to be "spaghetti PHP" or did you have some PHP Frameworks in mind?). Ruby on Rails is a Framework written in Ruby (there are other Frameworks). Grails is a Framework written in Groovy (there are other Frameworks), etc. Also, any "current" (Web) Framework will have decent support for various AJAX techniques.
pst
A: 

Rails is not a language, it's a framework. Ruby is the language.

Grails is not a language, it's a framework. The language is Groovy.

Ajax is not a language, it's a marketing term coined to describe DHTML, which was a marketing term coined to describe using JavaScript to manipulate DOM elements and styles.

Regardless if it's PHP and Python, Perl and Java, JavaScript and Erlang, you can use any languages together depending on what you're trying to accomplish.

If you're looking for something learn, I'd say JavaScript (and get down and dirty and really learn it... don't rely on a framework as a crutch) because it's the primary front-end language in the web-world. But that's just my preference.

If you could give us a little more insight into what you're working on then maybe someone can give you a better suggestion of languages to pair up.

Timothy
JS is not the easiest thing in the world to debug.
NullUserException
Is "JS is not the easiest thing in the world to debug" reason to not learn it? It's not 1998 anymore; there are several debuggers for JavaScript available now. I will concede the hardest part is the browsers' DOM implementations, but that's not JavaScript's fault.
Timothy
A: 

Hi Fizz,

  1. A programming language is just a means of achieving a goal, hence the focus should always be on the goal. Just as human languages the goal is communication, hence the languages is relatively not important.

  2. Javascript is client side scripting language, while rest of the things that you have mentioned are serverside scripting languages. No matter what server side language you use you would have to use Javascript for client side scripting.

  3. The rest of the 3 languages are opensource languages. Personally I would choose the most popular technology because

    a. There is a big community, which ensures that the technology is widely adapted because I would like other third party applications gelling well with my application.

    b. Lesser no. of flaws, since someone or the other would report it and the community would try to fix.

    c. Dynamic future release: Since the community would like to see feature which are there is some competitive technology they would always want to add the feature. An excellent technology which has very less community built around it dies its own death since there are no future release and slowly it falls behind the competition.

The next important criteria would be is the tech really suits my application. Like if I am using a very slow embedded system processor, I cannot use python I will have to use C.

Well in all above cases I personally love PHP. PHP has some of the best CMS s/w, which makes life easy and there is lots of code available for free and widely adapted by even enterprises.

Chaitannya