Discussions

TSS feedback: Personalized MyThreads --

  1. Personalized MyThreads -- (6 messages)

    Hey Floyd,
    How is it going? I have been really enjoying the new MyThreads on the serverside. One thing it is still missing is the ability for the user to tag which threads he/she believes are *hot*. For instance, if a thread I am participating in has been "closed", the solution has been reached and both parties say "thanks, goodbye, etc..." that thread still shows up in MyThreads. It would be really sweet if I could mark the ones that I saw as *hot*. Just a suggestion. I know it will not be trivial. It will cause a change in the UI. The MyThreads wasn't too difficult though, was it? Just a findByOwnerOrParticpant(..)? But I see that a personalized MyThreads will cause a change in the Object model and the DB schema. Let me know what you think.

    Chris

    Threaded Messages (6)

  2. personalized "hot threads"[ Go to top ]

    I hear you Chris,

      It would be cool to have a "hot threads" per user. Right now we have a global hot threads, its just a flag on our thread EJB.

       Having a personalized hot threads feature would require back end changes, how about architecting it with me. It sounds like we are looking at modeling a many to many relationship (many users can have many hot threads). So how would we go about implementing such a thing?

        It sounds like we could use a new entity bean to model this many to many relationship. It would model a users interest in a thread.

      thoughts?

    Floyd
  3. personalized "hot threads"[ Go to top ]

    Floyd,
    Eventhough it is a n-n relationship, I don't think that the threads need to be aware of their relationship to the users. We could add a List of threads to the user. The threads then can be retrieved as needed (lazily) by the user bean. It is really an attribute of the user, which threads he/she is interested in.
    Let me know what you think.

    Chris
  4. personalized "hot threads"[ Go to top ]

    hmm... I am thinking that I don't want to modify the existing database schema, I would rather add new tables. I also am lazy so I don't want to write serializing code to deal with lists maped to a one record in a row.

      What I was thinking was having an entity bean represent a "UsersHotThread". This entity bean has a threadPK, and a UserPK. There would be one of these beans for every thread a user is interested in.

       Doing it this way would be the easiest (though not necessarily the best performing). To get a users hot threads, you just do findByUser() on the UsersHotThreadBean or something like that. To mark a thread as hot, you just create the bean with a users PK and the threadPK as a parameter.

       This is a super simple way. I don't know if it is the best way, but it works.

      thoughts?

    Floyd
  5. personalized "hot threads"[ Go to top ]

    Floyd,
    You are right in that would be the simplest way. At first, that is how I was looking at it. A simple two-column table mapping users to threads. I do believe this will be the easiest way to do it. If you want me to do it, just send me the ejbJAR for the thread and users along w/ the interfaces and ddl and I will send you the UsersHotThread entity back.

    Chris
  6. personalized "hot threads"[ Go to top ]

    Thanks for the offer Chris, but that won't be necessary (you writing the code). We plan to offer email subscription to forums and hot threads, so when I want to write the entity bean to include fields necessary for this feature once we begin implementation of it.

    Floyd
  7. personalized "hot threads"[ Go to top ]

    Cool Floyd,
    Keep me posted.

    Chris