views:

294

answers:

7

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?

+5  A: 

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.

Rayne
A: 

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.

igotmumps
+5  A: 

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.

TokenMacGuy
+1  A: 

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.

Colin
+2  A: 

PHP is pretty easy, you can use a WAMP bundle or build your own LAMP kit to start learning.

I would also give a shot at Python

Philippe
A: 

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.

schweerelos
+1  A: 

For starting out, PHP. The documentation for PHP is, honestly, top notch- and you learn the language and the fundamentals of web development side-by-side (Whereas, with, say, Ruby, or Python, you have to learn the framework and the language.)

php.net is a learning resource par excellence, with a complete library, manuals, and tutorials- all of which are commented on by a peanut gallery of developers who provide sample code and important gotchas. Find PHP's manual here: http://www.php.net/manual/en/

Once you've nailed the basics of PHP development, though, you have to move on. Step up to Django, or Ruby on Rails. These frameworks are jam-packed with nigh-mandatory features that seem frustrating to learn at first, but eventually make your life as a developer much easier. Templates, the MVC pattern, database migrations, ORMs, the works. The best part is that, when you return to the wild and wooly world of PHP, all of the concepts you've learned from your framework of choice can be replicated in PHP.

Curtis Lassam