Adding support for new platforms (Xamarin and Windows Phone 8.1)
We are pleased to announce that we have been working very hard to support several new platforms in Catel:
- Windows Phone 8.1 (Silverlight)
- Windows Phone 8.1 (Windows Runtime)
As most libraries choose to support all platforms via PCL (Portable Class Libraries), Catel uses a different approach by implement a platform-specific assembly for each platform. Though this might sound crazy, this brings several advantages to Catel which are not available in other platforms.
Introducing “true PCL”
Portable Class Libraries (PCL) is a technique where developers can develop a single assembly that can be used by multiple platforms. The reason the team decided not to use PCL is that it brings in too many limitations. We wanted to provide the developer all the possibilities of the platform they are developing in, not the “least platform supported”.
As you can see in the diagram below, each platform has its own set of functionality (orange). When using PCL, the functionality will be downgraded to the “least” platform (thus lots of features will be lost). Catel works the other way around by adding features of other platforms. For example, checking for dependency property changed is available on all platforms and works exactly the same for all platforms.
A great example of the advantages are the services that are provided by Catel. All the platforms that support some sort of GPS functionality have the ILocationService (which is an interface that is platform independent). Each platform (Windows Phone, WinRT, Xamarin, etc) have their own implementation but the developer can use them in exactly the same manner without losing functionality. This means that instead of losing functionality, Catel adds functionality by not using PCL but platform dependent assemblies instead.
Support for Xamarin
Thanks to the kind help of Xamarin, we have been able to develop a version of Catel that is compatible with both Xamarin.Android and Xamarin.iOS. This brings the full power of Catel to Xamarin with the following advantages:
- Argument checking
- Data types and models
- IoC container and TypeFactory
- Reflection (yes, fast reflection which works the same for all platforms)
- Weak references and dynamic events
and much more!
Support for Windows Phone 8.1
Microsoft has introduced Windows Phone 8.1 and the “built for both”-concept where developers can use the Windows Runtime to develop apps for both Windows RT and Windows Phone 8.1 RT. The Catel team has added support for both Windows Phone 8.1 (Silverlight) and Windows Phone 8.1 (Runtime). This means that you can choose what development techniques you would like to use but still have the power of Catel to support your app development.
When will it be available?
We are working very hard to polish the latest implementations but are very happy with the results so far. Currently all the new platform supports are in prerelease and will be available in the upcoming 4.0 release of Catel. If you can’t wait for the official release, make sure to grab the prerelease packages via NuGet. The packages are stable and this is your chance to get your latest feature requests into the 4.0 release while we make the latest changes!