tags:

views:

947

answers:

10

First i started with wordpress, than moved to Drupal and realized that any CMS would not fit my needs since i want a really big flexbility in building my aplications (plus i hate to see worthless code, that i will not use but stays there).

I give up on already made CMS and started learning php from the begining. But in nearly no time I realize that I should move to a more suitable language like Python or Ruby, at least they looks "stronger" than php in many ways, for scalling, programming faster and with less chances to commit errors, etc, is that correct?

About those two languages, wich one would be better to work? I saw that sites like twitter were build with Ruby but also read somewhere (dont remember exactly where) that Ruby is kinda behind of Python in terms of code maturity and scalability so i decided to go with Python (even builded a host in my computer already).

Just want some feedback so i dont lose time learning a "wrong language", i want build a new site soon so need to focus seriously on one language (at least for now).

+4  A: 

This question has already been asked:

The gist of it is: it all comes down to preference. Python is more mature but Ruby allows you to be more expressive. Python is more readable but Ruby is (arguably) more productive. Python is easier to learn but Ruby has concepts that will pay off later. I recommend trying both and seeing which you like. In the end it doesn't really matter.

musicfreak
Ruby is more powerful? Wah?
Paolo Bergantino
@Paolo Bergantino: There are features in Ruby that don't exist in Python and/or are hard to copy (code blocks, anyone?). I love both languages, that was just my quick and dirty 15-second comparison.
musicfreak
It goes both ways...
Paolo Bergantino
Ruby is more powerfull? Didnt know that, actually as I posted what i read was the opposite.What i saw that the ruby programmers deffends the most is that its better to code.
fabio
@fabio: Like I said, you can do things in Ruby that you can't in Python. But yeah, the main strength of Ruby is that it's more productive. You will probably code faster with it, although the learning curve is a little steeper, so if you need your web application written quickly it's probably not a very good option.
musicfreak
@musicfreak that part of "you can do things in ruby that you cant in python" worries me, well i prefer to take more time to finish my site and learn a "stronger" language since i will take it for my life. There are some examples where i can see these diffs? thx =)
fabio
@fabio: I'd highly recommend Why's (Poignant) Guide to Ruby: http://poignantguide.net/ruby/
musicfreak
Thanks a lot, going to take a look at it!
fabio
ruby doesn't have function wrappers or generator expressions
geowa4
@George IV: I'm not looking to start a flame war. I've just personally found Ruby to be more powerful/expressive than Python. This is my opinion; take it with a grain of salt.
musicfreak
The question is not about Python OR Ruby but about PHP or (ruby/python).
Oli
+4  A: 

Personally, I just use WordPress for blogging, its too much effort to build something like that from the ground up when I can just install it in a minute.

My suggestion to you is to learn Python. Python is faster than Ruby and the Django framework is at least as good as Rails by now.

Unknown
I wouldn't say Django is "at least as good as Rails", you can't really compare the two. Two completely different frameworks. But yeah, you can't deny the fact that Python is way faster than Ruby.
musicfreak
Unless you're using Ruby 1.9, which is now out. There's also REE, JRuby, and others which offer good speed improvements.
Alex Fort
+2  A: 

Wikipedia, Yahoo!, and Facebook all make extensive use of PHP. I think that makes a compelling argument for the suitability of PHP to large web applications (some of the largest in the world, at that). If you're already familiar with PHP, there aren't any terribly compelling reasons to switch horses in midstream.

Frank Farmer
But since im on the beggining of it I think its worth the change since it will save a lot of time and headaches for me in the future. Just saw a Php vs Python code and.. damn what a difference.
fabio
Josh Curren
I learned that in the hard ways, after losing so many time hacking even drupal i decided that it would be more worth to spend all that time learning everything about the language =)
fabio
A: 

If the requirement is "build a new site soon" then the most important thing will be what framework or tools will help you get there the fastest. They are all reasonable choices within certain parameters, but what framework will you work with that gets you there? Django? Rails? That will probably drive your decision a lot more than the language details.

Ultimately the language drives this a lot less than your own dicipline and what tools are readily available for you.

Yishai
A: 

yes, do it

+2  A: 

Not that it answers your question - But I've been working on building a reusable set of CMS code on top of Zend Framework - if you haven't given up on PHP altogether yet, you really should look at it. It makes a lot of those tasks very easy to implement.

That being said - I haven't tried ruby in about 2 years - but I did try to build an application using rails and never quite got my head wrapped around it. I found the python/zope easier to figure out.

gnarf
A: 

I love python; I love Django. But man, for my personal projects, I'd love to get some of the easy, widely available, free hosting that's out there for Ruby on Rails.

David Berger
+1  A: 

I personally prefer Ruby over Python. But the size of the Python community and it's "stability" outweigh the little differences they have and generally I end up using Python.

J. Pablo Fernández
A: 

You're right. Python and Ruby are less error prone thanks to their strong typed nature. They are also more concise and more scalable.

But if you want to do things you were doing with PHP, you'll have to choose a web framework. I think the choice is there.

I recommend you web2py. Just read the amazing list of features on their website and I'm pretty sure you'll choose it like I do.

Oli
A: 

One notable thing should be the ability to execute your application on many hosting services. With a PHP application will be able to run it on almost all hosting services, much more than any Ruby or Python.

By the way, i don't think you can do more errors in PHP than in any other languages, PHP is just used by more people and it's increase the number of error, one other reason is that people going to Ruby or Python are more curious and so try to do the best and avoid errors...

Use the one with which you can work fine and fast and which can fit to your needs.

Boris Guéry