Cross-Platform Apps - To Xamarin or not to Xamarin?

thettk

New member
May 9, 2012
12
0
0
Visit site
Am thinking of porting my apps to iOS and Android platforms, yeah I know right, you never hear of people porting in that direction. It is for that reason that I am a little stuck in terms of figuring out which approach to take. Should I invest time into learning native development for iOS using Swift for example or should I work with Xamarin instead?

My question is not to ignite a war about abandoning Windows Phone because that is not what is happening. I am a business first and foremost and it only makes business sense to have as many people as possible access your service. My commitment to WP is stronger than ever especially when I think of the opportunities Universal apps present for all of us.

So, thoughts on cross platform approaches?
 
Last edited:

drachen23

New member
Nov 5, 2011
86
0
0
Visit site
I'm a .Net web dev who dabbles in WP development and I've been having just this sort of debate with myself about the direction of Microsoft's mobile APIs and technologies. First and foremost, I'm invested in Web tech. MS is quickly and steadily improving their ASP .Net tools and tech, so I'm not worried there. It's just that they have a long history of veering off in different directions and letting their old tech wilt while they hype the Next Big Thing and subsequently drop it.

Back in the olden days of Win32/WinForms development MS released WPF as its new way to develop Windows apps. It was big, impressive and innovative. The corporate world adopted it, but how many world-busting WPF apps are there? I can only think of Visual Studio itself. Then there was Silverlight, the cut-down version of WPF for the Web. It was adopted a bit in the corporate world, but another dud for non-corporate devs. As Silverlight's star was dimming, MS decided that Silverlight would be the basis for their new Windows Phone product. So far, all based on .Net or a version of it. By Silverlight 5's release, it was clear at the dev conferences that the interest in both WPF and Silverlight were close to zero within MS.

Then Windows 8 happened. A brand new WPF-like API that was not based on .Net whatsoever was released called WinRT (along with a confusing product confusingly named Windows RT; good job, MS). All aboard the new development train! Of course you can only make full-screen Windows 8-only apps with this new API. Furthermore, everything above is relegated to the "legacy" trashbin for desktop development. The strategy started to get a little clearer with the release of Windows Phone 8.1, the announcement that WinRT apps could be run on the Xbox One and a preview of the new Start menu and windowable WinRT apps in what would become Windows 10. Build 2014 actually felt kind of exciting to a MS app dev.

Now with the recent VS announcement of support for Cordova and Xamarin (don't get me wrong, I like this and I like bringing .Net to Mac and Linux) and the real sense of disinterest I'm getting from MS in Windows Phone and even Windows itself as a development target, I'm beginning to wonder if I should just move on now. MS itself has been concentrating on other platforms and their newest apps have been obviously designed with other mobile OS brands in mind (see the hamburger menus popping up in apps like OneDrive and Health). Is this an indication that teams within MS are using Xamarin internally and not their own native toolkit?

So where to from here? I'm doing app development for fun (the Web is my day job), so I don't have much invested in it. I can afford to keep plugging away at WinRT until MS figures out a direction and/or deprecates WinRT in favor of something else. For you, it seems that Xamarin is the best option. It keeps your options open in case MS decides that WP should go the way of Windows Mobile, Zune, Kin, ASMX, Win32, WCF, WPF, Silverlight, HttpWebRequest, WebClient, and Linq to SQL.
 

thettk

New member
May 9, 2012
12
0
0
Visit site
Thanks for the great insights and thoughts. I wonder though if it is worth investing the time in Xamarin as it looks like I will still need to learn some iOS API's anyway. Also not sure if it plays nice with Swift or just Objective C.
 

1101x10

New member
May 27, 2012
181
0
0
Visit site
I've been having the same thoughts - both on the future of WP and whether to get my app on iOS/Android. One approach I'm thinking of is to switch from C# to C++ (although it looks like a steep learning curve) as this is the most cross platform language without the reliance and expense of middleware frameworks like Xamarin. There's still the problem of how you create the UI on each platform - use it's own API's or roll your own with OpenGL ( supported on iOS/Android but not WP).
 

drachen23

New member
Nov 5, 2011
86
0
0
Visit site
I've been having the same thoughts - both on the future of WP and whether to get my app on iOS/Android. One approach I'm thinking of is to switch from C# to C++ (although it looks like a steep learning curve) as this is the most cross platform language without the reliance and expense of middleware frameworks like Xamarin. There's still the problem of how you create the UI on each platform - use it's own API's or roll your own with OpenGL ( supported on iOS/Android but not WP).

Sounds like you're trying to reinvent the wheel. You're still going to need a lot of platform-specific code due to the different way the three platforms handle things like app lifecycle, navigation and OS services. (Also, I don't think C++ is natively supported on iOS. Objective-C is based on C, not C++.) If you want to roll your own UI with a 3D framework you could stick with C# and use Unity. If you go that route, you're stuck re-implementing UI elements like pages, buttons, checkboxes, menus and scrolling lists that the OS gives you for free - in addition to not looking anything like the native OS. If you want to do mobile cross-platform on a single codebase, you'd have to do a lot of work to replicate what you get from Xamarin or even Cordova.
 

1101x10

New member
May 27, 2012
181
0
0
Visit site
Sounds like you're trying to reinvent the wheel. You're still going to need a lot of platform-specific code due to the different way the three platforms handle things like app lifecycle, navigation and OS services. (Also, I don't think C++ is natively supported on iOS. Objective-C is based on C, not C++.) If you want to roll your own UI with a 3D framework you could stick with C# and use Unity. If you go that route, you're stuck re-implementing UI elements like pages, buttons, checkboxes, menus and scrolling lists that the OS gives you for free - in addition to not looking anything like the native OS. If you want to do mobile cross-platform on a single codebase, you'd have to do a lot of work to replicate what you get from Xamarin or even Cordova.

Yes, I understand each platform will require specific code. Objective-C can be mixed with C++ and Android has the NDK. I believe the way it is done is have a base level of code that handles the app lifecycle etc and the main logic is within C++. The UI could also be done in the native code too instead of using OpenGL.
With Xamarin if you want a truly cross platform app you would have to convert the existing UI to Xamarin.Forms.
 

Members online

No members online now.

Forum statistics

Threads
326,614
Messages
2,248,637
Members
428,524
Latest member
Stepsjames