Thursday, October 13, 2016

Topics Part 2 (File Upload Fun Over WebSockets)

Hi All,
Below is a quick video of Topics' ability to upload files over the websocket protocol (no audio).  As you can see it does support drag n drop and your standard file selection.  If you are interested in the code, download the Topics application from OpenNTF.  See the highlighted design elements in screen capture to review:

Friday, October 07, 2016

Topics Part 1 (ACL Setup and Db Properties)

Hi All,
To setup the Topics group chat application all you will need is to set the ACL with Default access as Author, Anonymous to no access, your websocket user (fore me it's admin admin) to Manager with the [admin] role.  See below from my local dev.

Setup database properties accordingly.  The application does leverage unread marks, leave "Don't maintain unread marks" unchecked.  I have a habit of always checking that attribute for added performance since most of my apps don't leverage that feature.

Wednesday, October 05, 2016


Hi All,
Just uploaded a new XPage application to OpenNTF called "Topics" (quick demo on this site).  It's a group chat application that is similar to Slack or Hipchat.  It covers all the basics of chat + attempts to use WebRTC to establish video conferencing.  Currently only supports two users at a time.  It was fun to build over the last few weeks.  I tried to keep it as simple as I could.  Most of the code base is straight up XPages / JavaScript / SSJS with a couple very simple managed beans (e.g. App bean, and UserInfo bean) to demonstrate sharing state from XPages runtime to the scripts.  Over the next few days I'll put together some more blog posts to walk through the design of the application.  Be sure to have the XPages extension library and installed and configured before using.  Thanks for stopping by...


Tuesday, October 04, 2016 v3.0.1

Hi All,
Just finished uploading the latest version of to openntf.  See below straight from the README:

-New Features include:

  • A new event method to script against called onBeforeMessage (fires just before a message will be sent, used for filters, other validations)
  • A new SocketMessage attribute called shortCircuit.  If set to true halts sending of message (for use with onBeforeMessage)
  •     Support for includes / use across multiple script libraries using for example:
    • JavaScript external library references would be ///use lib1.ssjs, lib2.ssjs, lib3.ssjs
    • Ruby's external references would be #///use lib1.rb, lib2.rb, lib3.rb
  • Support for sharing application and session managed beans (note, only good for sharing state, do not try to perform notes operations)
  • Additional utility objects are now available in script scope as well (e.b. b64Utils, strUtils, ioUtils, fileUtils etc)
  • Open source group chat XPages application will be available soon on OpenNTF that will demonstrate these and the prior release's new features (see quick demo)
    A new parameter to override the default character set when pulling in scripts (see WEBSOCKET_CHARSET=xxxx).