Author |
Topic |
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 29 September 2005 : 18:18:17
|
I don't have any objection to using classes, I am a delphi programmer so have been using them for a long time, you just have to be careful you don't over use them as in my above example, if all you require is a members name in a page then it is much quicker and a lot more eficient to have a global function to retrieve it, rather than having to instantiate an entire user object just to get at the name.< |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 29 September 2005 : 20:24:22
|
Why does it have to be either/or? The class would work best in situations where you are working with the entire profile (or at least large chunks of it); like registration, editing profiles, displaying profiles, etc. But for those situations where you need to just retrieve something like the name and title, or some other small chunk of info, use a general-purpose function.
I was thinking about the classes more so as a means of consolidating the validation procedures and reducing some of the redundant code. Like I mentioned above, appropriate, balaced usage.< |
|
|
Topic |
|
|
|