[PIM] Reasons why we should use New instead of MessageRead

Daniele Ricci daniele.athome at gmail.com
Tue Oct 26 09:45:05 CEST 2010


Currently, MessageRead is used in the messages domain to indicate a
message has been read, that is, it's not new.
Together with the help and support of TAsn, we decided to change it to New.
Couple of advantages in the new naming:

1. Most of the messages in the database are read, so keeping
MessageRead will mean we keep this field for every message in the
database, while keeping New means we'll only keep it for the fraction
of unread messages we have. I used the same method in the calls domain
for that exact same reason.
2. New is a more generic and nice name that also applies naturally to
outgoing messages, outgoing messages are New, and sent messages are
3. This also makes querying for Unread messages easier as currently we
have to check if MessageRead = 0 or MessageRead doesn't exist, this
will make it easier.

Of course we'll change the code to do it automatically. It will use
this new naming for any future messages, but will also fix the old
database automatically.

Tom / daniele_athome

More information about the community mailing list