This Application you are developing will be folded into an existing social network.
Design, develop, and test a push notification application with Ruby on Rails and JQuery.
Push notification origin:
Develop a method for a rails server to fire a push notification to a user’s browser based on activity for that user (in this case a private message). A use case example: a user in a social network was sent a private message. The need for a notification should be detected by the server, sent to the appropriate user’s browser using COMET or similar techniques as seen fit if they are logged on, and displayed as a counting number in the upper left hand corner, and a message displayed in the upper right. The message notification should be stacking and scrollable, only fading away when the user clicks on it (reducing ambiguity of seen and unseen messages). Below is a link to code to use for this.
The application should, in the example implementation you are producing, demonstrate multiple users, able to send messages to each other, while the server creates a push notification to the other. The user receiving the message should be shown a notification with a truncated message. So, when a new private message is saved to a database of private messages, the target is sent a notification.
If the target user is logged out, the notification ticker in the upper right should show a count of unseen notifications. Clicking the counter should make the notifications in the upper right appear. As they are viewed or cleared by clicking the X on the notification, the ticker count should decrease.
Clicking a notification should disable the page, and open a modal JQuery dialogue with the full message. The message have a form allowing a response to be written, just below the message.
Finding the right target user:
The current system is using a rails application with the devise plugin for users. Use a simple devise implementation for users in your app which allows notifications to be pushed to logged in users based on devise authentication, and a waiting notification left for logged out users, as described above.
Saving State in a Database, and displaying the notification:
If the user is logged out, messages should be stored in a database, indicating they have not been cleared. Uncleared messages result in an increase to the upper left hand counter, and a message stacking in the upper right. Clicking the message should clear that notification, and move others up. To achieve this visual in the upper right hand corner of the screen, use the following with JQuery:
[url removed, login to view]
Also, if a message is long, use a rails plugin to shorten it to a given length, say 500 characters.
Use the best techniques you can, as can be easily implemented, to make the app as portable across browsers as possible. This isn’t a strict requirement, as this could be an entire project of its own. Just, be reasonable not to use something limited to only some browsers.