Showing posts with label cross platform. Show all posts
Showing posts with label cross platform. Show all posts

Tuesday, May 12, 2015

Bridges connect the world - iOS and Android on Windows 10. What?

Bridge to Astoria, OR. Nov 2014
Photo from our road trip to Portland
At the //build 2015 conference Microsoft announced their development stories for Windows 10. This also includes bridges to reuse existing iOS, Android and other investments for Windows 10.
The keynote showed how an existing iOS game was ported to Windows 10 without much effort. The shown one-stop porting solutions for Android and iOS raised the concern why anyone should bother to develop natively for Windows 10 anymore and created quite some confusion and uncertainty in the Windows developer community. A few developers at //build were really worried about those announcements as some of their business is mainly porting iOS and Android apps to Windows Phone.

I think at the moment there's just too less knowledge to make decisions based on the announcements and assumptions floating around. There were two sessions at //build about Project Astoria for Android and Project Islandwood for iOS. Keep in mind both projects are in a alpha/beta stage and aren't publicly released at the moment so there's no public hands-on experience and independent in-depth analysis available yet. It's also worth noting that Project Astoria allows one to build Windows apps for phones but not for all Universal Windows Platforms at the moment. More information is expected during Summer 2015 and you could also try to sign up for an early access program for Astoria and Islandwood. There's also a good post by my friend Alan from AdDuplex. Peter Bright published a good Ars Technica article as well.

In my opinion there's one particular really good use case:
Share existing business logic across platforms and build the UI natively for the platform.
This way a common cross-platform app core is reused and the UI is built natively on top of that layer to provide the best UX. Porting an app completely might work for games with a custom UI and some simple apps, but advanced apps usually leverage too much platform-specific features for a one-stop port to work at all and a great app adapts to the UX of the platform.
Sharing core business logic is actually a common use case I see with our larger clients who want to bring their existing apps to Windows or Windows Phone. In the projects I've been involved over the last few years, the shared portion was usually implemented in C/C++ as it is still one of the best cross-platform options since most platforms support C/C++ in some way. Right now it is still quite an effort to get the custom C/C++ libs from other platforms adapted for Windows Phone compilation/linking, even with elevated API access rights. The cross-platform C++ Clang support in Visual Studio 2015 allows us to just recompile the Android or iOS C/C++ code and could help us a lot for such scenarios.
After writing this blog post I came across this excellent post by the Visual C++ team which describes just that. And this post which provides more details about the Visual Studio 2015 cross-platform C++ features.

As I see it, Xamarin will be the best choice for green field cross-platform projects to share as much code as possible and still provide the best UX. The new Visual Studio 2015 tooling for Windows 10 could help to make the reuse of existing iOS and Android business logic easier for Windows 10 when there's not a desire for a green field.

On the last day of //build I had a nice breakfast and roundtable with an executive of the Windows Dev Platform and of course we talked about the //build announcements. There was actually the same vision about the easier reuse of business logic. I think we made it clear that quite some confusion was created in the dev community around Islandwood, Astoria but we were told Microsoft will release more information to make the vision for those porting tools clearer.

In the end I think there's no need to be worried. Porting tools have never been a one-stop solution so I'm confident Islandwood and Astoria won't be the holy grail either. As usual a keynote also contains a good portion of marketing and software development is never that easy, so always consume such announcements with a grain of salt and wait for final decisions until the expected is delivered for real-world scenarios.
If those tools help us to make the porting of existing iOS and Android apps easier and the Store provides the apps which users are looking for, it's good for all Windows developers in the end.
It's just a matter of adapting to leverage the new tooling and helping clients to create great apps.

Don't Worry, Be Happy!

Thursday, November 13, 2014

Cross Platform Mobile Development with C++ and Visual Studio 2015

Screenshot from Herb's video
Beside the Xamarin partnership and their great solutions for C# cross platform development, Microsoft is also heavily investing in C++ cross platform development with Visual Studio 2015.
With VS 2015 it's possible to build shared cross platform C++ libraries or even full native Android apps only with VS 2015. VS 2015 even ships its own Android emulator. iOS compiler support is supposed to be added as well.

Don't get me wrong, Xamarin and C# are without a doubt great for sharing code in native greenfield apps. However, existing code bases are often already built in C++. In fact I was involved in at least two large apps over the last 1.5 year which used already existing shared C++ layers. Most of the backend connectivity and core data logic was implemented in C++ and shared between WP, iOS, Android and BB10. Many large projects follow this shared C++ layers approach including the MS Office and Dropbox mobile apps.
Of course Xamarin C# and shared cross platform C++ libraries can be combined to get the best of all. For example by leveraging an existing code base for the shared C++ core libraries and Xamarin for the UI layer.

Is it the renaissance of C++? I'm not sure. It was always here driving many projects, even on the smallest devices and never gone, but I’m sure the new shared C++ library project support in VS 2015 is a strong commitment to the future of Visual C++.

Here's a good overview of the new C++ cross platform features in VS 2015:
Cross-Platform Mobile Development with Visual C++

And some very nice short videos from the Connect() event. Highly recommended to watch:
Herb's Ch9 video "C++:Conformance And Cross-Platform Mobile Development"
Ch9 video: "Visual C++ for Cross-Platform Mobile Development using Visual Studio 2015"

There's much more to discover in VS 2015 for C++ developers:
Visual Studio 2015 Preview is Now Available