You are here: Re: OOP database tables <-> php interface (semi LONG) « PHP Programming Language « IT news, forums, messages
Re: OOP database tables <-> php interface (semi LONG)

Posted by amygdala on 04/16/07 21:54

"Toby A Inkster" <usenet200703@tobyinkster.co.uk> schreef in bericht
news:goocf4-4kp.ln1@ophelia.g5n.co.uk...
> amygdala wrote:
>
>> Mind you, it's not a big issue, merely a cosmetic one. What I am still
>> struggeling more with is the registrate function. Would you consider that
>> a
>> User class method. Or should it be in some other object. Or perhaps just
>> be
>> a regular function in the global script?
>
> It could be implemented as a regular function, but I'd tend to put it as a
> static factory function in the User class. (i.e. it returns the newly
> registered User as an object -- much like the static login function
> would.) This has the benefit of having internal consistency with the login
> function. (A developer familiar with the login function would have little
> trouble picking up the registration function.) Also, it keeps the function
> "wrapped up" in the User class, so that everything is kept in one place.

Alright Toby, that is reassuring. Thanks for the input.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация