Subject: Developers of Sympa
List archive
Re: [sympa-developpers] Is BounceMessage class really neede ?
- From: David Verdin <address@concealed>
- To: address@concealed
- Subject: Re: [sympa-developpers] Is BounceMessage class really neede ?
- Date: Mon, 22 Jul 2013 17:31:39 +0200
Le 22/07/13 16:52, Guillaume Rousse a
écrit :
address@concealed">Le 22/07/2013 13:53, David Verdin a écrit :True. I just found it was more intuitive by using an object, but I'm open to alternatives. address@concealed">Rightissime. I see clearly now the distinction you want to make: discern message parsing from the processing of the information contained by the message.Using this class allowed me to simply call "BounceMessage::process" inIndeed, but you're mixing logic here: address@concealed">Heh! ;) Actually, I use it in bounced.pl because I expect to handle bounces and nothing else. Actually, we could improve BounceMessage::new to return undef if the message is not a bounce. But then again, You made a point by discerning message analysis from user management. address@concealed">Great! We agreed! address@concealed">Two times! address@concealed">Agreed. The point here is to know how to draw the line. Just see below the kind of reasonning that led me to create the BounceMessage object All these Message / Bounce / task / etc. Classes have the common point to be found in spools - either as files or as DB entry. that's their common point. We could then have a base object that would provide the informations necessary for spool management (list, queries, sorting, and so on). Consequently, The Spool object would just have to manipulate collections of these objects. Then, some of the objects in spool have more in common. list messages, bounces and messages to archive, for example are all RFC 822 valid messages and can then be processed as it. Bounces have then some particularities : they contain codes that need to be analyzed to check if they are errors or return receipt, etc. This is a particular task and I didn't see it being inserted in a common Message object. That's where we differ. You consider that there is no added value to putting it in a dedicated message. I thought that, facotrizing-wise, it was more readable to put it apart from the rest. Finally, as I knew we were handling bounces to increase the error note of users, I added user management function to the object because one you have a fully grown BounceMessage object, you laready know all you need to handle error score : which list, which user, which error. I focused on Sympa main usage of the bounces. That's probably where I have difficulties drawing the line between functionnality and good refactoring. Maybe we should put error manamgenet in User instead? There is also the question of MDN and DSN. They are both bounces, structurally speaking, but are not used to handle error, just to track message delivery. Actually, the more I write about it, the more I'm confused. what would you say if I proposed a little visioconference around the end of the week? We could speak about : - the result of the merge, - our current design concerns, - our aims for Sympa 7.0, functionally, and maybe have some ideas about a calendar? Regards, David --
A bug in Sympa? Quick! To the bug tracker!
|
Attachment:
smime.p7s
Description: Signature cryptographique S/MIME
-
[sympa-developpers] Is BounceMessage class really neede ?,
Guillaume Rousse, 07/22/2013
-
Re: [sympa-developpers] Is BounceMessage class really neede ?,
David Verdin, 07/22/2013
-
Re: [sympa-developpers] Is BounceMessage class really neede ?,
Guillaume Rousse, 07/22/2013
- Re: [sympa-developpers] Is BounceMessage class really neede ?, David Verdin, 07/22/2013
-
Re: [sympa-developpers] Is BounceMessage class really neede ?,
Guillaume Rousse, 07/22/2013
-
Re: [sympa-developpers] Is BounceMessage class really neede ?,
David Verdin, 07/22/2013
Archive powered by MHonArc 2.6.19+.