From setting up your development environment to shipping a great new app for your IBM Connections Cloud instance, this session shows you how to achieve all that and more. We define and review a baseline project with basic scaffold code, including a structured layout, events, modules, package conventions, functional skeletons for streams, embedded experiences, apps interactions, native UI/UX dialogs, buttons, and more. We review best practice tips and "gotcha" areas, and provide detailed examples.
Full code samples available at:
https://github.com/dvdsmpsn/ibm-connect-2016-examples/
3. Who are we?
David Simpson
Senior Developer and Architect at AppFusions
@dvdsmpsn
Patrick Li
Co-Founder / CTO and Architect at AppFusions
@patrickli
4. Who are we?
AppFusions solves mixed-technology integration problems, bringing
engineering and business workflows together, so you can
work better, faster, smoother.
Lately, we have been developing a scalable
framework to develop, enable and deploy dozens
of integrations for IBM Connections Cloud
and on-premise.
… and many more…
IBM Connections
7. Inside-out integrations
Enhances the stickiness of the external app
• Adding the IBM Connections header into your external app
• Community Cards & Business Cards (on-premise only)
• Using IBM Connections Cloud for authentication
• Using any published IBM Connections REST API to pull
content from IBM Connections into your app
8. Inside-out integrations - example
1507: Building Applications Using the IBM Connections Cloud Developer Experience
9. Outside-in integrations
Enhances the stickiness of IBM Connections
• Adding external links into to the IBM Connections Cloud header
• Activity Streams
• Cloud Embedded Experiences
• Community Apps
• Profiles
16. Steps to build smart looking activity events
Reference
http://tiny.cc/activity-streams-api
17. Several REST endpoints available
Public Updates
/connections/opensocial/basic/rest/activitystreams/@public/@all/@all
/connections/opensocial/oauth/rest/activitystreams/@public/@all/@all
Personal Updates
/connections/opensocial/basic/rest/activitystreams/@me/@all/@all
/connections/opensocial/oauth/rest/activitystreams/@me/@all/@all
Community Updates
/connections/opensocial/basic/rest
/activitystreams/urn:lsid:lconn.ibm.com:communities.community:COMMUNITY_UUID_HERE/@all/@all
/connections/opensocial/oauth/rest
/activitystreams/urn:lsid:lconn.ibm.com:communities.community:COMMUNITY_UUID_HERE/@all/@all
Reference
http://tiny.cc/activity-streams-api
18. A little setup
• Using curl on the command line
• Using some variables to hide user credentials, community_uuid
27. Embedded Experience
• Based on opensocial technology
• Produces an iframe which points to your server
• iframe uses HTML5 sandbox attribute for security
sandbox="allow-scripts allow-popups allow-forms allow-same-origin”
• Cross-origin communication made possible with
window.postMessage
Reference:
https://developer.mozilla.org/en/docs/Web/HTML/Element/iframe#attr-sandbox
https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
28. Embedded Experience - Registration
• Customers must register each cloud embedded experience
• Registration is in the admin UI
• As a user with the AppDeveloper role
40. Community Apps
• A single reusable embedded app* hosted on the IBM
Connections Cloud server
• Produces an iframe which points to your server
• iframe uses HTML5 sandbox attribute for security
sandbox="allow-scripts allow-popups allow-forms allow-same-origin”
• Cross-origin communication made possible with
window.postMessage
* Embedded Apps – the term iWidget is retired from the lexicon!
41. Community Apps - Registration
• Via REST API
• As a user with the AppDeveloper role
• Using curl:
Documentation:
http://tiny.cc/create-community-app
45. Persisting user data in your app
• OAuth 2 against IBM Connections Cloud
/manage/oauth2/authorize
/manage/oauth2/token
• Collect user info
/connections/opensocial/oauth/rest/people/@me
• Store user data in your app
47. Adding the IBM Connections header into your
external app
48. • Add an empty div only when you want to display the IBM Connections
header in your external app:
• Isolate OneUI styles from the rest of your page
Adding the IBM Connections header into your
external app
49. • Test for the presence of this div and only then inject the IBM
Connections banner CSS & JS
• apps.na.collabserv.com - North America
• apps.ce.collabserv.com - Central Europe
• apps.ap.collabserv.com - Asia Pacific
Example:
https://cdn.rawgit.com/dvdsmpsn/ibm-connect-2016-examples/master/connections-header/example/index.html
Adding the IBM Connections header into your
external app
57. Person Component extension
${user_id}
The ID of the current user from
where the this button was clicked
(i.e. the ID of the user whose
Profile this was clicked from).
Use a 1 pixel x 1 pixel transparent
gif/png for the icon
60. File Menu extension
${file_id}
The ID of the file.
${user_id}
The ID of the current user.
${subscriber_id}
The ID of the current user.
${org_id}
The ID of the organization of the
current user.
${customer_id}
The ID of the organization of the
current user.
61. File Menu extension
• Specifies which mime type to use
• Leave blank for all file types
• Otherwise, a separate extension definition per mime type
67. Coming soon – Q1/Q2 2016
• General availability of integration apps for IBM Connections
Cloud & on-premise
• Dozens of flavors:
… and many more…
IBM Connections
OneDrive/Office 365, Google Drive,
IBM Jazz, Box, Dropbox, Asana,
Salesforce, GitHub, Zendesk, Trello,
JIRA, Confluence, Twitter, New Relic,
IBM Maximo, WordPress, Chatter,
Sharepoint, Alfresco and many more
68. Talk to us…
David Simpson
david@appfusions.com
@dvdsmpsn
Patrick Li
patrick@appfusions.com
@patrickli
69. We are grateful and thankful for the support
of the IBM Connections Cloud product and
engineering teams.
Thank you
70.
71. Acknowledgements and Disclaimers
Availability. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM
operates.
The workshops, sessions and materials have been prepared by IBM or the session speakers and reflect their own views. They are provided for informational
purposes only, and are neither intended to, nor shall have the effect of being, legal or other guidance or advice to any participant. While efforts were made to
verify the completeness and accuracy of the information contained in this presentation, it is provided AS-IS without warranty of any kind, express or implied. IBM
shall not be responsible for any damages arising out of the use of, or otherwise related to, this presentation or any other materials. Nothing contained in this
presentation is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms
and conditions of the applicable license agreement governing the use of IBM software.
All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved.
Actual environmental costs and performance characteristics may vary by customer. Nothing contained in these materials is intended to, nor shall have the effect
of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.
We can post using Basic Auth or OAuth
Public updates – for the Discover stream
Personal updates – for your followers
Community updates – for community members
For my examples I’m using curl on the command line rather than any browser based REST client
This means that if you have the code, you can copy and paste it in your terminal window and it should easily produce an event in IBM Connections
No `event.title`, so the title defaults to use the actor’s displayName, the verb and the `event.object.displayName`
Verb examples: `post`, `shares`, `update`
`event.title` is provided, so this is used for the title
Always use templated titles whenever you can.
With templated titles, you get i18n for free.
Now added an icon, tooltip and link
* HTML support is limited.
* All attributes are stripped.
* Use tables for layout! Yes.
`context` is stringified version of the `source.resourceContext` lower down
`personData` - info on the person & the organization they belong to
`source` - details of where this is displayed in IBM Connections
`useData` - concise alternativeof `personData`
`context` is stringified version of the `source.resourceContext` lower down
`personData` - info on the person & the organization they belong to
`source` - details of where this is displayed in IBM Connections
`useData` - concise alternativeof `personData`
`context` is stringified version of the `source.resourceContext` lower down
`personData` - info on the person & the organization they belong to
`source` - details of where this is displayed in IBM Connections
`useData` - concise alternativeof `personData`
`context` is stringified version of the `source.resourceContext` lower down
`personData` - info on the person & the organization they belong to
`source` - details of where this is displayed in IBM Connections
`useData` - concise alternativeof `personData`
`context` is stringified version of the `source.resourceContext` lower down
`personData` - info on the person & the organization they belong to
`source` - details of where this is displayed in IBM Connections – including the opensocial info from the posted event
`useData` - concise alternativeof `personData`
`context` is stringified version of the `source.resourceContext` lower down
`personData` - info on the person & the organization they belong to
`source` - details of where this is displayed in IBM Connections – including the opensocial info from the posted event
`useData` - concise alternativeof `personData`
Cloud embedded experiences will work on desktop and mobile, so embed responsively, so that they display correctly on both
Deviate from the documentation here…
Don't ever add the Lotus/OneUI classes to your body tag
…unless you use OneUI yourself
Add an empty div as the first body element only when you want to display the IBM Connections header in your external app:
…
This one act isolates the OneUI styles from the rest of your page, removing untold pain.
Adds external links into to the IBM Connections header
- Added in Admin | Organization Extensions
- Use a 1 pixel x 1 pixel transparent gif/png for the icon
- This makes the design consistent with the rest of the dropdown menu
- This is just a dumb link – no templating of parameters
- Contact Record Extension
- Adds a new menu item in the contact record before the “More” dropdown
Added in Admin | Organization Extensions
Supports URL Templating
With the contact_id of the displayed contact record
Use a 1px transparent image to keep the UI consistent
In Profile pages
- Adds new button / menu item next to the Download vCard menu
Added in Admin | Organization Extensions
Use a 1px transparent image to keep the UI consistent
Supports templating of the user_id in the URL
Click on the new menu item and you can see the URL templating in action
Here, we’re just echoing out the user_id, but I’ve also added the header integration in the external web page for fun
Add an item to the files dropdown/context menu next to any file listing
Use a 1 pixel x 1 pixel transparent gif/png for the icon
- Added in Admin | Organization Extensions
- Use a 1 pixel x 1 pixel transparent gif/png for the icon
- This makes the design consistent with the rest of the dropdown menu
- This is just a dumb link – no templating of parameters