C# BlackBerry Push SDK – Code Seperation

Code Organisation
In keeping with the modular nature of the original SDK, I have broken apart the source-code into separate assemblies.

Contains common classes.

Contains low-level PAP core and configuration classes.

Contains high-level push core, subscription, application management, request tracking and statistics.

Contains all acknowledgement handling extensions.

Build Infrastructure
The code base has been updated so that SDK assemblies now share common version information via a custom (TFS Build friendly) target file – there be some cool tech in there that you may find useful in you own projects and solutions.

I have also started work on the deployment technology, enabling easy installation of the SDK for developers.

The installer project makes use of WiX and is dependent on WiX 3.6 Release Candidate (available at Windows Installer for XML

At the time of writing the project is bound to the latest build (v3.6.3025.0). In due course a merge-module project will be added to support your own deployment scenarios.

Finally I will be looking into a clean method for adding code-signing into the project files without having to go through the pain of actually having the signing file in source control (I’ll get endless requests for the signing password) – I suspect this will be best achieved with a tweak to my custom build target.

I’ll try and put together a new build and release to CodePlex over the coming week – real busy though so please be patient!


C# BlackBerry Push Service SDK – Live

You can now download the sources for the BlackBerry Push Service SDK from the CodePlex web site from this link.

You should refer to the RIM Java documentation as this is a fairly close port however a sample web-site and test library is in-progress…

I am also looking for helpers for maintaining this project and adding source-level documentation 🙂


C# BlackBerry Push Service SDK – Part V


To be honest porting an API from one language to another can be pretty dull however once the grunt work is finished you can sometimes tweak the code to take advantage of specific language and/or platform features.

Since the shape of the existing API is synchronous I knew early on that changing the communications stack from blocking to non-blocking would be high on the ToDo list – to be fair if .NET did not have the async/await keywords I wouldn’t have bothered as writing async code without this feature is difficult and error-prone.

With this in mind I started with the lowest layer code that handled the request/reply over HTTP with the PPG inside IPapService – fairly simple since the comms classes already have Task-based wrappers.

After that follow the logic (and the build errors) into IPushService. The public API featured simple changes however under the covers the changes were more widespread…

ISubscriptionService is teeming with multi-threaded parallelised code so not only were there API changes but there was also an opportunity for refactoring a lot of the job partitioning logic into something much more concise and therefore easier to understand.

All this work meant that it was easy to update the acknowledgement HTTP handlers so that they are now implementing IHttpAsyncHandler which is good news!

So where are we? Well the CodePlex project has been created and the source will be checked in over the next few days – initially for Visual Studio 2010 but with VS2012 .NET 4.5RC version to follow.