For a couple of months now e-office and the guys of the UC development team (Rogier Giessen and Marc Wetters) are working on very nice things to integrate with MOSS/OCS. As you probably know e-office is a working easier company and constantly looking for special MOSS/OCS projects. Especially projects where we can integrate both products. Constantly looking for innovation. Unified Communications is really the future for upcoming software. So be prepared for the 21st century.
Today, we would like to tell you something about integrate OCS in webpages using JavaScript connecting to the webservice. Special thanks to our UC-guy Rogier Giessen working on this project for the last couple of weeks. By using the Unified Communications weblog in the Netherlands we are trying to inspirate other users or customers who like to integrate MOSS and OCS. Launching our new functionalities into the community means you can also give your feedback. It's very welcome.
Scenario (case):
The integration of OCS and Sharepoint is available through the ‘rich client’. In some corporate environments or on public computers installation of the ‘rich client’ is not possible or desirable.
Public extranet websites can also be enhanced with OCS functionality. Problem can be that variation and configuration of browsers, plugins and/or firewalls can cause many problems.
Solution:
Create a lightweight set of functions in JavaScript, that communicates through the OCS webservice and generates and manages controls.
According to requirements and/or design, functions can easily be added with the use of just one small JavaScript file. (According to functionality additional images or a small HTML file need to be added)
Example application:
Integration with Sharepoint without the use of the rich client and working without using additional protocols or ports.
Desired functionality:
- Single sign-on: without additional programs or dialogs the ocs-functionality integrates in the sharepoint-site
- The user can see and change his state using a dropdown-list
- The user can see the availability of other users.
The biggest technical problems we encountered
- How do I log in and maintain logged in
- How do I manage all sessions and incoming requests
- What is the best way to interact with the host page and user
- How can the interaction be manageable and, at the same time fast and independent on the type of browser/platform.
The solution for these problems:
1. the “Unified Communications AJAX SDK” helpfile is a big help in getting the requests XML-syntax right. At the moment we have the single sign-on part in development. For now we have to enter our password again to be able to generate all the other functions.
2. Using a minimal set of variables helper-functions and variables the incoming events are passed to al the needed objects. Between pages cookies are being used.
3. We have created a handful of objects based on the desired functionality. If you want to add OCS- functionality to a page, you have to initiate the functions mentioned in the items above. The desired element you want can be added with a small line of code. At the end of the article there is a sample.
4. First we had to look at the required functionality. In the process of development the re-arrangement of objects were numerous.
The way to integrate is using id’s of an element. This is independent of whether it is a hyperlink or entire section of a page. Besides the JavaScript-file with our logic file and two simple .html files (one for firing the desired functions and one for the layout of the chatwindow). And off course images for the colored bullets in front of the names and the image in the chatwindow. The size of this is 26kByte for the JavaScript, HTML and CSS and an additional 20kByte for the images)
Example:
The following html code was added to a “content editor webpart” in sharepoint.
Which results in the following page:
The possibilities seem endless with the overload of information you can send and receive from the service. The integration with a portal or content management system can be seamless. The danger is the application can get bloated.
The beautiful thing about Unified Communications is: you can use it in parallel with other clients and they work together. Just open a dedicated program like the rich- or webclient from Microsoft, or perhaps you prefer your smart phone. The OCS-Webclient is another step closer to integrating UC in an intuitive way.
Tags van Technorati:
Office Communications Server 2007,
Javascript,
webservice,
rich client,
integration,
MOSS,
Office SharePoint Server 2007,
Windows SharePoint Services,
Unified Communications AJAX SDK,
helpfile,
helper-functions,
XML-syntax,
content editor webpart,
Rogier Giessen,
Marc Wetters,
Joachim Farla,
Unified Communications weblog,
Netherlands