Company
Date Published
Author
Michael Carroll
Word count
1408
Language
English
Hacker News points
None

Summary

Part 3 of the PubNub series guides users through the process of enhancing a chat application built with PubNub’s AngularJS SDK by adding a real-time user roster. Building upon the previous tutorial that introduced infinite scrolling, this installment focuses on implementing a feature that displays the current online users and updates in real-time as users join or leave the chat room. This involves activating the Presence API in the PubNub admin dashboard and developing a User service to manage the array of online users, which is continuously updated with events such as 'join' and 'leave'. The tutorial further instructs on setting up the user interface for the real-time roster using AngularJS directives, allowing developers to see the user list dynamically update across multiple windows. This comprehensive guide provides not only the steps to integrate these features but also emphasizes the modular approach of adding components to the chat app, akin to assembling Lego blocks.