# Ruby v/s PHP

**URL:** <https://www.ruby-forum.com/t/ruby-v-s-php/107129>\
**Category:** Rails\
**Created:** [June 18, 2007, 1:48pm UTC](https://www.ruby-forum.com/t/ruby-v-s-php/107129 "2007-06-18T13:48:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![janu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@janu](https://www.ruby-forum.com/u/janu)\
**Post date:** [June 18, 2007, 1:48pm UTC](https://www.ruby-forum.com/t/ruby-v-s-php/107129/1 "2007-06-18T13:48:52Z")

</div>

Which is better Ruby or PHp?  
watch this video of comparison between this languages

[http://www.dekhona.com/watch.php?v=ebcecrnto](http://www.dekhona.com/watch.php?v=ebcecrnto)

---

<div class="post-metadata">

**Author:** ![janu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@janu](https://www.ruby-forum.com/u/janu)\
**Post date:** [June 18, 2007, 6:43pm UTC](https://www.ruby-forum.com/t/ruby-v-s-php/107129/2 "2007-06-18T18:43:13Z")

</div>

janu wrote:

> Which is better Ruby or PHp?  
> watch this video of comparison between this languages
> 
> [http://www.dekhona.com/watch.php?v=ebcecrnto](http://www.dekhona.com/watch.php?v=ebcecrnto)

Comparison? A stupid marketing stunt maybe. Oh my, Ruby, the greatest  
invention since the sliced bread!

---

<div class="post-metadata">

**Author:** ![janu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@janu](https://www.ruby-forum.com/u/janu)\
**Post date:** [June 18, 2007, 6:43pm UTC](https://www.ruby-forum.com/t/ruby-v-s-php/107129/3 "2007-06-18T18:43:38Z")

</div>

I would definitely argue that it all depends on what kind of project  
you are currently working on,.  
PHP is superior at some things while Ruby (on Rails) is more  
convenient for other kinds of stuff.  
What is your stance?

---

<div class="post-metadata">

**Author:** ![janu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@janu](https://www.ruby-forum.com/u/janu)\
**Post date:** [June 18, 2007, 7:41pm UTC](https://www.ruby-forum.com/t/ruby-v-s-php/107129/4 "2007-06-18T19:41:47Z")

</div>

Don’t ever compare languages, they all have uses. I think that for  
almost everything ruby is better, but that doesn’t mean that I will  
never use PHP again.

---

<div class="post-metadata">

**Author:** ![janu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@janu](https://www.ruby-forum.com/u/janu)\
**Post date:** [June 18, 2007, 8:27pm UTC](https://www.ruby-forum.com/t/ruby-v-s-php/107129/5 "2007-06-18T20:27:57Z")

</div>

Please keep in mind that PHP is built for the web and is capable of  
being  
used in normal environments.

Ruby is built as a general purpose language and has libraries for web  
site  
development.

So comparing the two isn’t exactly oranges to oranges, more like oranges  
to  
tangerines.

I personally loathe PHP and have vowed to never develop with it again,  
but  
to each his/her own.

Jason

---

<div class="post-metadata">

**Author:** ![janu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@janu](https://www.ruby-forum.com/u/janu)\
**Post date:** [June 18, 2007, 11:21pm UTC](https://www.ruby-forum.com/t/ruby-v-s-php/107129/6 "2007-06-18T23:21:28Z")

</div>

On Jun 18, 2007, at 11:41 AM, jakeyman\_engineer wrote:

> Don’t ever compare languages, they all have uses.

OK.

> I think that for  
> almost everything ruby is better

Well that didn’t last long.

---

<div class="post-metadata">

**Author:** ![janu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@janu](https://www.ruby-forum.com/u/janu)\
**Post date:** [June 20, 2007, 8:19pm UTC](https://www.ruby-forum.com/t/ruby-v-s-php/107129/7 "2007-06-20T20:19:26Z")

</div>

On 6/19/07, Nathaniel B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 

[…]

> Consider the following. You have a new ViewVC setup  
> ([http://view.svn.toolbawks.com](http://view.svn.toolbawks.com)) and you want to redirect them to the  
> /view directory when they hit the index due complexity behind having  
> the root path tie directly into the ViewVC browser.

Not to nitpick but the correct/easiest way to do this would be to use  
your web server’s config file. A .htaccess for apache and a simple  
redirect line in lighty would do the trick.  
[…]

> Nathaniel.

Vish

---

<div class="post-metadata">

**Author:** ![janu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@janu](https://www.ruby-forum.com/u/janu)\
**Post date:** [June 19, 2007, 1:18am UTC](https://www.ruby-forum.com/t/ruby-v-s-php/107129/8 "2007-06-19T01:18:06Z")

</div>

I have been working with PHP since 96-97… since the 3.0 days and have  
watched it evolve into the OO langauge it is today.

The language was great, but as my skill increased with the lanaguge,  
and applications got more complex, the directory structure was moulded  
into a custom MVC system. I checked out many other frameworks and  
their structure at the time, such as Fusebox, which were great and  
served their purpose.

Trouble was consistency. Being dropped into so many client projects  
and each having their own choice of code layout and separation between  
the sql, models, logic, and templates (views), it was fragmented at  
best.

With Rails you get the benefit of true consistency, at least as a  
default. When it comes to implementation, again it’s up to developers,  
but at least you always know the inheritance you get when using a  
Rails app. Not to mention the helpers and other add-ons that Rails  
provides.

To go further on that, you also get Ruby, one of the most impressivel  
languages in of itself.

Based on the above, ruby is the next best thing since the if statement.

But, that’s not to mention that I have still found a need for PHP. As  
I mentioned with Rails, it inherits a MVC directory structure,  
testing, and tons of other libraries that may prove to be unused if  
you are simply wanting something as simple as a redirect script.

Consider the following. You have a new ViewVC setup  
([http://view.svn.toolbawks.com](http://view.svn.toolbawks.com)) and you want to redirect them to the  
/view directory when they hit the index due complexity behind having  
the root path tie directly into the ViewVC browser.

That being said, choices…

a) Setup an entire Rails instance to do a simple redirect plus figure  
out the complexities behind having both ViewVC and Rails manage the  
same domain. Painful to say the least.

b) Use a simple index.php with one line of code for the redirect.

\<?php header("Location: /view/"); ?\>

c) Figure out some other way that may be better, but requires more  
thought than needed.

So, even though Rails is by default the framework and Ruby being the  
language I choose for almost everything. PHP definately has it’s  
place. It’s simple, doesn’t require a full MVC structure, and  
definately has a much larger open source community behind it. May not  
be as talented (_poke_) but is simply much larger. Not to mention the  
tens if not hundreds of thousands of open source projects that are  
freely available such as phpMySQL, Drupal, and osCommerce. These apps  
have not yet been replaced by a Rails equivlent, so PHP without a  
doubt has its place to date. This will definately change as time goes  
on for some aspects, but to say that Rails is over and above the  
answer to everything that a developer requires would be a lack of  
understanding about what other langauges are meant for and how  
effective they are at their purpose.

Nathaniel.

On 6/18/07, George B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I think that for
> 
> almost everything ruby is better  
> Well that didn’t last long.
> 
> >

–  
Nathaniel Steven Henry Brown

Toll Free: 1-877-446-4647  
Vancouver: 604-724-6624

---

<div class="post-metadata">

**Author:** ![janu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@janu](https://www.ruby-forum.com/u/janu)\
**Post date:** [June 20, 2007, 9:43pm UTC](https://www.ruby-forum.com/t/ruby-v-s-php/107129/9 "2007-06-20T21:43:37Z")

</div>

I tried the Redirect option using the apache conf and ViewVC didn’t  
like it much. Not running lighttpd in this case, didn’t see a need for  
2 web servers for this sort of thing.

As you pointed out, how I didn’t wasn’t so much the point but rather  
why I did it. The options were Rails or PHP (and I tried Apache  
directly first, but didn’t want to spend anymore time debugging  
redirect issues with ViewVC not being able to understand the hand  
off). And Rails clearly was overkill.

On 6/20/07, Vishnu G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> your web server’s config file. A .htaccess for apache and a simple  
> redirect line in lighty would do the trick.  
> […]
> 
> > Nathaniel.
> 
> Vish
> 
> >

–  
Nathaniel Steven Henry Brown

Toll Free: 1-877-446-4647  
Vancouver: 604-724-6624
