Sounds like a PHPWS_Item to me. The question is, do you require the properties
and methods that go with PHPWS_Item? My interpretation is PHPWS_Item performs
updates transparent to the datasource and keeps track of various items such as
owner, modifier, time of modification, ip address from which modification came
in. Pretty fundamental I think as far as base classes in php go. The fact
that you aren't using logins only removes the usefullness of the owner/modifier
column. I would be interested in hearing other opinions.
Best,
Jim
> -----Original Message-----
> From: Verdon Vaillancourt <vern@xxxxxxxxx>
> Sent: Wednesday, 4. May 2005 10:37 -0400
> To: phpwebsite-developers@xxxxxxxxxxxxxxxxxxxxx
> Subject: [Phpwebsite-developers] To extend PHPWS_Item or not
>
> Hi
>
> Previously I've done a lot of serious hacking to other people's mods,
> I'm now in process of trying to write one of medium sophistication
> completely from scratch (well, more or less ;). One thing I'm not sure
> of is when I should make a class an extension of PHPWS_Item and when I
> should not, or if there is any hard-set rule. In my specific case, I am
> writing a mod that facilitates online petitions. I have written one
> class for the actual petitions, which does extend PHPWS_Item. I am now
> working on the class for signatures and it is that one that I am unsure
> of how to handle. The signatures are not items that will ever be
> directly manipulated by a logged in user, per say. Basically, an annon
> visitor can fill in a form to sign the petition. They will then get an
> e-mail with a link to click, which when they do so, the signature
> record is updated to indicate status as verified. At any time, an admin
> will be able to go in to the site and get stats on the number of
> verified signatures, print lists, and so on.
>
> So, I guess what I'm asking is, is there any hard-set rules as to when
> it is best to make a class an extension of PHPWS_Item or not? I've read
> through many core and 3rd party mods, and although I see some
> similarities in approach, I don't really see a pattern.
>
> TIA for any advice.
>
> Best regards from Northern Ontario, Canada,
> verdon vaillancourt
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
> Get your fingers limbered up and give it your best shot. 4 great events, 4
> opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
> win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
>
> Phpwebsite-developers mailing list
> Phpwebsite-developers@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers
>
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
|