Re: [PHP] class design question

2004-01-12 Thread Kelly Hallman
On Mon, 12 Jan 2004, rogue wrote: > i am working out the finishing touches on a authentication class that > uses mysql to store the time of last access and some other goodies. > > my question is, when developing a class that uses a database, what is > the best way to handle the database bit? for n

RE: [PHP] class design question

2004-01-12 Thread Giz
h can be found here: http://www.justinvincent.com/ -Original Message- From: rogue [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 2:38 PM To: [EMAIL PROTECTED] Subject: [PHP] class design question hi there. i am working out the finishing touches on a authentication class that uses m

Re: [PHP] class design question

2004-01-12 Thread Justin Patrin
Jason Sheets wrote: Take a look at the PEAR DB Abstraction layer, I usually store connection info in an XML or INI file and use parse_ini or PEAR Config to parse the configuration file. http://pear.php.net hi there. i am working out the finishing touches on a authentication class that uses mysq

Re: [PHP] class design question

2004-01-12 Thread Jason Sheets
Take a look at the PEAR DB Abstraction layer, I usually store connection info in an XML or INI file and use parse_ini or PEAR Config to parse the configuration file. http://pear.php.net > hi there. > > i am working out the finishing touches on a authentication class that > uses mysql to store the

[PHP] class design question

2004-01-12 Thread rogue
hi there. i am working out the finishing touches on a authentication class that uses mysql to store the time of last access and some other goodies. my question is, when developing a class that uses a database, what is the best way to handle the database bit? for now i just set the connection i

RE: [PHP] Class Design Question...

2003-08-14 Thread Dan Joseph
2 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [PHP] Class Design Question... > > > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > on Wednesday, August 06, 2003 9:34 AM said: > > > I'm rewriting a lot of code and have decided to use classes... I&

Re: [PHP] Class Design Question...

2003-08-14 Thread David Otton
On Wed, 6 Aug 2003 11:33:54 -0500, you wrote: >Basically in the class I have methods that perform a task, and return true >on success, or false on failure. Easy enough. If it returns false however, I >want to display errors for the user. The best way I can think of doing this >is adding a member v

Re: [PHP] Class Design Question...

2003-08-14 Thread Greg Beaver
Dan Joseph wrote: Hi, Are there any performance differences that are noticable in a 300-400 line PHP script if you overuse classes rather than straight functions? This is a loaded question. If you overuse classes, there will be a performance hit :). However, in a 300-400 line script,

[PHP] Class Design Question...

2003-08-14 Thread anachronism
Hello, I'm rewriting a lot of code and have decided to use classes... I'm wondering if this would be considered bad design or not... Basically in the class I have methods that perform a task, and return true on success, or false on failure. Easy enough. If it returns false however, I want to disp

Re: [PHP] Class Design Question...

2003-08-14 Thread Greg Beaver
Dan Joseph on Wednesday, August 06, 2003 10:18 AM said: Are there any performance differences that are noticable in a 300-400 line PHP script if you overuse classes rather than straight functions? This is a loaded question. If you overuse classes, there will be

RE: [PHP] Class Design Question...

2003-08-14 Thread Chris W. Parker
[EMAIL PROTECTED] on Wednesday, August 06, 2003 9:34 AM said: > I'm rewriting a lot of code and have decided to use classes... I'm > wondering if this would be considered bad design or not... [snip] /Sounds/ like a good idea. Are you really going to end up with an a

RE: [PHP] Class Design Question...

2003-08-14 Thread Chris W. Parker
Dan Joseph on Wednesday, August 06, 2003 10:18 AM said: > Are there any performance differences that are noticable in a > 300-400 line PHP script if you overuse classes rather than straight > functions? I have no definitive answer but I would assume the answe

RE: [PHP] Class Design Question...

2003-08-14 Thread Dan Joseph
Hi, > >>Are there any performance differences that are noticable in a > >>300-400 line PHP script if you overuse classes rather than straight > >>functions? > > This is a loaded question. If you overuse classes, there will be a > performance hit :). However, in a 300-400 line script, you mig

RE: [PHP] Class Design Question...

2003-08-14 Thread Dan Joseph
Hi, > Otherwise, a year down the line, you find yourself stuck with a thing > that needs a small modification which will take you hours and hours and > hours and probably turn your little project into spaghetti (speaking > from experience). That's probably some good advice, and something