IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 1 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New I'd put it in the List class.
In fact, maybe I'd make a way for a degenerate, once-off special List to be made for just this event whose purpose is to subscribe exactly one User to exactly one Message, send just that mesages (i.e. no subscription messages at all) and then throw itself away.

Actually, it wouldn't be a special List at all: the controller/dispatch logic would respond to a request to Resend That Message to This User and create a new List object as I just described for just that purpose. The only special things would be that you would have to teach the List how to not send any subscription messages and to be self-deleting once the Message is sent. It need not even be saved to the database. :-)

My recommendation is based on the fact that all the knowledge you need about sending a Message to a User is *already* in the List object.

Wade.

Q:Is it proper to eat cheeseburgers with your fingers?
A:No, the fingers should be eaten separately.
New Almost agreement
Of the four classes you listed...
* User -- A user, what lists they're signed up to, what messages they've received, methods to subscribe, unsubscribe, deactivate

* List -- Description, what messages are attached, what users are subscribed, create a new list

* Message -- Includes subject, body, schedule, has method to populate message queue with record for all users who should receive it

* Queue -- Send or drop pending messages, list sent or pending messages

I'd create (at least) a 5th. Probably a 6th as well.

5th would be Messages (which might be your queue) It's a collection of messages.

6th would be MessageBO (MessageBO). It would know how to take a message off a Messages(Queue) and send them. It would be responsible for the bulk of actually pushing a message off to SMTP.
     Which object should send an email? - (drook) - (3)
         cat file | mailx -s "resnt email" user@addy.com - (boxley)
         I'd put it in the List class. - (static) - (1)
             Almost agreement - (Mycroft_Holmes_Iv)

Ramble on.
35 ms