Re: general question re PHP OOP support

by "Richard Walker" <richardwalker(at)onebox.com>

 Date:  Sat, 5 Jan 2002 22:28:06 -0500
 To:  <hwg-languages(at)hwg.org>
 References:  yahoo yerpso
  todo: View Thread, Original

----- Original Message -----
From: "Hank Marquardt" <hmarq(at)yerpso.net>
To: "David Mintz" <mambomintz(at)yahoo.com>
Cc: <hwg-languages(at)hwg.org>
Sent: Saturday, January 05, 2002 1:29 PM
Subject: Re: general question re PHP OOP support


> > Question:  do you think PHP's support for OOP is
> > strong enough for a complex project such as this?

Not sure about PHP's OOP.  If its anything near Perl's
implementation I think its worth considering at least.

> > Should I consider rewriting it all in another
> > language,

Are you more comfortable with another language?  If not, I know
that PHP is a very solid language.

> > skip the web server entirely, and instead
> > create a GUI client that communicates directly with
> > the database?

Yikes.... with the advent of CSS and XML, you can do a LOT with a
web-based application, particularly if you can control which
browser the client uses.  I would definitely advise against
designing a new GUI unless what you're doing is particularly
sophisticated and proprietary.

>
> Wow -- nice job, nice project; congratulate yourself on making
it work.
>
> What makes you think you need to completely rewrite it?  OOP
isn't a
> panacea and procedural code isn't evil -- seems like you could
spend 1/3
> the time of a re-write to clean up the code, remove duplication
and
> build yourself a library -- but that isn't the question you
asked:)
>
> From a purist standpoint, PHP isn't a good OO language.  From a
> practicle perspective it's OK.  Of course I grew up
'procedurally'

The paradigm you choose isn't as important as the methodology you
use to develop the application.  Sounds like you chose the
'build-and-fix' model.  This IS a model, and it is most often
chosen, for which the consultants thank you ;-)

You should consider in a more _abstract_ sense how the
application should be designed and maintained.  If you already
know the code is sloppy, hard to maintain, and not easily
extended, then I suggest taking a top-down approach.  Redesign
the application from the interface to the implementation (sounds
like OO but not necessarily).  Keep the existing application in
production while you take servings of the code and reengineer
them in your new top down design.  Set up an implementation
schedule, and a QA / golive date.  Then turn the new system on,
retire the build-and-fix system, and you're ready to go!

As a consultant, this is how I approach a lot of projects to make
them more maintainable over their lifetime.

Just my $20 worth. ;-)

  -- Richard


> >
> > TIA,
> >
> > David Mintz
> > Spanish Interpreter
> > US District Court, SDNY
> > Personal http://panix.com/~dmintz/
> > Web design & hosting http://dmintzweb.com/
>
> --
> Hank Marquardt <hank(at)yerpso.net>
> http://web.yerpso.net
> GPG Id: 2BB5E60C
> Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C
> *** Web Development: PHP, MySQL/PgSQL - Network Admin:
Debian/FreeBSD
> *** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild
> *** Beginning PHP -- Starts January 7, 2002
> *** See http://www.hwg.org/services/classes
>

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA