Secret XPages app sneek preview 2: "follow me" logic and how it works
Yesterday I told you first facts about my new XPages application named "YouAtNotes CSC".
As promised, here is the next piece of the puzzle :-)
In YouAtNotes CSC I have some kind of content which a user can follow. There is heart icon, the user clicks on it and gets something like this:
After clicking OK, there is a nice animation and then he follows that content. Clicking again on the heart disables the follow again.
Click here to see a short movie about that.
To follow a content means that the user gets notified via mail when there is a change at that content. Something like subscribing to a thread in a forum.
How is that implemented?
After clicking on the gray heart an agent is executed via a Dojo xhrGet call (that means, via Ajax):
The "(follow)" agent is a LotusScript agent which:
So, after the user clicked and the agent ran, the content document has the name of the user in a list in a field. In the future, when something is added to the doc, another logic checks that field and sends a mail to all users listened in that field.
Clicking again on the heart to cancel the follow uses basically the same logic.
What you know now
is that YouAtNotes CSC is a web application which contains some kind of content. Users can follow a specific content and get updated when there is a change.
What you don't know yet
There are many, many other features left I will talk about in the next days so you can solve the puzzle :-)
Any guesses yet what CSC is about?