[UPHPU] Rails vs PHP

Walt Haas haas at xmission.com
Mon Mar 26 09:10:22 MDT 2007


On Mon, 2007-03-26 at 07:11 -0700, Joshua Simpson wrote:
> On 3/23/07, jtaber <jtaber at johntaber.net> wrote:
> >
> >
> > What advantages does Ruby language have over PHP ?  Many Ruby/Rails
> > users would say Ruby is "cleaner".  It also has a different iterator
> > syntax.  And it has more of a object-oriented architecture.  And no $
> > :)  Personally I prefer the more C / java like syntax of PHP.
> 
> PHP is a poorly designed language any way you look at it.  The fact that PHP
> has no real naming convention for it's entire builtin function library, the
> fact that PHP dumps all of these functions (without a naming convention!)
> into the global namespace, and then expects you to work from this one
> namespace (without any sort of sub namespace solution;  unless you use a
> class hack), it's ridiculous include/require feature, which serves almost no
> point, without namespaces, in usage of pure PHP, it's inclusion of
> exceptions in 5, yet they're almost useless without a complete restructure
> of the language to include exceptions.... the list goes on.  I like PHP, but
> it's not an elegant language, it's not really a clever language, and it's
> certainly not well designed.

It appears to me that PHP started out as a very simple scripting
language and has over the years tried to evolve toward traditional OOP
languages.  This hasn't been a comfortable process.  See for example the
big version skew between PHP 4 and PHP 5, which has left a huge number
of shared servers running PHP 4.

I think in the end it boils down to which is the best tool for the job,
and to answer that you need to look not only at the language itself but
also to the whole culture and ecosystem around the language.  PHP is far
ahead of many other languages in providing useful web functions.  On the
other hand, PHP hasn't yet evolved to the level of Java in providing the
more serious software engineering functions, such as abstraction layers
in important places that allow you to program independently of a
particular implementation, although MDB2 appears to be getting there.
PHP also wins in the speed and efficiency of its Apache implementation.

-- 
-- Walt
--------
Computer Science won't be what it should be until it is what it was when
we didn't have any and knew what it could do for us.




More information about the UPHPU mailing list