[joey] JabberUser Class

  • From: ES9 <es9@xxxxxxxxxxx>
  • To: Joey <joey@xxxxxxxxxxxxx>
  • Date: Tue, 30 Sep 2003 00:26:18 +0200

Hi Jon,


Another question: you have moved a lot of code inside the JabberUser 
object, like subscription and roster management (via the 
subscriptionManager and rosterManager classes). I am sure you had good 
reasons to do that, but it raison some questions for me :


- Subscriptions and Rosters can be managed only while the user is 
online, and the JabberUser object is in memory. This may have two drawbacks:
    - I would like to add code to handle rosters of users, both online 
and offline, so i have to handle the roster in different way for online 
and offline users. I would prefer to have an unique method witch handle 
the roster, outside the scope of JabberUser, probably in clsRoster.
    - The XMPP draft say explicitely that, for some subscriptions 
packet, the roster MUST be modified immediately, whether the user is 
online or not (XMPP-IM 8.4.1 §3)


- It's not in synch with actual architectural desing, witch promote:
    - Logic free statefull data object
    - Stateless business logic layer
    - Stateless data access layer

The benefits are:
    - The data object represent the states, but not the logic, so it's 
not modified when the logic is modified (well, it should not, if 
correctly made)
    - Most of the code of the application, in the BLL and in the DAL, is 
stateless, witch is easier to make theadsafe, and give more throughput 
in multiusers application
    - The different layers can be lousely coupled, just passing the data 
object from one layer to another

It's a little like passing an xml packet from one layer to another, but 
with the JabberUser object.




Other related posts: