When we started the open source LoopBack project two years ago, we knew that its use would be fueled by the needs of mobile solutions. We were a very small team and only able to develop for iOS, Android, and AngularJS. Although we were keenly interested in the meteoric rise of Xamarin as a cross-platform solution, we just didn’t have the resources to do anything about it.

But then we got lucky. Really, really lucky.

Introducing PerfectedTech

I’d like to introduce PerfectedTech, StrongLoop’s premier mobile consultancy partner.

PerfectedTech is a boutique software development agency with an R&D office in Jerusalem. They are a highly successful firm due to their technical excellence, great sense of style, and solid delivery of mobile and web app solutions. Unlike many development agencies, PerfectedTech has chosen to focus only on a few powerful technologies: Xamarin on the front end and Node.js / LoopBack on the backend. From their in-house built tools, including the Xamarin SDK, they have managed to cut traditional development time by 33% to 50% for all full stack projects, dramatically challenging industry norms. Their vision is the same as StrongLoop: to create solutions that make development effortless, yet powerful.

They are well-versed in many technology solutions. As a result, they quickly saw the potential of combining Xamarin and LoopBack, and invested their own time and resources to develop the Xamarin SDK for LoopBack. Applying real-life use cases, understanding constraints, and applying best practices, they engineered a battle-proven SDK that they leverage in all their mobile projects. We’re grateful that they have agreed to contribute it back to the LoopBack and Node communities as an open source module under the MIT-license like the rest of our SDKs. Moving forward, they’ll continue to add value to the SDK and guide community contributions. The SDK will help bring two wonderful technologies, Xamarin and Loopback, closer together.

LoopBack Xamarin SDK

The Xamarin SDK is similar to the AngularJS SDK: You start with a LoopBack backend application with models and APIs. Then you run the SDK CLI tool against the LoopBack project to generate a dynamically-built library in either C# or DLL form with strong type objects. Auto-generated strong type objects are enough to make any developer smile. You can then include them in your Xamarin project and/or solution to get seamless access to your models and remote logic as native Xamarin objects. As you evolve your backend, you can dynamically and continuously run the SDK to update the library as needed while significantly reducing the time required for integration.

For more information, see the LoopBack Xamarin SDK documentation. Check out this code snippet from dynamically-generated XamarinSDKGenerator.dll for the Todo Example app generated from LoopBack models using the lb-xm tool.

public class TodoTasks : CRUDInterface < TodoTask > { /* * Find a related item by id for TodoTask. */ public static async Task < TodoTask > findByIdForuser ( string id , string fk ) { string APIPath = " users/:id/TodoTask/:fk " ; IDictionary < string , string > queryStrings = new Dictionary < string , string > (); string bodyJSON = "" ; APIPath = APIPath . Replace ( " :id " , ( string ) id ); APIPath = APIPath . Replace ( " :fk " , ( string ) fk ); var response = await Gateway . PerformRequest < TodoTask > ( APIPath , bodyJSON , " GET " , queryStrings ). ConfigureAwait ( false ); return response ; } ...

TodoApp Example Xamarin App

The Xamarin SDK has a slick example app, TodoApp, to help you learn the SDK and showcase its power. You can run the Todo App against the LoopBack backend set up already or run the LoopBack backend yourself.

What’s next?