[SLL] OSS commerce
John Locke
freelocke at gmail.com
Sat Dec 22 18:08:15 PST 2007
Bill Campbell wrote:
> Personally I don't like much of the php that I've had to work with,
> debugging, extending, etc. as I find it hard to read with the display code
> intermingled with processing,
I see this argument a lot, but we don't practice this. I agree that
mixing display with processing is a pain... any time you need to involve
more than one person in a project, it's much cleaner to separate out
presentation from logic. We develop in PHP with a strong
model-view-controller separation.
I like using Smarty for the template, keeping PHP away from our
designers entirely. Designers have full reign over the look and feel of
any particular element of a program, without being able to mess up the
business rules.
We tend to have a very object-oriented approach to the model, creating
data objects that own the connections to the core database tables. We
take advantage of PHP's flexibility in the controllers, sometimes using
objects but more often simple functional/procedural chunks of code that
essentially define the API and URL structure.
Display code intermingled with processing? Of course, that's crappy, but
we avoid projects that do this. (Note that OS Commerce is very guilty of
this--one of the reasons we move everybody to Zen Cart). But it's
hogwash that all PHP is written this way.
> and ugly (in the same way perl is) with all
> the ``$'' and similar characters required on variable names.
>
That I can't answer...
Cheers,
John
More information about the linux-list
mailing list