Published Aug 5 2013
With three clicks of the mouse, a drag‘n’drop and a single text entry, you could have a solution that exposes a service to mobile applications using IBM Integration Bus (IIB) and IBM Worklight.
The Worklight patterns in IIB provide a few options for building integration solutions for mobile, depending on your starting point. In general, you will be starting with 2 things – some data or functions that you need to access and some interface or code to access it.
In the case where you have C# code that can accesses some .NET based functionality, you can use the “Worklight to Microsoft .NET” pattern. You don’t need to understand the C# or even have a .NET development environment. If you have the binary – known as a .NET assembly - that was built from the C# code, you are good to go. The pattern creates the IIB resources to host the C# code and the Worklight resources to expose the service to mobile applications. It even creates an application that you can deploy to a mobile device to test the service.
Here, we see some screenshots of the application that is generated by the pattern. Let’s take a look at how to create that application. Starting with a .NET assembly that contains 3 functions – GetBalance, TransferMoney and FindMissingAccount, I followed these steps:
1. Drag’n’drop the assembly from your desktop or windows explorer onto the Microsoft .NET request- response pattern in the patterns explorer.
2. Type a name for the solution and hit enter.
3. Click Generate.
Done! Now, I have everything I need.
- The IIB application – I deploy this and the .NET assembly to an Integration Server.
- The Worklight adapter – I deploy this to the Worklight server.
- Mobile application – I install this on my mobile device or test in the device simulator included in Worklight studio.
If you don’t happen to have any .NET code to access your services, then there are 3 more patterns for more generic requirements. I may take a closer look at those other patterns in future blogs. In the meantime, if you want to explore the Worklight .NET pattern in more detail, take a look at this video
or, better still, try it out for yourself.