Re: Net_ICQ...and pear talks OSCAR
| From: | Chuck Hagenbuch | Date: | Thu, 28 Aug 2003 13:38:26 +0000 |
| Subject: | Re: Net_ICQ...and pear talks OSCAR | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20748@lists.php.net to get a copy of this message | ||
Quoting "daniel @ swn" <daniel@skywebs.net>:
> Currently my directory structure looks like this:
>
> Net_ICQ-0.1/ICQ.php - class Net_ICQ
> Net_ICQ-0.1/ICQ/defines.php - constants with prefix "ICQ_"
> (ICQ_MTYPE_PLAIN for example)
> Net_ICQ-0.1/ICQ/functions.php - class Net_ICQ_func, some basic functions
> Net_ICQ-0.1/ICQ/outgoing.php - class Net_ICQ_out, outgoing packet
> creation
> Net_ICQ-0.1/ICQ/incoming.php - class Net_ICQ_in, incoming packet parsing
> Net_ICQ-0.1/ICQ/examples/example.php - a simple ICQ bot using every
> feature (works for AIM, too)
> Net_ICQ-0.1/ICQ/examples/register.php - example on uin registration
> Net_ICQ-0.1/package.xml
>
> Is anything wrong with this or is it acceptable?! =)
A few things:
- I can see the incoming and outgoing subclasses, but do you really need
separate files for constant definitions and common functions? File inclusion is
relatively expensive on most systems, so it'd be nice to consolidate a bit.
- It would be nice if the classnames matched the filenames. I'd say make the
class names more verbose, instead of shortening the filenames - readability is
good.
Also, examples/examples.php should be something clearer, like examples/bot.php.
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
They're just looking at a wall of meat.