How to create a cross-platform smartphone application? - cross-platform

I am new to smartphone application Development, I have worked with .NET web and Windows Forms applications and only used the C# language.
I am planning to make a simple application which can run on all mobile OSes, like BlackBerry, Windows Mobile, Android phones, iPhone, etc. On searching I found that all have different OSes and uses different languages. I can use the C# language and .NET since I am aware about it. After some thinking, is it possible to make a web-based application using normal website coding but make it work like an application?
Please suggest some method to make a application which is possible to run on all smartphones. What technology or tools can be used for developing it?

The best approach to create truly cross platform app is to use HTML5 and JavaScript. All the other options will be painful. However, of course you can't access all the features with these web applications.
One interesting framework for creating HTML5/JavaScript based apps is PhoneGap (http://www.phonegap.com/). It has quite many API's available and wide support for different platforms. (Note that browser performance varies between devices so make sure not to add too much effects and glitter)
For native apps, there's no that many frameworks but one interesting is MoSync (http://www.mosync.com/)

There can be multiple approaches to create a Cross Smatphone plateform apllication.
If you want to code just once and want to to run on multiple enviroments without any change you must go for some javascript/HTML5 bassed solutions. One that I work with is NGCore. It is a development framework that allows games to be authored in JavaScript but with native application performance by leveraging ngmoco's ngCore libraries.
Other approach that will best suit your needs is to go for a Environment like MonoTouch. Its C# based and AFAIK you can use most of the .net API in MonoDevelope. It lets you reuse most of your code on another environment.

Related

unity platform for apps

I am considering making a small app for desktop pc's. I would mainly like to have support for mac and for ubuntu (linux) and I wouldn't mind support for windows as well. An easy way seems to develop an app using Unity, but it is more known to be an engine for games.
To my simple logic, there should be no reason why an app cannot be built with Unity. A platform that features the ability to create massive laser marine gunbattles should be capable of rending pretty buttons and a user interface. The plus side is that with unity you can port to all platforms that I would like this app to run on as well.
Am I making a bad assumption? Are there any people that have done such things? The app I would like to make might be open source, does the Unity platform limit me in any way here?
You are correct in your reasoning that it is possible to make a normal app with Unity, but this of course is not what Unity was intended for. It is geared towards rendering and updating scenes (including physics, game logic, etc.). If you do not need the notion of scenes in your app, then you will add additional complexity to your development and run-time overhead that you would not normally need.
Another drawback is that you will need to abide by Unity's licensing with your app which may or may not be an issue for you (https://store.unity3d.com - See links at the very bottom for other special licenses, such as for gambling).
Since you mentioned Unity specifically, it uses Mono for some of its run-time support across platforms. Perhaps you want to consider using just Mono and associated tools instead (http://www.mono-project.com).

SL5 best option for a Win8 & WP8 development shop forced to develop a Win7 app?

We are a Win8 & WP8 (new) development shop that must develop a one-of internal use only LOB app that runs on Win7 (preferably out of browser). Since most of our client-side app knowledge is with XAML/MVVM, I'm thinking our best option for that app is to do it in SL5.
So, how much of our XAML/MVVM knowledge can we leverage for SL5 development? Can we actually share some amount of code between SL5 & Win8 if we design with MVVM clearly in mind? What are the pitfalls?
Silverlight? No need.
The answer is simple and straightforward. Move as much logic and types into one or more portable class library projects. These can be used on WP8, Windows Store apps, and desktop apps, so there will be minimal effort using them in these types of applications.
For windows 7, go with WPF for your UI. You may find that the API is slightly awkward to deal with, as it lacks the asynchronous patterns that you have to use for WP8/WS applications, however developing the UI via xaml is exactly the same. I don't think you'll find much of a difference at all between the two.

Same UI in iOS and Android

This one is a quick question regarding the possibility of having the same LnF (same look) on Android and iOS, is there an API that can provide something like this? SImilar to MAUI in MoSync or IwUI in marmaladeSDK?
Basically what I would like to do is to create my UI once for both iOS and Android using monodeveloper.
Note: Before anyone downvotes anymore, please take into account that this is a real requirement for a real project. The question is not without reason, since after looking at the documentation, I can see that Xamarin does not provide such solution, but other multi-platform SDKs do provide such solution, and since the mono ecosystem is vast, perhaps there is a third party library that can provide such functionality.
Unfortunately most of your code portability will be on the backend (non UI) when leveraging Monotouch. There are far too many inconsistencies with how an Android UI vs iOS UI are implemented respectively to their OS's.
Have you checked out http://ifactr.com/overview ? It is a paid product so I haven't tried it, but it might be at least work looking into. Other than this, no there is no cross-platform UI if you go the Mono route.
Taken directly from their page:
"But we learned that even with as much code sharing that MonoCross provides, for applications with significant UI layers, the burden of creating platform-specific UIs can be overbearing. So we created the iFactr UI abstraction layer, which allows developers to code to an abstract UI interface, and then reference our iFactr concrete implementations of that interface for all the mobile platforms, both as native UI implementations and HTML5 UI implementations.
While not a silver bullet for all mobile development, it is designed and optimized for rapidly creating data-driven UIs that enterprise users tend to demand. And because it’s integrated with MonoCross, you can mix-and-match your iFactr UI screens that are shared across platforms with screens that you can code to target specific platforms using the entire set of native APIs available on each mobile OS."
The problem is Android and iOS have different UI / UX metaphors.
Take this for example: http://kintek.com.au/blog/portkit-ux-metaphor-equivalents-for-ios-6-and-android-4/
The differences are fairly significant. If you use a development wrapper then you'll have to 100% rely on their tools. We've had experience with Titanium in the past and it wasn't good at all.

Different frameworks, different costs [duplicate]

i am right now exploring the capabilities of Monotouch (by Xamarin) with other solution such as
Monocross?
So can any one explain when to use Monotouch and when to Monocross.
What is the advantage & disadvantage of these framework w.r.t native app development?
Just to try to add visually to Stephane's answer, here's a diagram slightly adapted from one of my presentations:
Note that you don't have to use a shared library like MonoCross, MvvmCross, etc. You can always write your own architecture. This is like in web apps - you don't have to use WebForms, ASP.Net Mvx, FubuMvc, etc - you can just use Request and Response and talk more directly with the web server.
So, you can just write your own code to adapt your app to each platform like:
Which approach you should take - depends on the requirements of you and your app... and on personal opinion too.
Monocross is a cross platform MVC framework. As a framework, it's open source. But you need either monotouch or mono for android in order to deploy on the devices.
Those 2 stuffs doesn't compare. They sum up.
With tools like Monocross or MvvmCross, you really get a crossplatform code sharing framework, and that's your advantage over coding in native languages.

Difference between Metro Apps written in HTML/CSS/JS vs XAML/C#

What is the difference between Metro apps written in web-development technologies and ones written in XAML/C#, etc.? Does Microsoft Metro API provide hooks for Javascript, where it's all native for C#? Should they work hand in hand, or is it the developers choice which route to go?
Is there certain functionality that cannot be implemented if using JS (other than OpenGL hardware capabilities)?
The reason I'm wondering is to know which technologies are necessary for building extensive Metro apps, so that when I get to a certain point I'm not stopped by a brick wall, letting me know that I used the wrong technology.
Microsoft has put in a lot of work to make Javascript a first-order language on par with C# for WinRT development. Both Javascript and C# have direct access to the WinRT API via language projections. That is, there is a unique binding specific to the language to the underlying API. So neither language is any more "native" than the other.
You should be able to write an equivalent Metro app in either language. At a high-level, it really does come down to which language/environment you are more comfortable with.
However, there are a couple of differences that should factor into the decision. First, WinRT components can only be written in C# or C++. Javascript can only consume thse components. If there is an intent to create reusable/shareable components, should keep this in mind.
Second, although the Windows Phone 8 SDK has not been released yet, there are indications that Windows Phone 8 apps can only be written in C#. If there is an intent to create similar apps for both the tablet as well as the phone, this is probably a serious consideration.
There haven't been a lot of performance-based studies comparing the two in a Metro app, so it's hard to say whether that will become a factor or not.
Then, there is also 3rd-party support to consider. C#/XAML is well established and has a lot of 3rd-party support. But similarly, Javascript has a lot of 3rd-party libraries available (e.g. jQuery) that for the most part can be brought in and used in a Metro app as well. I would give a slight edge to C#/XAML, but it seems like support is good for both.