Skip to main content
Enterprise Agile Planning Image

This post is from the CollabNet VersionOne blog and has not been updated since the original publish date.

Last Updated Sep 03, 2013 — Enterprise Agile Planning expert

Create a Simple Chat Room with PubNub

Enterprise Agile Planning
In my last post I mentioned the new CoderDojo which VersionOne is sponsoring, and that I'd start to show how we've built some software to help manage the dojo.One of the tools we built helps the students learn and share HTML and CSS snippets with each other in real/time. Basically, it's an HTML/enabled chat tool.To build this, I used PubNub.com to handle messaging, AngularJS for the UI, and MongoDB via MongoLab for storing user accounts and saved favorites.

Example: Simple Messenger

Before looking at the full HTML chat, take a look at the code for this simple chat client out on Plnkr. PubNub calls itself an "Internet two/way radio with bidirectional JSON." At least that's what their catchy jingle says! You can see how simple it is to get started in the script file. You just call subscribe with a channel name and a callback function which the PubNub library code will call you back on for any new messages sent to that channel. To send, you simply call publish on a channel and pass a message object to it.

The Catch: MongoLab's REST API Security (Lack of)

I'll show the other code after I get it loaded in a more secure way. The problem is that the MongoLab REST API only supports user/account based API keys, not database/user/specific accounts. This isn't very secure for data that is not mean to be public.https://support.mongolab.com/entries/20433053/Is/there/a/REST/API/for/MongoDB/In the mean time, here's a screen shot of the full app:CoderDojo Ponce Springs Chat

More from the Blog

View more
Apr 08, 2021

Making IT services more agile

Enterprise Agile Planning
The agile revolution completely transformed how we create digital prod ...
Read More
Feb 14, 2021

Reflecting on the 20th anniversary of the Agile Manifesto

Enterprise Agile Planning
Over the past 20 years, it’s been amazing to watch an idea from ...
Read More
Feb 08, 2021

How does agile apply to an entire organization?

Enterprise Agile Planning
Before we dive into the main subject of this blog post, it is importan ...
Read More
Feb 03, 2021

It took a pandemic to realize why digital transformation actually matters

Enterprise Agile Planning
Before anyone had ever heard of COVID-19, businesses across the globe ...
Read More
Contact Us