NYCPHP Meetup

NYPHP.org

[nycphp-talk] Using PEAR?

tom at supertom.com tom at supertom.com
Tue Feb 10 12:11:35 EST 2004


Yeah, although I probably got the idea from you guys, and just didn't
realize it.

But I digress - these are both two great groups.

This is the one-year anniversary for LIPHP - we are having a party, PEAR
talk and book giveway (thanks O'reilly!) - fun for all!

I'll make the official announcement next week.

Tom
www.liphp.org





***************************************************
What's Tom listening to right now?  Find out here:
http://www.supertom.com/current_track.php




-----Original Message-----
From: talk-bounces at lists.nyphp.org
[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere
Sent: Tuesday, February 10, 2004 11:09 AM
To: NYPHP Talk
Subject: RE: [nycphp-talk] Using PEAR?



> <plug>Coincidently, this month at the LIPHP meeting
> (www.liphp.org), we will be having a general discussion on
> PEAR, going over the various tools provided by it, and
> running through some examples.</plug>

Whow.. that's scary.  NYPHP is having a PEAR::DB presentation feb-24th
at our regular meeting.

I guess great groups think alike :)

H
_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk


>From hans not junk at nyphp.com  Tue Feb 10 12:19:51 2004
Return-Path: <hans not junk at nyphp.com>
Received: from ehost011-1.exch011.intermedia.net (unknown [64.78.21.3])
	by virtu.nyphp.org (Postfix) with ESMTP id 1E0E3A865D
	for <talk at lists.nyphp.org>; Tue, 10 Feb 2004 12:19:51 -0500 (EST)
X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Subject: RE: [nycphp-talk] Include file questions
Date: Tue, 10 Feb 2004 09:19:50 -0800
Message-ID: <41EE526EC2D3C74286415780D3BA9F87772655 at ehost011-1.exch011.intermedia.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [nycphp-talk] Include file questions
Thread-Index: AcPv5j9rDHByxRm0Tzyy9kcxoHHLKAAEzcnA
From: "Hans Zaunere" <hans not junk at nyphp.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
X-BeenThere: talk at lists.nyphp.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: NYPHP Talk <talk at lists.nyphp.org>
List-Id: NYPHP Talk  <talk.lists.nyphp.org>
List-Unsubscribe: <http://lists.nyphp.org/mailman/listinfo/talk>,
	<mailto:talk-request at lists.nyphp.org?subject=unsubscribe>
List-Archive: <http://lists.nyphp.org/pipermail/talk>
List-Post: <mailto:talk at lists.nyphp.org>
List-Help: <mailto:talk-request at lists.nyphp.org?subject=help>
List-Subscribe: <http://lists.nyphp.org/mailman/listinfo/talk>,
	<mailto:talk-request at lists.nyphp.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Feb 2004 17:19:51 -0000


> 1. Where is a good place to put them so that they are outside the
> docroot yet centrally located for the apache/mysql/php instance?

As Jeff already pointed out, http://phundamentals.nyphp.org is the
source for this.

> 2. Do you tend to have uniquely configured include files or just a few
> for overall use? For example, if you had two different instances of
> MySQL running, would you have seperate include files for the pages
that
> referenced each or would you use one with differnet variable names?

I generally setup a hierarchy of include files.  That is to say, a top
level, which creates DB connections, each with different variable names.
The only consideration is if you won't need a particular DB connection
on every request, and performance is that important.  If both of these
are issues, then I'll do the DB connection in a specific include file
(generally where the class/functions that will use it are) or in a
class/function itself.

> 3. What are some things you usually use for include files? What are
some
> things you*could* put in that you don't?

Organizing code :)  Include files are generally libraries of code,
whether it be procedural or object orientated.  Commonly, people have
executeable code in include files, which I never like doing.  This
means, that IMO at least, include files should only ever contain
functions and classes.

There is one exception to this.  The top level include for your
application can contain DB connection code, setting up constants, and
other application environment settings.  This isn't to say it *has to*
(for instance, people put this type of stuff in a function or class) but
it can.

H




More information about the talk mailing list