Skip navigation
1 2 3 Previous Next

Developer

159 posts

Hack_Tour_Plane_nyc.png

Happy New Year everyone!! To start the new year right, we're kicking off our second series of our Developer Days to help teach the next chapter of Jive Integrations. In this series, we'll be covering how to create an external middleware'd Jive Activity Integration and also the different types of webhooks that Jive provides and some use cases that are popular.

 

How To Register

  1. Make sure your e-mail address in your profile is up-to-date and correct
  2. Please comment below with your firstName + " " + lastName + ", " + company

If your organization's internal policies do not allow you to post on public forums, please feel free to message/e-mail me or Ryan Rutan and we'll take care of it.

  1. You must register yourself, and yourself only. You cannot register in someone's behalf. It not only keeps it fair for everyone, but also ensure we have a way to communicate and everyone has access to all the tools we'll be using (e.g. Jive Sandbox).
  2. Since we want to be able to reach as many organizations as possible and seating is limited, we are capping registration to 3 per organization and anyone beyond that will be placed on the waitlist. After registration closes, if there's space available, they'll be moved to be a registrant.
  3. Registration closes January 27th 5p.m. EST

 

Event Details

  • January 31, 2016
  • 12:30p.m.-3:00p.m. EST
  • via GoToMeeting (meeting specific details will be given day before event via e-mail)

 

Prerequisites

Everyone must have all the required software installed from Jive Developer Days Installfest prior to joining the session. I will be posting up a document detailing everything with instructional video to make it as easy for everyone as possible & all registrants will get a reminder link.

 

What You'll Gain

 

Registered

NameOrganization
You!

 

Waitlist

NameOrganization

The last several weeks I was implementing a new custom view tile to show discussions in a forum like manner.

There are several ideas and demands in the community that Jive should present discussions in a better way and here you are

 

 

Features

- show discussions with subject, author, creation date and place as a tile in page places

- showing metadata like number of likes, views, replies and bookmarks

- filter discussions by search for author names, subject and dates and mark results in the table

- html content previews for the discussion, the latest reply and the correct answer, loaded on demand when hovering the specific columns

- sorting of loaded discussions for (almost) all columns (client side sorting as Jive only supports server side sorting for fields title, latest activity and creation date)

- several configuration options (part not finished yet)

- show/hide columns

- layout of table

- tile name

- number of discussions shown

- filter for unanswered/answered questions

 

Implementation details

- Using the Jive REST API the tile will load more than 100 discussions at once (if necessary) in a batch and afterwards load only the latest reply of each discussion in a osapi batch call to reduce api calls to Jive.

- I am only requesting the data needed from the JIVE REST API by using the fields parameter. If the place where the discussion is created in should not be shown, I will not request it to save traffic and waiting times.

- Content preview is loaded on demand because the html preview can be very big and would increase waiting times.

Technologies

- Jive SDK based on NPM

- Jive custom view tile technology

- Jive REST API via osapi library

- JQuery plus some addons

- Datatables

- JBOX library

 

Screenshots

 

search_and_mark2017-01-04_16-07-38.png

 

discussion_preview_2017-01-04_15-01-22.png

 

latest_reply_2017-01-04_15-02-02.png

 

correct_answer_preview_2017-01-04_15-02-39.png

 

 

Feedback

I want your feedback- please share your ideas, questions and hints!!

My idea is to publish that tile as a commercial addon with a very low, fixed price per year, so that I will be able to adapt to changes of Jive platform, implement new features, renew used libraries and fix bugs etc.

 

What do you think?

 

Thanks

Jens

 

PS: I am a Jive Consultant, working for fme AG (Jive Partner) in Germany. This post is on my own and does not relate to fme AG.

This is the second bookmarklet we use to help with our work on element14 Community. If you're not sure what bookmarklets are, I explain them in this other blog post; Bookmarklet for displaying Jive content IDs

 

This bookmarklet will display a panel containing the page metadata which is handy for SEO-related tasks. Here's how it looks on JiveWorks;

 

 

And here's how it looks on element14 Community, where we've got extra items like the canonical URL being included across the site, the Open Graph protocol, etc;

 

 

The JavaScript for this bookmarklet is here;

 

javascript:var html='';function encode(r){return r.replace(/[\x26\x0A\x3c\x3e\x22\x27]/g,function(r){return "&#"+r.charCodeAt(0)+";";});}var canonical=$j('link[rel=canonical]');if(canonical.length>0)html+=encode('<link rel="canonical" href="'+$j('link[rel=canonical]')[0].href+'">')+'<br>';html+=encode('<title>'+$j('title').html()+'</title>')+'<br>';var meta=$j('meta');for(var i=0;i<meta.length;i++){if(!meta[i].itemprop){html+=encode(meta[i].outerHTML)+'<br>';}}$j('.e14-page-info').remove();$j('body').prepend('<div style="border:1px solid grey; height:auto;; font-size: 10px; padding: 5px; position: fixed; display: block; top: 10px; left: 10px; z-index: 10; background: white;" class="e14-page-info">'+html+'</div>');void(0);

 

If you're interested in the uncompressed source, here it is (to use this in a bookmarklet, you'll need to run it through a service like this);

 

var html = '';

function encode(r) {
  return r.replace(/[\x26\x0A\x3c\x3e\x22\x27]/g, function(r) {
  return "&#" + r.charCodeAt(0) + ";";
  });
}

html += encode('<link rel="canonical" href="'+$j('link[rel=canonical]')[0].href+'">')+'<br>';
html += encode('<title>'+$j('title').html()+'</title>')+'<br>';

var meta = $j('meta');
for (var i=0; i<meta.length; i++) {
  if (!meta[i].itemprop) {
  html += encode(meta[i].outerHTML)+'<br>';
  }
}

$j('.e14-page-info').remove();
$j('body').prepend('<div style="border:1px solid grey; height:auto;; font-size: 10px; padding: 5px; position: fixed; display: block; top: 10px; left: 10px; z-index: 10; background: white;" class="e14-page-info">'+html+'</div>');

void(0);

This is something we've been using on our site for a while; I've updated the code so that I can share it with fellow Jive developers. Bookmarklets are browser bookmarks that contain JavaScript code. When you click the bookmark, it'll run the JavaScript against the page you're looking at, which comes in really handy!

 

What I've developed here is a bookmarklet that will display a panel at the top left of your Jive site.. the panel will contain the IDs of the content & Place you're looking at, and give you links to the full JSON object via a REST call. This kind of thing is really handy if you're regularly working with the REST API.

 

Here's how it looks;

 

 

1. Create a new bookmark

 

2. Edit the bookmark and paste in the JavaScript below

 

 

3. Go to your Jive site (or JiveWorks) and click the bookmark to display the panel

 

Here's the JavaScript...

 

javascript:var html='';var currentContainerID=window.jive.global.containerID;var currentContainerType=window.jive.global.containerType;var currentContainerName='';if(typeof(e14CurrentContainer)!=='undefined')currentContainerName=e14CurrentContainer.name;var contentInfo=$j('.jive-content:first');if(contentInfo.length==0||typeof(contentInfo.data('object-id'))==='undefined')contentInfo=$j('.bookmark-controls');if(contentInfo.length>0){var contentID=contentInfo.data('object-id');var contentType=contentInfo.data('object-type');if(typeof(contentID)==='undefined'&&typeof(e14CurrentObject)!=='undefined'){contentID=e14CurrentObject.id;contentType=e14CurrentObject.objectType;}if(typeof(contentID)!=='undefined'){html+='Content type: '+contentType+', ID: '+contentID+'. ';html+='<a href="'+_jive_base_url+'/api/core/v3/contents?filter=entityDescriptor('+contentType+','+contentID+')" target="_blank">REST</a>';html+='<br>';}}html+='Container type: '+currentContainerType+', ID: '+currentContainerID;if(jive.global.containerBrowseId>-1)html+=', Browse ID: '+jive.global.containerBrowseId;if(currentContainerName!=='')html+=', Name: '+currentContainerName+'.';if(currentContainerType!=3){html+=' <a href="'+_jive_base_url+'/api/core/v3/places?filter=entityDescriptor('+currentContainerType+','+currentContainerID+')" target="_blank">REST</a>';}else{html+=' <a href="'+_jive_base_url+'/api/core/v3/people/'+currentContainerID+'" target="_blank">REST</a>';}html+='<br>';$j('.e14-page-info').remove();$j('body').prepend('<div style="border:1px solid grey; height: 25px; font-size: 10px; padding: 5px; position: fixed; display: block; top: 10px; left: 10px; z-index: 10; background: white;" class="e14-page-info">'+html+'</div>');void(0);

 

If you're interested in the uncompressed source, here it is (to use this in a bookmarklet, you'll need to run it through a service like this);

 

var html = '';

var currentContainerID = window.jive.global.containerID;
var currentContainerType = window.jive.global.containerType;

var currentContainerName = '';
if (typeof(e14CurrentContainer)!=='undefined') currentContainerName = e14CurrentContainer.name;

var contentInfo = $j('.jive-content:first'); // Try the jive-content class first
if (contentInfo.length==0 || typeof(contentInfo.data('object-id'))==='undefined') contentInfo = $j('.bookmark-controls'); // Next try the social action link

if (contentInfo.length>0) {
  var contentID = contentInfo.data('object-id');
  var contentType = contentInfo.data('object-type');

  // We can get at blog container if we're on element14 Community 
  if (typeof(contentID)==='undefined' && typeof(e14CurrentObject)!=='undefined') {
  contentID = e14CurrentObject.id;
  contentType = e14CurrentObject.objectType;
  }

  if (typeof(contentID)!=='undefined') {
  html += 'Content type: '+contentType+', ID: '+contentID+'. ';
  html += '<a href="'+_jive_base_url+'/api/core/v3/contents?filter=entityDescriptor('+contentType+','+contentID+')" target="_blank">REST</a>';
  html += '<br>';
  }
}

html += 'Container type: '+currentContainerType+', ID: '+currentContainerID;
if (jive.global.containerBrowseId>-1) html+=', Browse ID: '+jive.global.containerBrowseId;
if (currentContainerName!=='') html += ', Name: '+currentContainerName + '.';
if (currentContainerType!=3) {
  html += ' <a href="'+_jive_base_url+'/api/core/v3/places?filter=entityDescriptor('+currentContainerType+','+currentContainerID+')" target="_blank">REST</a>';
} else {
  html += ' <a href="'+_jive_base_url+'/api/core/v3/people/'+currentContainerID+'" target="_blank">REST</a>';
}
html += '<br>';

$j('.e14-page-info').remove();
$j('body').prepend('<div style="border:1px solid grey; height: 25px; font-size: 10px; padding: 5px; position: fixed; display: block; top: 10px; left: 10px; z-index: 10; background: white;" class="e14-page-info">'+html+'</div>');

void(0);

gala_tile.png

 

We have some exciting news to share for Jive Cloud customers! There was a lot of requests to increase the performance of Custom View Tile's load times and to satisfy that without compromising security, we're presenting the new Gala service to replace Shindig. What lets Gala work is better caching and loading from a different domain CDN than your Jive instance. The results of this is a perceived up to 30+% faster loading times than before!!!

 

How do you enable the new Gala service?

Admin Console > System > Settings > New Features > Lightweight Custom Tiles

We will be enabling GALA service in the official Jive Sandbox in the near future for you to test out yourself mid-December. This post is just to give everyone a heads up.

 

How to check if Gala is admin enabled inside add-on?

There will be a globally available gala object. So in your included javascript:

if(gala && typeof gala === "object"){
     // Do Gala specific stuff
}

 

What do I need to do differently?

Since Gala loads the assets from a domain other than your main Jive site into an iFrame, you won't be able to read the window.location or window.parent.location. So to help solve that, we've introduced two new methods that are available whether Gala is enabled or not—jive.tile.getAppURL() and jive.tile.getJiveURL(). An example of getting the add-on's URL before Gala and after is below:

 

// Old way to get Add-on URL
function getAddonURL(){
     var matches = window.location.href.match(/.*?[?&]url=([^&]+)%2F.*$/);
     if (matches.length === 2){
          return decodeURIComponent(matches[1]);
     } else{
          return ''; 
     }
}

 

// New GALA way to get Add-on URL
function getAddonURL(){
     if (gala && typeof gala === "object"){
          return jive.tile.getAppURL();
     }
}

Just a friendly note because this is the second time (at least) that I've run into this problem and it is very frustrating and unintuitive to resolve.

 

We are on a hosted instance (7.0.3) and have several custom macros built. These load some javascript to do their thing (display a video player, dynamic tables, etc.). I was just refactoring our code and extracted some javascript out from being generated in the Macro Java class to loading from a js file because it was soooo much easier to debug and tweak etc.

 

Well, then we noticed that our Overview Pages would fail to load the Layout/Widget Panel when editing and instead would just get stuck on the 'Loading' spinner graphic.

 

I narrowed it down to only when a document which contained the macro I just modified was being loaded in a View Document widget. Not just that, but only when MULTIPLE of these macros were in that document.

 

Very curious I thought.

 

So after flailing around for a while, having a good yell at the computer, it finally dawned on me that I had seen this happen before with another macro that I also "simplified" a year or so ago.

 

What I recalled then, was that it was a problem with how the widgets are loaded "safely" when in Overview Page edit mode. What this does is extract all the scripts  and then load them dynamically or something weird. The problem is that if it hits the same script src url twice, it chokes and fails silently. What a nice "safe" feature.

 

Problem is that the Widget Panel is waiting on that safelyLoad call to return before removing the loading placeholder.

 

Now for the solution. Instead of loading this js file with the macro itself, I added a reference to it in header.soy. Lame, that means it will be loaded on every page, but it fixes the problem. Downside is that it loads a few more KB on each page that doesn't need that javascript, but because of what is in the js file, there is no detrimental effect to functionality.

 

Anyway, hope this helps you not struggle for a couple hours like I did (multiple times). And hopefully, it will help me not do the same next time.

 

Cheers,

Scott

Hack_Tour_Bus_austin.png

 

This is our LAST Developer Days event for the year, and to make sure as many people can attend as possible that might have missed out on prior events—and the success we felt from The European Dev Days event—we will be making this one hosted virtually on GoToMeeting. We'll be covering our Jive middleware-less stories and best practices in a lecture + hands-on hack session where we'll create integrations together that solve real business use cases, and answer your questions along the way.

 

Event Details

Since we want to be able to reach as many organizations as possible and seating is limited, we are capping registration to 4 per organization and anyone beyond that will be placed on the waitlist. After registration closes, if there's space available, they'll be moved to be a registrant.

 

  • November 17, 2016 — 1p.m.-3p.m. CST
  • November 18, 2016 — 1p.m.-3p.m. CST
  • via GoToMeeting — URL will be sent after registration closes.
  • Attendee limit of 25
  1. You must register yourself, and yourself only. You cannot register in someone's behalf. It not only keeps it fair for everyone, but also ensure we have a way to communicate and everyone has access to all the tools we'll be using (e.g. Jive Sandbox).
  2. Since we want to be able to reach as many organizations as possible and seating is limited, we are capping registration to 4 per organization and anyone beyond that will be placed on the waitlist. After registration closes, if there's space available, they'll be moved to be a registrant.

 

What You'll Gain

 

Prerequisites

Everyone must have all the required software installed prior to joining the session. (See: Jive Developer Days Installfest )

 

How To Register

  1. Make sure your e-mail address in your profile is up-to-date and correct
  2. Please comment below with your firstName + " " + lastName + ", " + company

 

 

Registered

NameCompany/Organization
saurabh.v.singh@schwab.comCharles Schwab & Co., Inc.
almore.catoCox Automotive
Rachit Chaudhary
Oracle India Pvt Ltd
jayjayprodOrange
pushpendra.paliwal@orange.com
Orange Business Services
eramitpshah
IonIdea
Kranthi Kiran Chiluveru
S&P Global
Samee K STechMahindra
Micah MarkmanReingold
dshiferawReingold
YOU!

 

Waitlist

You will be placed on the waitlist if we reach capacity of 25, or if more than 4 individuals are registered with your company. If there is space after registration closes, your status will change to registered and you'll be e-mailed event details. If you really really want to go and are on the waitlist, send me an e-mail and I'll see what we can do.

NameCompany/Organization

For some time now, we've been wishing for an easy way to update the URLs for Places. Sometimes we name a Place in a hurry and later come up with a better name. Jive allows us to change quite a bit about a Place, but currently, changing the "displayName", the name that appears at the end of the Place's URL, is impossible through Jive's web interface and the Admin Console. It is only possible via the Jive REST API which, frankly, isn't quite that convenient for busy Community Administrators.

 

To fix this problem of inconvenience, I've created a .NET app (code included below) that allows administrators to quickly update a Place's displayName using Jive's .NET SDK. To update a Place, one must simply log in to their Jive account through the app, select the Place whose URL they would like to change, and provide a new displayName for the Place.

 

When we implemented this functionality for our Jive instance, we wrapped this app in an ASP.NET Web API controller, hosted the code on a web server, and created a web app that makes requests to the hosted app. This allowed us to build a UI that further simplified the process of updating Places. For the sake of simplicity, here I am only sharing the C# code for the app. But note that this can be easily built on top of.

 

Here is the code for the .NET app:

 

using System.Collections.Generic;
using Net.Pokeshot.JiveSdk.Models;
using Net.Pokeshot.JiveSdk.Clients;
using System.Net;
using System;


namespace PlaceUpdaterConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            string jiveUrl, username, password;


            // Get User/Site Info.
            Console.Write("Jive Community Url: ");
            jiveUrl = Console.ReadLine();


            Console.Write("Jive Username: ");
            username = Console.ReadLine();


            Console.Write("Password: ");
            password = Console.ReadLine();
            Console.WriteLine();
            Console.WriteLine();


            var creds = new NetworkCredential(username, password);


            // Get a list of places available.
            PlacesClient p = new PlacesClient(jiveUrl, creds);
            var places = p.GetPlaces(count: int.MaxValue);
            printPlaces(places);


            var selectedPlace = selectPlace(places);
            Console.WriteLine("Current URL for {0}:\n{1}", selectedPlace.name, selectedPlace?.resources?.html?.@ref);


            string url = selectedPlace?.resources?.html?.@ref;
            int lastSlash = url?.LastIndexOf('/') ?? 0;
            Console.Write("\nNew URL:\n{0}", url.Remove(lastSlash + 1, url.Length - lastSlash - 1));
            string displayName = Console.ReadLine();


            // Update the display name of the place the user selected.
            selectedPlace.displayName = displayName;


            Console.Write("\nChange {0}'s URL? (y/n): ", selectedPlace.name);
            var isCorrect = Console.ReadLine();
            if (isCorrect != "y" && isCorrect != "Y")
            {
                Console.WriteLine("\nOperation Canceled");
                return;
            }


            // Send the newly updated Place back to Jive.
            p.UpdatePlace(int.Parse(selectedPlace.placeID), selectedPlace);


            Console.WriteLine("\nSuccessfully Updated");


            Console.ReadLine();
        }


        private static GenericPlace selectPlace(List<GenericPlace> places)
        {
            string isCorrect;
            GenericPlace selectedPlace;
            do
            {


                Console.Write("\nSelect a PlaceId from the list above: ");
                string placeId = Console.ReadLine();
                selectedPlace = places.Find(x => x.placeID == placeId);


                Console.Write("You selected {0}. Is this right? (y/n): ", selectedPlace.name);
                isCorrect = Console.ReadLine();
            } while (isCorrect != "y" && isCorrect != "Y");
            Console.WriteLine();


            return selectedPlace;
        }


        private static void printPlaces(List<GenericPlace> places)
        {
            int columnWidth = 26;


            Console.WriteLine(" {0,-" + columnWidth + "} | {1,-" + columnWidth + "} | {2,-7} | {3, -7} ", "Place Name", "Display Name", "Type", "placeId");
            Console.WriteLine(new String('-', columnWidth * 2 + 7 + 6 + 11));
            foreach (var place in places)
            {
                Console.WriteLine(
                    " {0,-" + columnWidth + "} | {1,-" + columnWidth + "} | {2,-7} | {3, -6} ",
                    place?.name?.Length > columnWidth ? place.name.Remove(columnWidth - 3, place.name.Length - columnWidth + 3) + "..." : place.name,
                    place?.displayName?.Length > columnWidth ? place.displayName.Remove(columnWidth - 3, place.displayName.Length - columnWidth + 3) + "..." : place.displayName,
                    place?.type,
                    place?.placeID
                    );


            }
        }
    }
}

 

I hope someone else finds this useful.

 

Intro

To start a new initiative and provide examples for developers, we're going to start putting out some Jive integrations that we believe provide some benefit to our customers and you—the developers. These are open source projects under the apache 2.0 license and free to be used as they stand or as a baseline for your integrations. We'll be keeping these projects in the jiveapps/addons at master · jivesoftware/jiveapps · GitHub repo.

 

So what is LiveStream? It's a event video platform that's used by companies both big and small to provide event coverage. So a natural use case for it is a company event (like JiveWorld17!) to provide coverage to anyone who can't be at the event in person; or even for company-wide meetings.

 


 

GitHub Repos:


 

Data Flow:

This project integrates Livestream API's to bring a LiveStream live feed feed into Jive. It has the following core functionalities and data flow:

 

 

Custom View Tile (Middlewared)

Screen Shot 2016-09-26 at 6.18.25 PM2.png

Screen Shot 2016-09-26 at 5.17.53 PM.png

  • Middleware Fetches LiveStream Upcoming Events API and pushes the array of events to Tile Config
    • Can be set for other endpoints—was developed and tested on the Private Events endpoint
  • Tile Configuration window displays event to be selected to be displayed on the view window
  • Tile Configuration window has optional field to place the Simple Stream Integration's (SSI) listener URL
  • Middleware reads the saved configuration and if any event has their "isLive" parameter set to true AND a SSI listener URL was entered in the tile's configuration, it generates an activity with the SSI
  • Comments are pulled in from the activity that is related to the event being displayed in the tile and displayed
    • Comment text has link back to the comment itself in the external object
      • The user can see the all comments and continue collaboration and participate in the communication
    • If there is no activity generated, no comments are displayed

 


 

Simple Stream Integration w/ App (non-Middleware)

Screen Shot 2016-09-26 at 6.17.39 PM.png

Screen Shot 2016-09-26 at 6.17.17 PM.png

 

  • The middleware from the Custom View Tile generates activities for each event that goes live
  • The activity has an associated external object
    • The external object has an embedded app
    • External object video is larger and has full collaborative Jive experience (like, comment, share, mark for outcome)
  • App shows the live video that's associated with the video event that generated the activity

 


 

Extra

  • There is an extra file for getting an authentication token at your service's /tokens endpoint by performing a GET request—should you build something that needs to do more with LiveStream's API's

 


 

Considerations

  • This was written using mostly ES6 JavaScript, so it will only work on newer browsers
  • LiveStream currently doesn't offer webhook's so the custom middleware service is a necessity
  • Jive's Node.js SDK's jive.util.base64Encode() method does not work for API key/string only authentication
  • There are two archive files to install into Jive! This is because one service requires middleware and the other doesn't
  • I would have really liked to split up my services.js into three separate classes—LiveStream API's, Custom View Tile data pusher, SSI Activity Generator—if you have the free time or desire to make a pull request, I'll review and commit.

 


 

Initial Setup Requirements

Screen Shot 2016-09-26 at 9.58.50 PM.png

  1. Have a LiveStream account and some videos set to go live in the future
  2. In /jiveclientconfiguration.json, you'll see an object called "livestreamCredentials"—fill in all the fields
    • Look here Livestream Developers | API Dashboard for Client ID & API Key (dashed lines in the picture above)
    • Account ID can be retrieved via API or from your Livestream Video dashboard in the URL of your browser
  3. Update your middleware service URL in /tiles/LiveStreamTile/public/javascripts/configuration.js
  4. In terminal, run npm update
  5. In terminal, run node app.js to start your service and generate a new .zip for your Custom View Tile
  6. Install the zip for both the Tile and the Simple Stream Integration into your Jive Instance
  7. Install and setup the SSI into your page first and copy the URL
  8. Install the tile to your page and paste the URL and select your upcoming public event
  9. Use the LiveStream desktop app and go live in your event and see your video feed in the tile and activity get generated

So we just concluded the Jive Developer Days series' first remote/virtual event based on a European audience and here's what happened!

 

We had a lot of people register and fill out the seats from small to large companies and organizations (Jive Developer Days 2016: European Edition — Register Today!). There was so much demand that we actually went ahead and extended our original seat limit of 25 to fit the extra 5 on the waitlist. Where the past two other events were in person and that makes developing much easier and we could dedicate several hours to working together without losing interest or feeling TOO overwhelmed, we thought we should change it for the remote event to two days and half the time per day — I think that was still a good call. But overall, I think everyone learned a lot, I enjoyed some of the laughs, saw some great questions and engagement from the attendees.

 

tl;dr

  • Presented the Jive Developer Platform story
  • Made the example App Reference app using jive-sdk create app
  • Made a RSS News Feed Custom View Tile (see attachment)
  • Made a Simple Stream Integration with the App Reference App embedded (see attachment)

 

Screen Shot 2016-09-16 at 11.08.39 AM.png

 

First Day

We started the first day by introducing the high level Jive Developer Story—the Add-on Framework, Mobile solutions, External Storage Framework, and the Jive Analytics Platform. What we wanted out of this is to expose both new and seasoned Jive Developers to the full gamut of platform offerings. Since awareness is sometimes the biggest obstacle, we hoped to open the doors to all the possibilities for developers to fully realize the Jive as a organization's Hub story.

 

Following after the overview, Ryan Rutan used the Jive Node.JS SDK to create the Introducing the Jive Developer App Reference "App" on the Developer Sandbox example app, and get an understanding of app action contributions to filter where an app can go and also see the context (where, the person viewing, and content being viewed) that is available for use to enrich the experience of the community.

 

Second Day

Screen Shot 2016-09-16 at 1.37.47 PM.png

The second day took the foundations we laid down the first day and expanded on them. We started off by creating a Custom View Tile that makes a OSAPI HTTP Get request to the sample Yahoo Query Language RSS feed URL and displays the 10 most recent news articles in the tile with links to the source. We also showed how to speed up our integration development times with Ngrok.

 

Screen Shot 2016-09-16 at 1.34.33 PM.png

After that, we created a basic Simple Stream Integration from our Simple Stream Integration Builder and demonstrated a simulated Activity being generated within Jive in minutes of starting the developing. After that, we embedded the App from the session prior into the generated activity's external object and also passed in all the request data that created the Simple Stream Activity that can be used to make a richer collaborative experience. There were some hiccups that we uncovered and are going to patch our SDK shortly (this is part of why we're doing these events—make sure everything is solid).

 

What's Next?

More developer days virtual events coming soon! We are taking feedback from this pilot event and we're going to provide better ways for people to follow along and try the material out in better detail at a later time.

Introduction

 

Webhooks are a powerful Jive feature that allow you to subscribe to events that occur in the system. For example, you can subscribe to all user account creations, or all the new documents that are created in a particular Place. The subscription basically tells Jive to send a JSON object (of the content you want) to whatever endpoint you've specified.

 

The Jive documentation mentions creating some kind of add-on/extension and subscribing using a Tile, but it's actually possible use a tool like Postman to talk to the Webhook REST API to register a hook, or manage all the webhooks that are set up on your Jive instance.

 

Note; we run our community in a /community sub-folder.. so if you're following this guide, take that into account for any URLs you're copying.

 

oAuth2 Add-On

 

The first thing you need to do is install a pretty generic oAuth2 add-on. This was originally provided in this document, but I've altered meta.json to have a callback URL linked to Postman. I've attached the add-on to this document.

 

Note; uninstalling the add-on will remove any webhooks you set up against it.

 

 

oauth1.png

 

Setting Up Postman

 

Next, you need to follow these steps to set up Postman to use an OAuth 2.0 access token.

 

oauth2.png

 

oauth3.png

 

PHP Debugger

 

As you can see, in step (9) I'm telling the webhook to talk to a PHP page. This is a dead simple debug page I set up to see what the webhook payload looked like, and to test that the whole thing was working. It'll send the contents of any request to a log file.

 

Here's the code;

 

<?php
    $todays_date = date("Y-m-d G:i:s");
    $requestBody = array2string($_REQUEST);
    $entityBody = file_get_contents('php://input');
    
    $fp = fopen("webhooks.log", "at");
    fwrite($fp, "$todays_date -> $requestBody --> $entityBody\n\n");
    fclose($fp);

    function array2string($data){
        $log_a = "";
        foreach ($data as $key => $value) {
            if(is_array($value))    $log_a .= "[".$key."] => (". array2string($value). ") \n";
            else                    $log_a .= "[".$key."] => ".$value."\n";
        }
        return $log_a;
    }    
?>

 

 

Further Reading

 

Webhooks API documentation

https://developers.jivesoftware.com/api/v3/cloud/rest/WebhooksService.html

 

The post which set me on the right track to get Postman to talk to Jive

https://community.jivesoftware.com/message/1588488

 

Original oauth2 add-on.

https://community.jivesoftware.com/docs/DOC-97348

Hack_Tour_Bus_Europe.png

 

When we were first kicking around the idea of Developer Days, we got a tremendous response and inquiry from the folks across the pond. We actually had no idea that would be the case, so we were trying to figure out how to take this content over there, and before we did that, we wanted to make sure we had a quality that was worthy of your requests. After our NYC and Bay Area, CA, USA events, we think we've got it. Thanks to the digital age, we've come with a solution and format that Ryan Rutan and I believe will work great.

 

This two day, two hours per day event will be webcast via GoToMeeting and is geared towards our European counterparts where we'll be covering our Jive middleware-less stories and best practices in a lecture + hands-on hack session where we'll create integrations together that solve real business use cases, and answer your questions along the way.

 

How To Register

  1. Make sure your e-mail address in your profile is up-to-date and correct
  2. Please comment below with your firstName + " " + lastName + ", " + company

(ha ha, get it? )

 

If your organization's internal policies do not allow you to post on public forums, please feel free to message/e-mail me or Ryan Rutan and we'll take care of it.

  1. You must register yourself, and yourself only. You cannot register in someone's behalf. It not only keeps it fair for everyone, but also ensure we have a way to communicate and everyone has access to all the tools we'll be using (e.g. Jive Sandbox).
  2. Since we want to be able to reach as many organizations as possible and seating is limited, we are capping registration to 3 per organization and anyone beyond that will be placed on the waitlist. After registration closes, if there's space available, they'll be moved to be a registrant.

 

Event Details

  • 13th September, 2016 — 1p.m.-3p.m. GMT
  • 15th September, 2016 — 1p.m.-3p.m. GMT
  • via GoToMeeting — URL will be sent after registration closes.
  • Attendee limit of 25

Registration closes 9th September, 2016 @ 7p.m. GMT

 

Prerequisites

Everyone must have all the required software installed prior to joining the session. I will be posting up a document detailing everything with instructional video to make it as easy for everyone as possible & all registrants will get a reminder link.

 

What You'll Gain by Attending:

 

Registered

NameCompany/Organization
neha.uniyalAccenture
Shipra SinghAccenture
Sowjanya GonuguntlaAccenture
danilANROM
davidhickey13Citi
mikeculshawCiti
Powell TruslerCiti
Swaran SinghCiti
rymerchoElement14
Dudley NelsonElement14
Matt CollingeElement14
Georgiana Adelina PopaEuropean Commission
Gopi Shiva Krishna GEuropean Commission
AxxxxxGoldman Sachs
GxxxxxxGoldman Sachs
Jiban PatroInfosys
creischlMetafinanz
Oliver ReeceMillward Brown
Stephan LeuendorffPokeshot///SMZ
Sven KroschwaldPokeshot///SMZ
Gareth JamesPwC
Matt DickensPwC
NelsonRobert Anthony DassScope
Lars KreiszT-Systems Multimedia Solutions GmbH
Mirko SwillusT-Systems Multimedia Solutions GmbH
YOU!

 

Waitlist

You will be placed on the waitlist if we reach capacity of 25, or if more than 3 individuals are registered with your company. If there is space after registration closes, your status will change to registered and you'll be e-mailed event details. If you really really want to go and are on the waitlist, send me an e-mail and I'll see what we can do.

NameCompany/Organization
pierce.currid@citi.comCiti
Akhila ShivakumarInfosys
arpan bansalPwC
Madhusudhanan VaradarajanCognizant
Gareth FerrierSurevine

developer-icon-crop-png.png

When Aron Racho first had the idea for a Jive SDK using Node.js back in 2013, he did an exceptional job at building a solid platform for Jive developers to build add-on solutions.  It's been a while since the original Jive SDK (Node.js) has received any substantial love.  If you've used it anytime in the past 1.5 years, you've probably seen the growing list of deprecation warnings, even the SDK worked just fine.  So we thought it was time to change the perception of this awesome tool.  But this update wasn't just about a fresh coat of paint, we also wanted to apply some of the feedback we've gathered over the years to work to try and make things a better.

 

We hope you like the work we've put into improving the SDK, and hope it will help get many of your started on many of the Common Jive Add-On Use-Case Patterns we've identified for the Jive platform.

 

Thanks for being such awesome developers to work with, and happy coding!

If you have questions about the SDK, you can ask them below in the comments ... or here:

Questions about the Jive-SDK v0.2 Release

To install the SDK, check out this document
Getting Started > Installing the Jive Node SDK

or, if you already have npm installed

npm install -g jive-sdk

 

Updated Node v4.4.7 - 6.3.1 Support

In the previous version, we ran Node v0.10.32, which is a bit dated.  As part of this upgrade, we want to make sure that the SDK would work on modern Node.js production environments.  As such, we did some digging and re-worked some of the dependencies, and we are now functional (and tested) on Node v4.4.7, v6.0.0 and v6.3.1.  Support for versions in-between the is possible (and in some cases likely); however, we have not extended the testing beyond these two versions for the time being.  If you have feedback around supported environments or issues, please us know and we will do our best to address.

Note:  We are currently testing 6.3.x but have noticed a few issues ... stay tuned for updates.

Note:  The last version of the original Jive SDK v0.1.219 will only work on Node v0.10.32

 

Updated to Express x4.0

One of the biggest issues we faced in this upgrade were the massive changes between Express 3.x and 4.x.  Given that express is such a critical piece of the SDK, touching it meant affecting the entire SDK.  Thankfully, the differences weren't too crazy to map out and we are now running the latest version of Express and should be good to go!

 

Changed community.json ID ID Key

In previous versions of the Jive SDK, when a community registered with Jive, it stored the information in the db/community.json file (or equivalent persistence structure).  While we still do this, we have changed the key on the community entity from the jiveUrl to the tenantId to be more resilient.  We still offer the same methods to locate the community data, such as jive.community.findByJiveURL and jive.community.findByTenantID ...

 

However, if you are using either of the following snippets:

  • jive.community.findByID or jive.persistence.findById('community','xxxxx')
    Your results will be different see the table, below.

 

Old Result
New Result

"https://sandbox.jiveon.com" : {

   "jiveUrl" : "https://sandbox.jiveon.com",

   "tenantId" : "xxx-xxx-xxx-xxxx-xxx",

   ....

}

"xxx-xxx-xxx-xxxx-xxx" : {

   "jiveUrl" : "https://sandbox.jiveon.com",

   "tenantId" : "xxx-xxx-xxx-xxxx-xxx",

   ....

}

 

Simplified Jive App and Custom View Tile Boilerplates

For those of you that have seen the Introducing the Jive Developer App Reference "App" on the Developer Sandbox and have followed the tutorial Getting Started > Creating an App with the Jive Node SDK, you'll notice that the code it creates was a bit daunting.  While OpenSocial does a good job at abstracting integrations, it is a bit cumbersome to grok the first time out.  So we put some work into making a better re-usable abstraction JavaScript file to simplify developers access to the Apps and Custom Tile environments.  By no means are developers required to use these abstractions, but they are easy to get started and tweak as needed.

At a high-level, we've boiled down App and Custom View Tile development down to it's core.  The ability to know Who is the Viewer, Where is the View (and How is it being Viewed) and Any Data/Configuration which might be needed to render a solid embedded experience in Jive.  Now to get started, simply follow the pattern from the SDK and use the following JS methods ... and you should be good to go!

 

Apps (Simplified).js
Custom View Tiles (Simplified).js

var ACTION_IDS = [

  "example.app.content.document.action",

  "example.app.content.discussion.action

];

function onReady(env) { ... }

function onViewer(viewer) { ... }

function onView(context) { ... }

function onAction(context) { ... }

function onData(data) { ... }

 

See these files for the full source code:

function onReady(tileConfig,tileOptions,viewer,container) { ... }

function onConfig(tileConfig,tileOptions) { ... }

function onContainer(container) { ... }

function onViewer(viewer) { ... }

 

 

 

 

 

 

See these files for the full source code:

jive-sdk create app

Getting Started > Creating an App with the Jive Node SDK

jive-sdk create tile-app-external

Creating Custom View Tiles

 

Added Automatic Cache Busting Timestamps

This is pretty straight forward.  Whenever you do a build with the jive-sdk build add-on command, the SDK will timestamp every tile and the app.xml reference URL.  This should help developers working with instances that may cache harder than normal, and make it easier to iterate development between builds.

 

Old Tile Definition (Easily Cachable)
New Tile Definition (Cache Busted per Build)

{ ....

    "action": "http://localhost/test/action

    "id": "a289e089-c9eb-4fad-9842-89d1ac0d0356",

    "definitionDirName": "test",

    "config": "http://localhost/test/configure

    "unregister": "http://localhost/unregister",

    "register": "http://localhost/registration"

}

{ ....

    "action": "http://localhost/test/action?ts=1469731909988",

    "id": "a289e089-c9eb-4fad-9842-89d1ac0d0356",

    "definitionDirName": "test",

    "config": "http://localhost/test/configure?ts=1469731909988",

    "unregister": "http://localhost/unregister",

    "register": "http://localhost/registration"

}

 

 

Easier Explicit Service Route Definitions

If you've ever defined an explicit route using the SDK, such as here.  You'll notice that the exported object only supports a singular verb; however, now that object also supports an array of HTTP verbs to register multiple verbs to using a single reference.  The old way will still work as well.

 

Old
New

exports.myservice = {

   verb : "post",

   jiveLocked : true,

   path : '....',

   route: function (req,res) {

       ....

   }

}

exports.myservice = {

   verb : [ "post", "get", "put", "delete" ],

   jiveLocked : true,

   path : '....',

   route: function (req,res) {

       ....

   }

}

 

Added Default HTTP Method Override Support

The problem of having a platform only being able to use limited HTTP verbs (perhaps only GET/POST), but needing to invoke some of the newer ones (such as PATCH) is quite common.  As such, we've added in some standard support for known method-override headers coming from some of the following platforms.

 

  • X-HTTP-Method (Microsoft)
  • X-HTTP-Method-Override (Google)
  • X-Method-Override (IBM)

Note: If you'd like to submit additional method overrides headers to be included into the SDK, please contribute here.

I'm sure there are some more general improvements we've made, but this is a pretty good starting point.

KICKSTARTER FUNDED! We are set to have this event on July 13th at Plex Systems Northern California Offices!

Hack_Tour_Bus_bay_area.png

 

After having a great turn out at our first stop in NYC at Social Edge Consulting , we're ready to take some votes on our next stop — The Bay Area at Plex Systems' Northern California Office! We are limited in capacity to 22 attendees, so we're going to put a limit of 3 individuals per organization/company for now. This is a meetup/workshop that is geared more towards beginning development in Jive and to try out the newer add-on framework that's available in Jive 8 & Cloud—as such, priority may be given to individuals who fit this criteria. Please put your name and organization if you can commit to being at the event and joining us for the installfest.

 

BTW, if you haven't already checked out this blog that Social Edge put out of the last event, be sure to have a look for what to expect: NYC Hackathon Fun - Now with Pictures!

 

 

Event Details:

When: July 13th, 2016 — From 1pm, to 5pm

Where: Pleasanton, CA (Full address and entrance details will be given to attendees prior to event)

Cost: $0 thanks to Plex Systems

 

Installfest Details:

What: We go over all the items you need to have installed and make sure you have access to everything you need in order to get to the event and be able to work through your ideas without issues.

Mandatory: YES. Some exceptions may be made.

When: July 12th, 2016

Time: 12:30pm

 

How to Sign-Up:

This is mostly first come first served until we get a total of 22 people, 3 people maximum per organization (until June 30, 2016—if there are spots open, then we'll consider taking more from one single company). Please leave your name and company in the comment below. Each member must comment individually—you cannot add others on your behalf. Registration ends July 8, 2016 12pm PST!

 

Please leave your NAME and COMPANY in the comments below. You must include both.

 

Priority Seating:

Registration for the event is mostly first come, first served. But, since there is a very limited number of seats, we're going to impart some priority seating policies. However, know that we're being truly transparent about how we're doing this.

  • Those who have shown interest from the beginning or have been proactively trying to host/sponsor the event will automatically get priority of attendance.
  • Individuals new to Jive development will also get priority since this is specifically the audience we're gearing the event towards, doesn't mean existing developers can't go, just throwing this out there as a possible factor.
  • Developers. This event is welcome to business XXXXXXX individuals with some coding experience as well, but priority is given to Developers as it is a developer centric event.

 

If I haven't added you to the registration list yet, it's because I'm waiting for those priority individuals/organizations to respond with a yes/no first.

 

What You'll Gain by Attending:

 

Our Sponsor:

This event is made possible because of the time and dedication that Plex Systems and mack_torres has had to their Jive instance and the overall Jive Community. They are graciously providing the location, snacks, drinks, and the all important WiFi for this event.

 

Registered

AttendeeOrganization
mack_torresPlex Systems
ashleywolfYahoo!
honishYahoo!
anishapYahoo!
tzuniYahoo!
sumeet812guptaCisco
Reena DsouzaCisco
siguptaHitachi Data Systems
Shawn WilsonIntuit
Dishant MehtaTavant Technologies
mkongerSunrun Inc.
Keith ShawQualys, Inc.
susan.leeFireEye
nagendra1891JCS Consulting
You!

 

Waitlist

Attendee

Organization

 

 

Please leave your NAME and COMPANY in the comments below to sign up. You must include both. Registration will end July 8th, 2016.

Hello all,

 

At ThoughtWorks we have created the custom tile which is  created using jive's tile feature. We have developed the tile to show the key members with their roles and images which is called 'Featured Team Members'.

 

Features:

1. Add items by selecting members and their respective role.

Screen Shot 2016-06-14 at 3.39.48 PM.png

We have used autocomplete for selecting members.

Screen Shot 2016-06-14 at 4.02.20 PM.png

2. Once you save configuration of the tile with members and their roles, you can see view on the same page.

Screen Shot 2016-06-13 at 2.28.19 PM.png

 

3. You can rearrange the elements of the tile with drag and drop feature.

Screen Shot 2016-06-14 at 3.41.08 PM.png

 

4. You can delete the items using the trash icon.

 

Please find the code under :GitHub - ThoughtWorksInc/key-member-tile – licensed under AGPL.

 

References:

https://community.jivesoftware.com/docs/DOC-124346

https://community.jivesoftware.com/docs/DOC-113609

https://community.jivesoftware.com/docs/DOC-141800

A JavaScript library for building user interfaces | React

 

cc: Ryan Rutan Rashed Talukder Laura Gough

 

Thanks,

Manali