By Frode Brandt, Senior Software Engineer at Ceetron AS
On February 24 2016, Microsoft announced the acquisition of Xamarin, a development environment for mobile devices using C# with native user interfaces and shared code across multiple platforms, including Apple iOS, Android, and Windows Apps. Then on March 31 2016, and at its Build Conference in San Francisco, Microsoft announced that the Xamarin SDK will be open source and made the tool a free component of Visual Studio. I guess it is fair to say that both initiatives were well received by the developer community, but also by major organizations with strong commitments to the Microsoft technology platform.
There is a rich strategic backdrop here, which has been extensively discussed within both the developer community and the broader software space. However, having recently implemented a proof of concept (PoC) for accessing Ceetron 3D Components, our industry-leading 3D visualization framework for the CAE community, from Xamarin, I thought it could be interesting to share with you some thoughts regarding the use of Xamarin in the CAE community, especially on mobile devices.
So what did we learn from this PoC?
Lesson learned #1: Xamarin appears to be a viable option also for computationally intensive CAE applications, whether the actual solver is located somewhere in the cloud or running locally on the mobile device (the latter being relevant only for smaller models). Indeed, we managed to port our 3D Components library for 3D visualization written in C++ to Xamarin (by using SWIG) and run it with satisfactory performance for fairly visualization-intensive CAE applications. No mean feat.
Lesson learned #2: Xamarin is or may become up to the task for serious CAE application development, though with some issues. Specifically, when I started using it, I thought the documentation was overall good, but there were parts that were not finished or just lacking; there was some functionality that worked satisfactory on some operating systems, less so on other; and there were core features missing required for serious application development. From the outside it looked neat and clean, but inside it needs more work and polish. That said, it seems that Xamarin is evolving in a positive direction and updates are released frequently. It will be interesting to observe what effect the acquisition by Microsoft will have on these issues, and where Xamarin as a technology platform will be heading.
Lesson learned #3: This is probably well-known stuff for most readers of this blog post, but the PoC did confirm that SWIG represents a viable way of porting C++ libraries to other languages with only minor loss of performance. Indeed, we have created or are considering ports based on SWIG of 3D Components to a number of other programming languages, including Xamarin, C#/.NET for Microsoft Windows, Java and Python. In fact, Ceetron will within weeks release 3D Components with Python support.
Lesson learned #4: 3D Components relies on OpenGL/OpenGL ES, which unfortunately is not supported by Windows Phone. We are fortunately not the only ones who would like to use OpenGL on such devices, and a few possible solutions to the problem have emerged. The most promising one is perhaps ANGLE, an open source graphics engine abstraction layer developed by Google. Hopefully there will be a backend for Direct3D 12 out soon. On a general note, we are paying close attention to where the industry is going regarding new graphics rendering APIs, like the Vulkan API released by the Khronos Group not long ago, and Metal by Apple.
In preparation for this blog post, we discussed also the PoC with our main contact point at DNV GL, Kjell Tangen, Senior Software Architect at DNV GL Software. Here is what he said: “DNV GL is currently looking into extending the engineering workflows supported by our Nauticus and Sesam products to mobile devices and eventually to new types of devices, such as AR devices like HoloLens. Initially, we will primarily target pad-type form factors on Android, iOS and Windows. We have over the years accumulated a large code base developed on .Net, and Xamarin appears to be viable platform for deploying this software across platforms on mobile devices as well as on traditional Windows desktop. The PoC confirmed the feasibility of this approach, also performance-wise, though there still remains an issue with large 3D Components binaries on iOS. We are hoping to see Ceetron build a strong, relevant and credible roadmap regarding Xamarin.”
A blog post like this is not where we in Ceetron would make formal commitments to the market, but with Kjell Tangen’s comments in mind, I have had extensive discussions with my colleagues in Ceetron. It now looks that the Xamarin community may possibly expect 3D Components for Xamarin sometime in 2016, but official release depending on public interest. Absolutely all caveats apply. Feel free to contact me personally if you would like to discuss such product in detail. I can be reached at [email protected]