Re: Good resources for beginning PEAR
| From: | Eric | Date: | Thu, 23 May 2002 11:50:56 +0000 |
| Subject: | Re: Good resources for beginning PEAR | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1431@lists.php.net to get a copy of this message | ||
As of right now, there isn't a good resource for this. Someone is working
on a HOWTO for developers of PEAR modules, but there isn't a decent
resource for getting started with PEAR as a PEAR user. I was planning on
working on this for the PEAR website. For right now, the easiest way to
get started is to execute this:
lynx -source http://pear.php.net/go-pear | sh
This will download and install the standard PEAR distribution. You may
want to read through http://pear.php.net/manual/en/installation.php
Most (if not all) PEAR modules are class definitions. Note that you don't
need to write OO code to use objects. You can write structural code using
objects. (Does that count as OOP? :))
Using large numbers of libraries written in PHP will certainly be slower
than implementing your own solution. Your program will need to parse all
of the code that is included regardless of if it is used. This is the
drawback to using modules written in the language. However, the PHP
parser is very fast. It really depends on the application you're
developing.
The PEAR modules are written to make it easier to write portable reusable
code. If you're going for raw speed and application performance, you'll
want to implement your own modules so the parser won't be parsing code
that you'll never use.
The problem with object oriented code is that there is a _LOT_ of code
that exists simply to maintain the object, perform checks, etc. If you
know what the bounds and limitations are, you know that you'll never need
to check for some errors. Sometimes your application doesn't care if
there is an error. But in the object, the code is there and is executed
none-the-less to deal with the error condition. This is why a lot of
"structural" programmers dislike OO code.
Good luck :)
eric
On Thu, 23 May 2002, olinux wrote:
> Hi all - I am looking for a good resource to begin
> learning how to use the PEAR repository.
>
> I am specifically interested in the caching classes.
> Should I learn OO prgramming?
>
> one specific question that I have:
> It seems that you would have to include several
> packages to get desired results. i.e caching -
> cache/outputCompression/DB - can this get to intensive
> on the server (numerous includes - defining excess
> functions - renaming functions)?
>
> Thanks Much,
> olinux
>
>
>
> __________________________________________________
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com
>
>