FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Ruby(on rails) vs PHP





lastlegion
I have been hearing a lot about RoR. Many people say its better than PHP and many say its not. I dont know much about Ruby but I have been programming in PHP for more than two years and havnt been disappointed. But someone people have been advising me to use Ruby instead.

Here are my points in favour of php(cuz I dont know much about ruby)

-Big community supporting new programmers
-Tons of free scripts and tutorials
-Open source(I think)

cant think of more right now

I'd like to know what u guyz think...
qebab
Ruby is definitely more elegant than php, but it has a smaller userbase and there's less documentation. It's more general-purpose than php as well, it is natively OO (that is, the language is built on OO, OO isn't just something they slapped on it when it got 'trendy'), and Rails is simply a framework for webprogramming with Ruby.

There are a lot of differences between Ruby, but personally I would program in Ruby over php. However, whether you're easily able to change, I wouldn't know. If you seriously consider it, get the pickaxe (Programming Ruby, or Ruby Programming, can't remember the name, it just goes by the name 'pickaxe' most places), and see what you think about it. You should definetely know Ruby itself before you start fiddling with the Rails framework.
lastlegion
Well just because ruby is more elegant doesn't make it more powerful does it? And I think even PHP can be made elegant by proper organized coding

Quote:
it's more general-purpose than php as well

What general-purpose? Can you give me some examples please
JayBee
lastlegion wrote:
Quote:
it's more general-purpose than php as well

What general-purpose? Can you give me some examples please


In my linux distro I have found many utilities written in Rubby but none written in PHP. I wrote my own utilities in php, but I'm crazy.
MrBlueSky
lastlegion wrote:
Well just because ruby is more elegant doesn't make it more powerful does it? And I think even PHP can be made elegant by proper organized coding

Quote:
it's more general-purpose than php as well

What general-purpose? Can you give me some examples please


PHP is designed for webapplications and not as a general purpose scripting language, and it is also designed badly.

For example:
- PHP has no lexical scope
- PHP has a bloated core with too many functions
- PHP lacks abstraction: for example it has 16 (!) different functions to sort things. Ruby has only a few, Perl has one. Many different functions that do kind of the same thing is a bad design.
- PHP doesn't support closures or anonymous functions.
- even no support for namespaces
- PHP has no references or pointers (only variable variables)
- etc. etc.

Another example: no amount of proper organizing can make up for the fact that in PHP regular expressions have to be embedded in strings.
Related topics
PHP vs RUBY
Php Gaming
more then just the one hosting plan
J2ee vs PHP
Java Servlets vs PHP
ASP vs PHP
Learned HTML, what next?
Javascript vs PHP (or python?) - unicode text file search
HTML vs PHP pages?
.html vs .php
PHP and Mysql Project. Help
javascript framework vs php framework
Java vs PHP
python (django) or php
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.