Which web language should I learn?
Showing comments 1 to 8 of total 8 on page 1 of 1
I am wondering what other people have experienced in creating a web service application, what language/framework is best suited for a beginner? Are there characteristics of the chosen language that make it better suited to programmers of a certain way of thinking that makes language XYZ appeal to particular programmers more?
I'm looking at learning php, Ruby (probably RoR), or Python (using Django). Every search I do comes up with one person saying how wonderful one is then another person bashes it, and I'm not getting any sense of why a particular language would appeal to a particular user and be more suitable for a choice to use, or where a particular choice would appeal to a given task like communicating with a MySQL database or ease of long term maintenance of an application.
Anyone have input on this without turning it into a debate?
I would have to say PHP. It's supported everywhere, there are so many frameworks that it's hard to count, and there is so much documentation for beginners and experts alike that you could drown in it! All together save for some faults PHP is a very good language with a huge library. I would definitely try them all though but you will probably end up using PHP eventually anyways.
I'd have to say Perl is a good place to start. It has just as many frameworks as PHP, is supported just as much, and has as much or even more libraries to utilize. MVC frameworks like Catalyst or CGI::Application or templating systems like Mason or Template Toolkit make building highly scalable web apps achievable. PHP may be better because of its load-and-go nature. But I like Perl for its performance and wide scale availability.
For self-directed learning, PHP is actually kind of hard to beat. It's forgiving in the sense that the language is flexible and straitforward. The library is easy to learn and even easier to search through. Being able to mix code and markup can speed learning as well.
In the long term though, there's not much else PHP has to offer. Java, Python, C# all offer better designed languages and more consistent libraries at the cost of slightly more layers of abstraction.
It's hard to make a recommendation, as there are pros and cons of each choice. I would personally choose PHP or Perl, for a few reasons:
Ease of installation: Getting these languages working with Apache is much easier than most other options.
Breadth of support: Almost every unix web hosting service offers php and perl (either through mod-perl or cgi).
Documentation: Both languages are thoroughly documented, and have great support.
Libraries: MySql integration, for instance, is very easy and very mature. Perl in particular has CPAN, one of the most extensive libraries for any language.
Communities: It is not difficult to find people ready to help with a specific problem.
Perl, in particular, is very useful for system administration as well. So, if you learn it for web development, some of that knowledge should carry over into other domains. The same is true for Ruby, but there are few applications of PHP outside of web development.
There are detractors, though:
Messy syntax: Yes, their syntax is ugly, and sometimes inconsistent.
Poor support object-oriented programming: If that's what your looking for, Ruby is probably a better choice.
I would also give a shot at Python
I'd go for Perl as the very first step, CGI.pm to be more precise. Its big advantage is that it doesn't obscure the communication between your web pages and your code. This means that you'll really understand what is happening. The CGI.pm documentation is great and for simple projects, you probably won't want to do anything that isn't covered there.
Once you've understood what you're actually doing, you can (and should, for reasons pointed out in other answers) move on to other languages. Once you've progressed far enough, definitely go for a framework such as Rails or Django.