Wednesday, March 2, 2011

Squirrelmail

So I realized the best possible way to understand how a PHP application is put together is to examine an actual open-source PHP application. Squirrelmail is a possible target - it's rather large and thus harder to get a handle on, but it's old and stable and thus probably a decent model to emulate.

One thing I noticed immediately about PHP that I really don't like - side effects. It seems to be OK PHP practice to have a require or require_once that sets up variables for later use. Good God. There's no way to know where they came from; it's horrific.

Not that I don't do the same with my local loop variables, I suppose. Oy.

Anyway, so it would be nice to be able to set up an analysis framework for Squirrelmail (or what have you in terms of a Web app) that could impose some structure on the whole thing to allow redesign.

No comments:

Post a Comment