Please help me to model this simple requirement

87 views
Skip to first unread message

mynkow

unread,
Jul 3, 2012, 8:42:29 AM7/3/12
to ddd...@googlegroups.com
Hi, recently I became a father and I still cannot concentrate and do my regular job. I have to create a model but I am failing for 2 days. WTF It is not complex one after all. OK

I want you to help me for the big picture, what ARs and VO you could do. Which one is responsible for what...

This is something which everyone did at least once in his life. I am talking about notification subscription. Here are the rules:

- user is a... user 
- group is a place similar to chat rooms
- two types of notifications
    => System notification
    => Email notification, each email notification has two states, default or not default notification. New users automatically get subscribed to default notifications.
- two types of notification subscription
    => Global subscription, if you are subscribed you are notified everytime
    => Group subscription, it acts like global subscription but you can override the behavior for each group.

- user can subscribe to a notification.
- user can unsubscribe to a notification
- user can subscribe to a notification for a particular group
- user can unsubscribe to a notification for a particular group

I started with the following two classes but I feel it is wrong:

GlobalEmailSubscription
 - subscribe(user)
 - unsubscribe(user)

GroupEmailSubscription : GlobalEmailSubscription
 - subscribe(user, group)
 - unsubscribe(user, group)


Tom Janssens

unread,
Jul 3, 2012, 1:45:30 PM7/3/12
to ddd...@googlegroups.com
I assume a subscription AR might be a possible alternative? Hard to see without all the other domain reqs...

Typed on a mobile phone

Reply all
Reply to author
Forward
0 new messages