RE: [PEAR-DEV] DB_Light
| From: | Lukas Smith | Date: | Tue, 04 Dec 2001 19:41:17 +0000 |
| Subject: | RE: [PEAR-DEV] DB_Light | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-3375@lists.php.net to get a copy of this message | ||
> Well, that would defeat the purpose of loading as little code as
> possible, because to give the user the choice would not only force you
> to load that code, but force you to parse what they want, which would
> slow things down.
Aehm, I was saying that the code should only be included when needed via
some magical php construct. This would require a little bit of code that
would load the added functionality.
I could imagine some features to be in one package so if you use one
feature in that package you end up loading the entire package. Anyways I
sometimes use very basic stuff and sometimes very complex stuff. I
create my db object early on in the code and then include some modules
(not always the same) that require different levels of features. It
would be awesome if I wouldn't have to then always include the full
package.
But I fear it will end up similar to how you suggest because I can't
come up with that magical php construct I am dreaming off.
Lukas Smith
smith@dybnet.de
_______________________________
DybNet Internet Solutions GbR
Alt Moabit 89
10559 Berlin
Tel. : +49 30 83 22 50 00
Fax : +49 30 83 22 50 07
www.dybnet.de info@dybnet.de
_______________________________
> -----Original Message-----
> From: lustig@acsu.buffalo.edu [mailto:lustig@acsu.buffalo.edu]
> Sent: Tuesday, December 04, 2001 8:37 PM
> To: Lukas Smith
> Cc: pear-dev@lists.php.net
> Subject: RE: [PEAR-DEV] DB_Light
>
> Quoting Lukas Smith <smith@dybnet.de>:
>
> > I just would prefer not to force the user to make this decision but
to
> > load this added functionality dynamically so the user only loads the
> > code he actually uses. Unfortunately I do not know how to do this.
Or
> > I
> > currently do not have a good idea anyways.
>
> > So yes the point is to load as few code as possible. But it would be
> > much nicer not to force the user to make a decision about what
> > features
> > he may use at the point of db object creation.
>
> Actually, what might be possible would be to create a script that
> creates "custom" versions of PEAR::DB -- ie, it *always* includes
> certain functions, like query(), but it also gives you the option to
> "add" functionality. It would create a file and print out the code for
> that version of PEAR::DB into the file, and you could create your
custom
> version with exactly what you need and not what you don't... and if
you
> ever need to add something, you can run the script again and create a
> new "custom abstraction layer"...
>
> --Jason
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, e-mail: pear-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: pear-dev-help@lists.php.net
> To contact the list administrators, e-mail:
php-list-admin@lists.php.net