Toolkit options to write a crossplatform mobile app in 2012? - mobile

I'm currently investigating the alternatives for crossplatform development for Android and iPhone (Windows 8 could be a nice addition). The app is basically a "map with an asociated app", and certainly not a game.
Searching here I see many outdated advice and tools from 2010/2011, but since then Apple has changed their policies and surely new things have appeared.
My current list and light research (might have facts wrong) is:
Monotouch/Monodroid: .NET (Mono) framework. Create "native" apps on both platforms. Requires rebuilding UI code (or similar things).
Appcelerator: Javascript framework to compile native apps.
Corona: Similar to Appcelerator.
Phonegap: Similar idea, but looks like it uses a wrapper to appify HTML5 content
SenchaTouch: Another HTML5 based platform.
Wink: Yet another HTML5 toolkit.
XVLM: Android to ObjC compiler, probably creating ugly iOS apps.
Unity3D: For games only.
Moai: For games only.
So, there are three main ideas, with some frameworks implementing each, it seems to me:
Have an abstraction layer over native iOS/Android code and build for each platform using the provided layer. (Monotouch, Unity3D)
Use HTML5 (coding in Javascript) and some kind of wrapper to "appify" the web content. (PhoneGap,Sencha,Wink)
Code using a framework that will output as a compilation pass (or similar) a native app for each supported platform (Moai, XVLM,Appcelerator,Corona)
The questions:
Is there a fourth idea I haven't yet found?
Is there any blatant mistake in my research for any of the specified frameworks?
Is there any known problem for map integration with any of these ideas or specific frameworks?

Only a partial answer:
Ad 2. Appcelerator / Titanium is more than just HTML5. I read this pretty extensive comparison between PhoneGap and Titanium the other day on Hackers News. I found it very informative. The link points to the HN comments, the link to the actual article is at the top.

My main experience is with Mono for Android and MonoTouch, so I can't personally speak much to the other options. I personally find it to be the best option there is, as it allows you to share a large amount of your code across the platforms (even extending to non-mobile platforms if you stick with .NET), while still allowing for a 100% native UI, which is extremely important. If you're looking for resources on getting started, I have this video which discusses approaches and libraries for sharing a lot of code across platforms, and also this book which covers the same thing, but also expands to talk about how to do things like store data, use maps, access the network, etc.
I also want to mention MonoGame, which is absent from your list. MonoGame is an open source XNA implementation that sits on top of Mono to allow you to target iOS/Android/Max OS X.

From what I have experienced, if you want to have a native app go Mono, if you don't need native go PhoneGap. Native is best of the UI is very important, ie games or fairly graphical apps. But from business type app, CRUD, Phone gap works well.

Related

Is there a way to develop real NATIVE mobile cross platform apps without wrapping things? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I try to find a way to develop real native mobile apps, cross-platform. The amount of tools I found is huge, very huge.
All of the tools I have tried 'said' that the end result will be native, but in fact it isn't true. It is an executable with a webbrowser in it and some extra native layer/framwork to device specific features.
The reason I want a real native app is:
Speed and compact
Avoid browser issues
Market acceptance
Avoid easy/'script kiddie" reverse engineering
The products I have tried:
Appcelerator (does not work correctly on my system)
PhoneGap (does not create REAL native apps)
Embarcadero radPHP EX2 (uses PhoneGap)
Embarcadero radStudio EX2 (cannot create mobile/android apps?)
Adobe Flash Builder (Works very well but relies on Air, so apps are huge and no
native devices such as vibration (posible, but must write it
yourself)
Flash Develop (but same as Adobe Flash Builder)
..... and some others ;-) like moSync......
Currently I have downloaded "RhoStudio" but has some doubts about it because in the introduction video they talk about the things that I don't want.
Target directions are in the first place Android, iOS and maybe in the future Windows Phone.
Note: I don't have a Mac so I cannot compile it on a Mac.
Is what I want impossible or is there such product around that can do this?
EDIT:
See my answer, the answer is NO!
After 2 years asking this question I can say: NO, it is NOT possible, it's a myth.
All products I have tried use some kind of wrapping or use a second language as a layer to the call the native stuff. Although the libraries are native, the main program is not. The latest answer of Cosku with smartface.io is a good example, they claim it is native but it is NOT.
Why is it so difficult? The problem is the programming language (differences in language that makes it complex) that is required for a platform. It is too complex to translate a second language into the platform's main language and it's specific libraries, you can only achieve this by wrapping things with native binaries. Second obstacle is the needed compiler that must be able to run cross-platform.
But why rely on a second language or third-party development tool to build apps when the output is mostly the same is bad, the problem is perfectly illustrated in this image:
http://xkcd.com/927/
The image is about standards, but that's what happen, creating a new standard for a standard. For example, when using PhoneGap, you have to learn the basics of the PhoneGap API. You rely on a 'new standard' calling PhoneGap. The problem with this is that you completely rely on PhoneGap support and it existence. It can introduce a second weakness in the lifecycle of an app.
IMO, if you want to wrap things to make it cross-platform it is not a smart idea to rely on third-party products and libraries. Better is to write a wrapper yourself, like I did and skip the bloat. A real benefit of this all is that you wrote the wrapper code yourself and you understand underlying structures. Besides it is easier to extend or change and you can skip the things you don't need.
Today I create and design the UI of an app in the longest existing and stable 'language' HTML with a javascript interface. The app can also run in a browser too and does not break when there is a specific function missing, like vibrate for example. You can not get the same results with phonegap, try it! You can design the app with responsive techniques at ease like a normal website (try this in Android for example ;-)). Technically, it can run everywhere, on any platform in a browser or webview but don't use any special Mobile javascript libraries! You don't need these special libraries, really, use the 'normal' library versions instead.
I have wrote a compiler/obfuscator for it to 'pack' the UI-source into just one file that will be loaded by the native shell. This is to protect the source, so it is not easy to view or modify the source.
The only thing I have to do, to support the app platform is write a native wrapper for it. If a platform dies for some reason (for example Windows Mobile in the past), I only have to write a new wrapper for it. This is easier to do than write the whole program again from scratch. Besides, when there is a new platform it can also run in the platforms browser too.
If your app not rely on specific hardware (like a game) or can run without special hardware requirements, this is the way to go to extend the life-cycle of your app. Use HTML5 and javascript to design the GUI and use a native shell to use specific OS features.
Is it slow? I have to say no. At least don't use any bulky and bloated special designed mobile javascript library stuff and don't use the click event on touchscreen devices, use touchstart instead. Also the HTML engines will/are improved these days and there is better support for HTML5 features that enables you to write powerful HTML5 webapps without the need to implement this in a native language.
IMO, this the way to go (for me) and my journey to find the best way develop mobile apps cross-platform and to extend the life-cycle. Hopefully, it can help you too to decide what is the best to do.
For cross-platform native iOS, Android, Mac, and Windows apps, check out Xamarin. Code in C#, compile to native. For iOS, you can leverage the XCode tools for app layout, and Xamarin Studio integrates very cleanly with it.
And for the sake of completeness, PhoneGap has a worthy (yes, WebView based) competitor in TRIGGER.IO. While it's approach is similar to PhoneGap/Cordova, it improves the API for accessing native functionality, simplifies push notifications, and performs much faster cloud builds.
I am not associated with either of these products in any way... I just like them both.
Have you tried www.codenameone.com? It's open source, java based, only need eclipse or netbeans to develop.
Firstly
Appcelerator (does not work correctly on my system)
Is there a certain issue your facing ? are getting java errors or something, might not have been setup correctly.
Short answer is no, you have to have some level of abstraction in order to achieve this, java and objective-c are completely different languages, as well as Android and IOS SDK's having different methods, procedures, styles, design's etc. There is no way to have something work on both without there being a middle layer to convert or render.
Appcelerator will be the closet thing to what your looking for as its not a webview wrapper like the others, true it does interpret javascript, but because its not wrapped in a webview you avoid the browser issues.
Speed and compact comes more down how you code the app more than what its coded on, true Titanium apps will be bigger in size because of the library but that doesn't make it bad as such, the benefits of getting 2 apps far out weighs the extra few megabytes I would think.
I'm pretty sure all of these tools have market acceptance as they wouldn't be successful without it, again for the likes of apples requirements its down to the way you design it, not the tool in the background.
If you want to use IOS you will need a mac, if you want to publish in the app store alone you need xcode and the built project to use the application loader, I'm not aware of any tool (even the webview wrappers) that don't require you to have the IOS SDK as it can't run in the simulator, package the app or run any of the code without it.
If you want to make apps you have 2 choices, learn each platform or use one of these tools, if there was some magic tool that did everything I guarantee it would be the most popular thing on the planet and you would have heard about it / found it.
This is one reason why "the cloud" is so popular. Instead of writing your app several times over, you write all of the functionality on a server. The actual "apps" are then simply your user interface to the functionality, which can be really simple depending on your needs. If it is that simple, then you could write the apps separately for each platform, but they would all use the same "cloud" backend.
If I am not mistaken, this is representative of what most apps by companies who have a cloud architecture do, and is also why many require a data connection.
I don't think that it is possible to write once and run everywhere without some kind of wrapper or layer, this is due to the fact that each platform has separate APIs and even programming languages. You would be hard pressed to write one set of source code that runs natively on both Apple and Android devices, for example. This is not to say that it isn't technically possible, desktop operating systems have had such cross-compiling portability for years with C/C++, and Java only made that much easier. Of course, the engineers of Mobile operating systems don't seem to share a vision of interoperable APIs.
To conclude, I would recommend A) writing the app twice (awful I know, but it will provide the reliablity of native execution on both devices, and can be done with minimal pain) or B) breaking down and using one of the "script-kiddie" frameworks. These actually may not be that bad if your app is simple enough, and it may not be that reverse-engineerable at all. If anyone has any suggestions as to the best "near-native" cross platform framework, that would be useful.
Well, there are several things to consider, if you want native look and feel there are frameworks like Sencha(www.sencha.com) and Kendo UI(http://www.kendoui.com/) that simulate it on JavaScript side. I found them both good looking on Android and iPhone but no support for Windows Phone yet.
If you are looking for real native widgets combined with HTML you can look into MoSync's Native UI(http://www.mosync.com/documentation/manualpages/jsnativeui-library), which support windows phone Metro UI too, or Titanium(http://docs.appcelerator.com/titanium/2.1/index.html).
Anyway one other thing is that you can use packagers like Phonegap or MoSync or AppMobi(which I think uses something similar to PhoneGap build) to wrap your app and put it on App markets. from these list PhoneGap especially is not designed to provide you with any specific UI functionality although I have seen some attempts to add tab bar plugins to Phonegap.

Moving from web to native applications

Got a problem, and I am pretty sure there is a solution for this.
Currently we have a Website that sells goods & integrates with a thirty party for shopping cart. The shopping cart integration is through standard web re-direct.
Product works well on desktop browser. Its not that bad on browsers on tablets. Not so great on phone browsers. The problem on mobile device is for obvious reasons, as the pages are optimized.
The standard approach we can do is go about optimizing for mobile browsers, and be happy. My team is flying with optimizing for mobile web, because they think apps will be very difficult to do.
If we choose to go the native app model, is developing a library or package for each platform the only way? I am thinking, no in current world with so much technology advancement. I am not a fan of browser view on device, not the smooth experience.
Are there other options available? I was looking at HTML5 hybrid applications, but can't put a finger to be sure that will work for what I am looking for.
Frameworks aside, often times you can use a stylesheet meant for mobile devices and hide everything that is not absolutely vital. You could also consider WML, but I think you could live without it IMAO.
Writing apps for the iOS will require an investment in Apple developer tools and training in Objective-C. Android will call for Java and Eclipse, to name a few things.
When it comes to "native apps", you will need to code for whatever platform you are depending on. The number of platforms you work with is entirely up to you, but yes, each new platform may require a different implementation.
Personally, I would add some specialized markup/styles to make as many browsers as possible happy. If you want to expand, try to see where your target audience really lies and reach out to them on any medium you can afford to build on. I would zone in on specialized applications if there are benefits really worth chasing down that road.
Hybrid applications is a good option, but probably the devil in a box.
The hybrid approach with HTML5 fits your developer, because they will still use HTML, CSS and JS (e.g. with PhoneGap), but on the other hand you will get an medium satisfying UI (what you said you are not a fan of).
Pure native applications is probably a bit too much of all good, if your web app runs fine in a browser.
A way could be to go with compiled hybrid and cross-platform compatible solutions like xamarin or appcelerator, especially appcelerator uses JS, which is an advantage for you. This could result in a native UI (implemented in JS) and shared business logic code. So there are two benefits for you; first, just use JS, second, shared business logic code -> less work.
Other alternative would be to go with responsive or adaptive websites, realized with the help of CSS.
If you are looking for developing a hybrid app (phonegap + angularJS + backend), I would like to recommend Monaca. I've just recently discover it. It is very cool since it has phonegap inside its framework and its own backend. Moreover, it also has a fast and lightweight UI framework called OnsenUI which is based on Topcoat and AngularJS.
Even it is a hybrid app but it will give users the native application feel since it also provides native components to use in your hybrid apps. What is impressive about it, you don't even need to build and install your app to your device every time during development. That's what I love the most about this.
I hope it helps since I think it is just like what you are asking for. I'm just a novice developer and I find it is very easy to use.

Mobile application development frameworks : The Good, bad and ugly?

Over the last couple of years( or maybe less ) a number of different mobile application development frameworks have come up that promise you the ability to create cross platform( in some cases ) mobile applications without native device SDK programming. Some of these are OpenPlug, Redfoundry, Appcelerator, PhoneGAP, RhoMobile , Ansca-Corona
This list is steadily becoming bigger so it’s a bit of a challenge to know which are the good ones from the not so good and bad ones out there. Anyone in this group has any good/bad/ugly experience with any of these these ? If you've used any of these , are these really good enough to build real world applications ?
I'm just getting into rhomobile (Rhodes 3) and finding it very very good, mainly because I'm a Ruby/RoR developer and I am not having to face learning yet another development language and I'm finding this to be a thoroughly enjoyable experience although a little confusing to start with.
I'm tending to shy away from rhohub and develop on my local machine which I find a lot simpler to do for many reasons.
I previously had a play with buzztouch but it didn't produce a native looking app, however it works very well if you don't want to do anything too complex (functionality is quite limited)
I guess the best advice I can give you is to try out the different platforms starting with the platform that covers the language you prefer and see how you get on
We have used Phonegap to develop many cross platform applications. PhoneGap, also known as Apache Cordova, is a technology that lets programmers build a mobile application and then wrap it in the PhoneGap framework that can be installed as a native mobile application across multiple mobile device platforms easily.
Our experience with this has been very good in relation to the kind of data driven apps we have built.
If you are web programmer proficient in HTML5, CSS and JavaScript then PhoneGap brings you new opportunities! You can build native mobile apps using the web technologies that you know and love: HTML, CSS, and JavaScript. Applications that are developed using PhoneGap are hybrid applications. Parts of the application – mainly the UI, the application logic, and communication with a server, is based on HTML/JavaScript. The other part of the application that communicates and controls the device (phone or tablet) is based on the native language for that platform. PhoneGap provides a bridge from the JavaScript world to the native world of the platform, which allows the JavaScript API to access and control the device (phone or tablet).

While porting a windows application to web, is it better to stick to conventional web technologies or adoping RIA is wise?

The web based application I am working on currently is a port from a windows application. This application is very data intensive. There are scores of modules and each of these modules have number of forms (data entry screens) and reports whereas the forms have many many fields and likewise the reports.
I have been trying to identify the most suitable architecture for the presentation tier. There are many functions that are not very easily portable, for example printing (this too is very complex). For most of the others, I am planning to us "Ext JS" library which looks like capable of handling about 70% of complexity out of the box while for the remaining I would be custom coding or extending Ext JS.
Having said that (sorry for being so descriptive), I wonder, if this is an Intranet application, why not port the entire application to SilverLight? While I am good at .Net, I'm somewhat alien to SilverLight. Considering I know my target audience and that the software will be used per seat license, would it be better to ride on SilverLight or is it better to stick to conventional web (XHTML, JS, CSS, etc)? Further, I have to support multiple devices in future and considering that SilverLight plug-ins for many devices are yet not out, would it be a risk?
IMO, if you are developing a web application, then yes, develop it as an RIA.
The choice of technology is up to you. I prefer jQuery and have never used ExtJS. But I've taken a look at it, and if your aplication is a port of a windows application and has a lot of conventional UI elements like forms, input boxes, toolbars, menus, button etc, then go for ExtJS.
As for some controls that are not available in ExtJS, you can easily extend ExtJS.
Regarding .NET: ExtJS is completely server-technology agnostic, so you can develop your application in .NET and still use an ExtJS UI. In fact, I would prefer to do such an implementation.
Regarding Silverlight: I am slightly against using silverlight, primarily because it requires a plugin to be installed that is not available on all platforms. But since your application is an intranet application, your user base will be in your control. But you should make sure that any future decision regarding the workstation platform will not affect your application's working.
Cheers
Whether to use Silverlight over HTML/JS etc. in this case would depend on 2 key factors.
What are you familar with already
What type and range of devices you need to reach.
If you are already comfortable with HTML + ExtJS then that has to be huge pro in its favor.
The range of devices that Silverlight is possibly going to be available (Windows Phone 7 for example as well as Moonlight, I've even heard that there may be port for Andriod and Symbian) is growing. However its really early days for that and not all may materialise in a form useful to you.
Having said that it should be acknowledged that a UI designed for use on desktop does not work well on a small device. Hence you would need to develop some task specific UI for other devices regardless of the technology you use. This in turn means that there is no reason for you to try to stick with single technology for all devices.
I think you should look very carefully into WCF, REST and OData first. Good layering of the application into useful models using these would more easily enable the use of a variety of front-end technologies for the client.
If you are into .NET and other Microsoft tech then you should seriously consider using JQuery and ASP.NET MVC as another potential front end technology.
I think that you need to ponder the inconveniences of a solution based solely in Silverlight. Like Flash it needs a plugin to be installed in every station, so it loses some of the premises of web applications (run everywhere with the only requirement of a browser). Besides although Silverlight has taken great advances, it is not yet a widely supported standard, and it is in control of a company who later may decide for you in very important matters regarding the platform you use, and made it outdated or useless (in the worst case).
Ext JS is a great library developed entirely in Javascript, so you can touch anything that suits your needs. If the Windows applications you are basing on is well-layered, then your work may not be that hard.
If you are an asp.net developer you could take a look on asp.net mvc, a great set of tools that implements MVC pattern to web applications using the same old C# or VB. Besides the developers behind asp.net mvc, have taken a lot of work to make it suitable to work with javascript libraries like jQuery
Happy coding!!!

Which platform is used in companies now-a-days to implement mobile applications?

Basically i would like to know which platform is currently used to develop mobile applications i.e. J2ME etc etc...
Also any new ideas on mobile applications would be quite helpful.
Generally, the approach is to go for a website, if possible, and adapt it to each phone using a 'device detection layer'. We use DeviceAtlas.
If you want to write native applications for each phone, then you need to do it in each of the native languages (and there are a lot).
Symbian/Java: Greatest 'penetration'
iPhone/iPod Touch: Latest trend, objective-c for this.
Android: I think this is a variant of Java, and will be a very marginal component of the market for a long time, though maybe high among a certain type of techies.
Basically, you are going to need to profile your market, and determine the best approach. But as I said, in general, you'd prefer a website, and mostly, a website is all you need.
There is a framework called Rhodes by Rhomobile that allows development of native applications for all major smartphones. See my answer to a similar question earlier this year.
We are primarily targeting the iPhone, but don't always make an iPhone-specific application. The web browser on the iPhone is good enough that a lot of our web apps just run there ok. So many of the apps we're writing continue to be done using the same platforms we've always used. We're a big institution so this runs the gamut from J2EE and .NET to Php and Ruby.
Mobile-only apps are developed in XCode (or web versions in DashCode).
If you need to cover multiple mobile (esp. smartphone) platforms, Javascript (with HTML and CSS) may be the only way to go, despite all its limitations. You get under the radar of Apple's iPhone app vetting, it's the only way to target Pre, you can also cover Blackberry, Android, Windows Mobile, AND Nokia on a single codebase... unless the limitations are just TOO stifling for your specific purposes, it sure seems like the way to go!

Resources