Re: design of forum applications
| From: | Ilia A. | Date: | Thu, 15 May 2003 23:36:51 +0000 |
| Subject: | Re: design of forum applications | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-16332@lists.php.net to get a copy of this message | ||
On May 15, 2003 03:12 pm, Hans Lellelid wrote:
> | I strongly disagree with that point, I do not believe that
> | something which is properly designed should be slow. In fact,
> | proper implementation would not only satisfy stylistic
> | concerns but also performance concerns. Bloat is by no
> | definition of the word a good design.
>
> I didn't say bloat = good design at all; what I said though, is that
> writing a well-architected script is going to be slower. I'm not talking
> about avoiding bloat or simply writing code with speed in mind -- those
> are givens IMO. I may be using a definition of "well-architected" that
> you may not agree with: specifically, abstract, tiered application
> design. Creating abstract code is simply going to run slow in PHP --
> function calls and object instantiation carry a significant performance
> price. And when you factor in things like template parsing, db
> abstraction, etc. you have additional overhead that wouldn't be
> "necessary" in a fast-n-dirty PHP script.
Perhaps my argument lacked some detailed, so allow me to clarify. While there
are quick-n-dirty hacks you can certainly write flexible scalable code
without resorting to heavy OO. Simple, clean and consice (not to mention well
documented) function interfact can work just as well and from performance
stand point be far more efficient. The danger with OO that abstraction, is
that it often reaches such a level that no one knows what lies underneath and
just keeps piling code on top of code until you end up with a large pile of
dung (pardon my language). While the end result may work, it is nearly
impossible to debug and will not scale well.
Ilia