php vs perl for RDBMS backend work

Discussion in 'Perl Misc' started by dcruncher4@aim.com, Mar 2, 2008.

  1. Guest

    Hi,

    I would like to get an opinion on using php vs perl for backend
    database related work. This is basically a script for nightly batch jobs
    which reads from different databases and write to databases.
    So far I have used perl/DBI for this.

    I am looking into the possibility of using php for the same, if it
    provides any significant benefit in code maintenance etc.

    TIA.
    , Mar 2, 2008
    #1
    1. Advertising

  2. Guest

    Oh no. This is not to rewrite existing code. I want to check
    whether it is worth investing on php for any new code. of course
    my boss will ask me to justify why I would want php when perl
    has been doing the job fine so far. I can't tell that the only
    valid reason is that I want to learn php and add it in my resume (haha).

    So I need some real reasons as to why php is superior to perl.
    I got one so far: It has a more natural support for OO, which I agree.

    thanks.

    In article <>, Jerry Stuckle says...
    >Both are just languages. Neither one has any particular advantage in
    >maintenance, etc. It much more depends on the programmers who write the
    >code, how well the code is written and commented, the skills of the
    >people maintaining the code, and a bunch of other things.
    >
    >And if it's working now, I see no reason to invest a bunch of time and
    >money rewriting it. Don't fix what isn't broke.
    >
    , Mar 3, 2008
    #2
    1. Advertising

  3. dcruncher4 wrote:

    > So I need some real reasons as to why php is superior to perl. I got one
    > so far: It has a more natural support for OO, which I agree.


    PHP's version of the OO paradigm is a lot more familiar to people who come
    from Java backgrounds, because it has familiar ideas like classes and
    objects, with methods and properties, but Perl's OO is more flexible. Perl
    can do, for instance, multiple inheritance, whereas PHP and Java cannot.

    --
    Toby A Inkster BSc (Hons) ARCS
    [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
    [OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 34 days, 17:01.]

    Bottled Water
    http://tobyinkster.co.uk/blog/2008/02/18/bottled-water/
    Toby A Inkster, Mar 4, 2008
    #3
  4. ccc31807 Guest

    On Mar 3, 11:55 am, wrote:
    > So I need some real reasons as to why php is superior to perl.
    > I got one so far: It has a more natural support for OO, which I agree.


    So? OO is simply another way of organizing code. In many cases, OO
    just gets in the way, as when you are dealing with a simply procedural
    script. I write a lot of scripts for databases, in many cases taking
    data from one database, manipulating it in some way, and writing it to
    another database. It's simpler to do this with a script written in an
    imperative style than one written in an object oriented style.

    Languages are simply tools. When you use a tool, you use one most
    suitable for the task at hand. PHP might be a better tool for your job
    than Perl, but it won't be a better tool because it has more natural
    support for OO development.

    CC
    ccc31807, Mar 5, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page