[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby VS PHP

Tristan Knowles

7/16/2005 3:03:00 PM

I was chatting with a PHP dev friend tonight, he is a
PHP die hard who thinks it can do anything.

Now, I am new to Ruby and programming in general, and
wasn't really able to offer any insightful reasons why
he should at least look at Ruby. So, I was wondering
if I could get some ammo for next time, especially
from people with a PHP background.

I don't mean the title in a literal sense, I'm more
after some general points about Ruby which distinguish
it from PHP.

I dropped the whole OO vs not true OO but he claimed
PHP has been OO since v3.

Any comments with regards to this? Point me in the
right direction if its been brought up a million times...:)





___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger...


27 Answers

gabriele renzi

7/16/2005 3:37:00 PM

0

Tristan Knowles ha scritto:

> I dropped the whole OO vs not true OO but he claimed
> PHP has been OO since v3.
>
> Any comments with regards to this? Point me in the
> right direction if its been brought up a million times...:)

I can comment this last sentence. If he thought php (and <5 !) was OO he
has a bad idea of what Object Oriented means.
Anyway show him the usual rails videos ;)

Belorion

7/16/2005 3:52:00 PM

0

> I dropped the whole OO vs not true OO but he claimed
> PHP has been OO since v3.

Lol, that's pretty funny. It may have had a few OO type
implementations, but they were hacked and incomplete. PHP4 OO was
also incomplete and felt very hackish to me. (I can't say anything
about v5, because I haven't used it ... because I have Ruby/Rails now
;).

Basically, PHP started out as a small personal project (like many
languages) and has evolved over time. Features were added as needed,
but the core remained relatively unchanged for quite some time, and
they simply built around it. Ruby, on the other hand, was built from
the ground up with OO in mind.

I agree - if you can, show him the rails video. Ask him if he could
get a working blog app up in 15 minutes[1]. I have to admit, I didn't
see the Rails light until I saw Curts tutorial, but I've been hooked
ever since.


james_b

7/16/2005 3:55:00 PM

0

Tristan Knowles wrote:
> I was chatting with a PHP dev friend tonight, he is a
> PHP die hard who thinks it can do anything.
>

Maybe in his hands it can.


> Now, I am new to Ruby and programming in general, and
> wasn't really able to offer any insightful reasons why
> he should at least look at Ruby. So, I was wondering
> if I could get some ammo for next time, especially
> from people with a PHP background.
>

Suggest that Ruby might offer a different take on OO and dynamic typing
than PHP, and that he might gain some insight on programming in general
by taking a look at other languages. If there is a lack of natural
curiosity then screw it.


> I don't mean the title in a literal sense, I'm more
> after some general points about Ruby which distinguish
> it from PHP.
>
> I dropped the whole OO vs not true OO but he claimed
> PHP has been OO since v3.

Ah, "But that's not OO!"

See http://www.paulgraham.com/r...

James

--

http://www.ru... - The Ruby Documentation Site
http://www.r... - News, Articles, and Listings for Ruby & XML
http://www.rub... - The Ruby Store for Ruby Stuff
http://www.jame... - Playing with Better Toys


Tristan Knowles

7/16/2005 4:06:00 PM

0


--- Belorion <belorion@gmail.com> wrote:

> I agree - if you can, show him the rails video. Ask
> him if he could
> get a working blog app up in 15 minutes[1]. I have
> to admit, I didn't
> see the Rails light until I saw Curts tutorial, but
> I've been hooked
> ever since.

Hmm. I havn't even seen these... Gonna check them out.



___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos...


Lothar Scholz

7/16/2005 4:42:00 PM

0

Hello Belorion,

>> I dropped the whole OO vs not true OO but he claimed
>> PHP has been OO since v3.

B> Lol, that's pretty funny. It may have had a few OO type
B> implementations, but they were hacked and incomplete. PHP4 OO was
B> also incomplete and felt very hackish to me. (I can't say anything
B> about v5, because I haven't used it ... because I have Ruby/Rails now
B> ;).

PHP 5 is much much better. They only have the same problem that
disqualifies PHP for more complicated things: All source code must be
loaded and parsed all the time on each request.

Because of the PHP include/require mechanism and programming style only
some of this parsing tasks can be cached by 3rd party add-ons to the PHP VM.

B> Basically, PHP started out as a small personal project (like many
B> languages) and has evolved over time. Features were added as needed,
B> but the core remained relatively unchanged for quite some time, and
B> they simply built around it. Ruby, on the other hand, was built from
B> the ground up with OO in mind.

But it was with build with web sites in mind.

And it is still the best tool out there for simple websites that
only need a little scripts. For these millions of websites rails would
be completely unusable because of costs for
introduction/resources/maintainance.

The main PHP problem is just that too many people thought (and even
still think) it scales well with increased application size.


--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ru...
CTO Scriptolutions Ruby, PHP, Python IDE 's




Tristan Knowles

7/16/2005 4:50:00 PM

0


--- Lothar Scholz <mailinglists@scriptolutions.com>
wrote:
> And it is still the best tool out there for simple
> websites that
> only need a little scripts. For these millions of
> websites rails would
> be completely unusable because of costs for
> introduction/resources/maintainance.
>
> The main PHP problem is just that too many people
> thought (and even
> still think) it scales well with increased
> application size.


Actually, part of my reason for learning Ruby is
because I have a project coming up that I will be
designing, and i'm not sure if PHP is up to the task.
I have been looking at ColdFusion, or more likely, the
J2EE framework.

I prefer the philosophy and community of Ruby, but am
still not sure at which point it is required. When
would you say, ok, here is a job for Ruby?

A basic site requiring a MySQL backend for a few
queries here and there is obviously a job for PHP, so
at what stage is Ruby required?



___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos...


Eustaquio Rangel de Oliveira Jr.

7/16/2005 4:57:00 PM

0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

| The main PHP problem is just that too many people thought (and even
| still think) it scales well with increased application size.

Another one is that their team changes a lot of stuff a lot of times and
just sometimes put some compatibility to older versions.
The database functions changed but the old ones works. The way to refer
to $this changed somewhere on the 5.x development and they just leaved
the things breaks. :-(

- ----------------------------
Eustáquio "TaQ" Rangel
eustaquiorangel@yahoo.com
http://b...
Usuário GNU/Linux no. 224050
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFC2TyTb6UiZnhJiLsRAuG7AJ4tAVZe24MO0eaDHAs0iLgbiUma4wCeMr2H
PrS8B+2aKzKe10C3zyroSrw=
=Pqiv
-----END PGP SIGNATURE-----


Robert Oliver

7/16/2005 5:25:00 PM

0

On 7/16/05, "Eustáquio Rangel de Oliveira Jr." <eustaquiorangel@yahoo.com>
wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> | The main PHP problem is just that too many people thought (and even
> | still think) it scales well with increased application size.
>
>
>
I still think that PHP 4/5 have uses, especially in small sites or in
one-post type applications. Even though Ruby / Rails seem the most efficient
languages to me even for middle sized projects, PHP has the ability to
quickly let you implement a template system, or to do a quick form that in
Ruby dragging out CGI would seem too much.

So, from my personal perspective, and what direction our company is taking,
Ruby (and/or) Rails for medium and large projects, and PHP for small ones.


--

Robert W. Oliver II
CEO / President - OCS Solutions, Inc.
http://www.ocssolu...

Jim Freeze

7/16/2005 7:13:00 PM

0

* Robert Oliver <rwoliver2@gmail.com> [2005-07-17 02:25:24 +0900]:

> I still think that PHP 4/5 have uses, especially in small sites or in
> one-post type applications. Even though Ruby / Rails seem the most efficient
> languages to me even for middle sized projects, PHP has the ability to
> quickly let you implement a template system, or to do a quick form that in
> Ruby dragging out CGI would seem too much.
>
> So, from my personal perspective, and what direction our company is taking,
> Ruby (and/or) Rails for medium and large projects, and PHP for small ones.

Are you aware that you can now use Wee inside rails. So, those
simple one-post type applications become even more trivial.

--
Jim Freeze


Robert Oliver

7/16/2005 7:18:00 PM

0

On 7/16/05, Jim Freeze <jim@freeze.org> wrote:
>
> * Robert Oliver <rwoliver2@gmail.com> [2005-07-17 02:25:24 +0900]:
>
> > So, from my personal perspective, and what direction our company is
> taking,
> > Ruby (and/or) Rails for medium and large projects, and PHP for small
> ones.
>
> Are you aware that you can now use Wee inside rails. So, those
> simple one-post type applications become even more trivial.
>
> --
> Jim Freeze
>
>
Jim,

No I wasn't aware of using Wee for simple things. I'll check this out.

Still.. we gotta find something for PHP to do don't we? :)

--

Robert W. Oliver II
CEO / President - OCS Solutions, Inc.
http://www.ocssolu...