I had a deeper look into Events planned, but I felt it would be easier to put together information on the latest release of the samples, UCWA March 2014 Samples. It has been a bit since the last update to the samples (May/June 2013), but we have not seen new features added in any recent cumulative updates, but that does not mean that there is no room for improvement in the available samples.
As per the CHANGELOG.TXT the changes since last release are as follows:
- Add Call Via Work sample [works in sandbox only] (site)
- Add Anonymous Meeting Join sample (site)
- Add timer query parameters and method to update values (Events.js)
- Add method to parse header string into JSON-like object (GeneralHelper.js)
- Change Cache to provide interface for implementations and updates to support deferred access (Cache.js)
- Add in-memory storage and localStorage implementations of new Cache interface (MemoryStorage.js/LocalStorage.js)
- Remove isDefined(...) usage (All)
- Add method for default value fallback (GeneralHelper.js)
- Updating frameInjection to wait for injection prior to executing callback (Transport.js)
And now for comments regarding these changes:
- This has been features of UCWA at the start of release, but finally have samples demonstrating their function. There has been information on Anonymous Meeting Join (via a previous posting) and Call-Via-Work has always existed as part of the Interactive Demo.
- See comment above.
- Event query parameters should allow fine-tuned control over how the event channel handles events with differing priorities, prioritizing requests, and a general purpose timeout. I have not spent any time seeing how this functionality works, but I plan on covering parts of this for the deeper look into Events.
- Parsing the response header string was a bit of a mess or it felt like it anyways and having a method to turn that string into a JSON object definitely makes it easier to find the specific header values. It even handles the WWW-Authenticate header!
- The new interface of the Cache should resemble the Facade pattern and it will allow developers to create their own mechanisms to store UCWA application data. The interface exposes iCRUD (where i is Init()) and returns promise objects via jQuery, $.deferred(), to allow deferred object processing.
- These two implementations provide the real basics of how in-memory and localStorage work with the new interface. It would not be too hard to create additional implementations like IndexedDB.
- GeneralHelper's isDefined(...) function had some uses, but it was not generally needed.
- I have run into a few issues where I think the callback function I wrote is flawless to find out that it had an error and caused the next code segments to never run.
- Frame injection logic in general is weird and improvements to how it functions are welcome. In this case after the new frame is injected into the DOM the supplied callback should be executed.
Overall it looks like a solid set of changes to the existing helper libraries and in the following sections. Let us briefly look at the two new samples and some other features.
For Call-Via-Work to function properly the Lync Server you are running against needs a PSTN gateway as the request to startPhoneAudio will need to establish a call between a Lync User and a supplied phone number. The sample is setup to call sip:CallViaWorkBot@gotuc.net which happens be on the same domain as the users provide by the Lync Web Developer Portal. Using the provided credentials from the portal allows for easy testing of this feature.
Anonymous Meeting Join
Anonymous Meeting Join was added to this samples release as a new authentication method (preexisting are My own topology and The developer sandbox) that requires an Online Meeting Uri and Display Name. The best way to get an Online Meeting Uri is to use to Schedule a Meeting and copy the onlineMeetingUri output which is now displayed after the meeting is created. The sample code is very similar to Instant Messaging as both are interacting with the Messaging modality with the differences being a conversation versus a conference.
Now for some of the more minor changes seen across the samples as a whole by sifting through folder diffs:
- Any code using the old cache has been updated to use the new version.
- Fixes to some of the usage logic files.
- Fixes were made to incoming/outgoing conversation samples.
- Scheduling a meeting was changed to provide accessLevel and output onlineMeetingUri.
- Events no longer makes a request if the _embedded property is not present.
- Index.js alerts if it has a problem loading jQuery.
- Transport alerts the reason why it failed for cross-domain issues and attempts to not make the second request if going from internal to external discovery.
- Transport maintains a list of outstanding methods attached to windows's (on)message function and attempts to cleanup better to avoid dangling event handlers.
- There is a License Terms file.
It will be interesting to see this sample set continue to grow as new functionality is added to Lync Server 2013 and what areas UCWA will move into next. If you haven't tried UCWA or the new samples consider taking a look today!