Re: Re: Forum hacks
| From: | Joao Prado Maia | Date: | Tue, 16 Oct 2001 18:22:09 +0000 |
| Subject: | Re: Re: Forum hacks | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-2319@lists.php.net to get a copy of this message | ||
On Tue, 16 Oct 2001, Luc Saint-Elie wrote:
> The question of the messages is more complex because PEAR::BD returns error
> messages that are not linked to the specific web site but are programmatic or
> technical errors.
> In a user class youll have error that doesnt come from a program (or a
> database ) error but form the web site strategy (for example you may want to
> have a website where Garbage Can is not a allowed user name.... And Im not a
> PEAR error management specialist but I suppose that "the user name Garbage Can
> is invalid please choose another one is not part of the standard set of error
> values ;-))
> Bu perhaps am I wrong....
>
But why should a PEAR::DB error be different from a User error ? Why not
just create a bunch of error codes just like PEAR::DB does and leave the
correct error message, translated or not, be a responsibility of the
implementor of the called script ? More or less he will have to develop an
array of error messages tailored to his needs for his website /
application.
The error codes would be there available on the class. Implementation of
appropriate error messages will be a matter for the developer of the
script.
I'm trying to stress this because whatever way you do the translation of
the error messages (if you decide on doing that), I will probably need to
tailor the error message for my specific application. It doesn't make much
sense worrying about that if most of the users of this class (I'm guessing
that the majority of people will do the same as me) will not use the
default messages anyway ?
> So it is a little bit complex probably (not sure) to be completely generic
> without "human text" message
>
Again, see above.
> I gave my version of Tim Perdue Script as an example of which kind of
> functionality can be found in a « user management » script (by the way this is
> a set of functions not a class ..) its a real life one that is certainly not a
> programmer deam, but it works very well.
>
> Of course the way it will be implemented is not T. Perdues ;- )
>
> But there are some very good ideas in his script....
>
> Did you read the list of functionally I posted ? if you have any idea ,
> criticism or addition they are welcome
> I do agree about comparing this to BD.
>
Well, it was a good surprise to see someone else using his scripts as a
base for registration stuff. I use a extensely modified version of those
scripts and I was already trying to create a more generic class to handle
Registration issues for my upcoming site.
However, the code I have is so specific that I don't think it would help
this project in particular. I believe my comments would help more ;)
Joao
--
João Prado Maia <jpm@phpbrasil.com>
http://phpbrasil.com - php com um jeitinho brasileiro
--
Precisando de consultoria em desenvolvimento para a Internet ?
Impleo.net - http://impleo.net/?lang=br