Java cross platform mobile development - codenameone

Why would a JavaFXPorts/Gluon Mobile application be better than Codename One, JUniversal or Tabris. Google shows these three solutions which made me wonder, were these solutions not good enough? Especially when Codename One claims to be faster than native code. And why would one choose to start a new project and not for example collaborate with the existing solutions?

Codename One predated most of the others but took a rather different path. In fact Codename One's origins predate JavaFX as far as I know.
Codename One was started by mobile guys and as such the VM doesn't try to offer the full JDK. It's small nimble & AOT from the ground up. The whole toolchain was designed for mobile as explained in their VM project: https://github.com/codenameone/CodenameOne/tree/master/vm
Gluon is JavaFX based so it needs the full VM which back in the day relied on RoboVM. The guys from Codename One explained why they didn't go with that in the link above. Gluon now uses OpenJDK which is an interpreter and probably not the best approh for something that's already dog slow on iOS.
FX was designed by desktop people and Codename One was designed by mobile people, the difference in mindset is huge.
Tabris is a server solution and JUniversal is a Microsoft research project that came out much later. It's goals are unclear.
You missed J2ObjC whose goal is library portability and Avian which is an interesting VM. To my knowledge Codename One had a port for it in the past which underperformed.

Related

How to include using Smartwatches in an app written with Codename One?

My company recently came up with an idea to include using smartwatches with the app I wrote using codename one.
Is this possible? If yes, which libraries do I need?
We are evaluating the possibility of smartwatch support, this depends on customer demand.
We currently have a major enterprise prospect that has expressed interest in this but hasn't signed up. If your company is serious about this please contact us directly.
Assuming we don't go that route or you need something immediately this depends on your supported platform, you would need to use native interfaces for most functionality. In Android notifications (which we support) should work for Android wear. In iOS we are transitioning to the new xcode 7.x which should support smartwatches too but I'm not sure what would need doing.

smartGWT vs Mgwt (mgwt + smartgwt)

I finished 1 Project in Pure GWT and 1. in SmartGwt. However I want to support a Mobile version of both Projects now.
I found :
mgwt -> which has a medium Community, documentation is well made and under heavy development.
SmartGwt - Mobile -> which has a low Community, documentation is not that good, development idk..
Both have a Showcase site.
I personally liked the SmartGWT-Mobile Showcase better.
But the point that mgwt gives me better support is huge!
My questions is now :
1.Mgwt or SmartGwt mobile or together?
I think the answer depends on your strengths itself. I tried both of them when I started building cross platform app.
Smart GWT Mobile
+ve:
Easy to start working with
Large number of ready to use components.
-ve :
Support is an issue.
And if there is some thing the framework didn't support, it was hard to get it done.
The Smart GWT performed best when the server side also used Smart GWT. Even though Smart GWT mobile is free, I was not comfortable since they may tie it up to server similar to Smart GWT some time in future.
mgwt
+ve:
of course, open source.
good support on google forums. Normally the questions are answered on mgwt forums and occasionally Daniel Kurka also jumps. Daniel is creator of mgwt and he is also a member of GWT steering committee.
The themes in mgwt are good. The L & F just matched the ios or android platform.
I can extend it easily if some component is not available or if I didnt like any thing.
-ve:
limited number of components.
It takes time to set up and start using.
Slow updates.
Finally I went with mgwt since I have a team which can open up the code and fix it, if they see any issues.

Toolkit options to write a crossplatform mobile app in 2012?

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.

JavaFX2 and Oracle's plans about mobile operating systems

I'm writting diploma work about JavaFX 2.0, and I need some information about further growth of this technology. I thought it will be super-multi-platform, but after googling I little disappointed: there are a lot of problems with iOS and android, also in the roadmap of JavaFX there are information only about desktop OSs... So, can developers expect some progress of technology in mobile direction? Will JavaFX be desktop-oriented or wide-universal technology? Or, maybe, it will be some special branch "Mobile JavaFX2"? If JavaFX don't support mobile phones development, Oracle will haven't modern and competitive technology for this huge area of developing?... I really need some answers! Thanks!)
If you asked the same question three years ago i would say that javafx has a bright future. Same thing for Silverlight and Adobe Air or flex.
Today i would say just a single word... HTML5
Java will always try to find a seat on the client side... Adobe sucks because they abandoned their flex developers few months ago and who says that it will not happen again with Air?... Microsoft still tries to convince us that silverlight is a good tech while on the other side they promote ASP.NET with ajax capabilities as their main weapon.
See how fast the browsers are struggling to comply with HTML5 (future!!!) standards and you will agree with me that the above technologies were born obsolete.
there are a lot of problems with iOS and android
There are no problems but one - iOS and Android are not supported in the current (JavaFX 2.1) version.
can developers expect some progress of technology in mobile direction?
Not until it is in the public roadmap (which it is not today).
Answering your other questions would just be speculation on the part of anybody who does not know Oracle's private plans. If you are interested in speculation, you can find some here.
This is probably not a direct answer to your question, but i hope it might point you in an alternative direction
Adobe air is architectually very simalar to java. It also runs on a vm on multiple platforms such as windows, osx, and ... Android and IOS. And it's gui's are sexy ... Real eye candy. For mobile there are some considerations, but currently it is the best cross platform language for gui building in my opinion. Not for server side though. But it integrates like a dream with a java server by means of blazeDS or LCDS.
I know that apple has restrictions as set out by their terms and conditions that you are not allowed to run your app in a virtual machine. So adobe had to compile the entire air app as a native application that basically includes the entire air framework. My guess is that oracle is facing similar issues, and that is probably why it is taking some time to roll out
Having fxml with the power of the java language, definately something worth while waiting for and looking forward to it.
HTML 5 has no future.. this tool has lot of problems of it's own..HTML 5 can't be used to develop enterprise applications, it is very difficult to code,debug and maintain which is very important for any long term projects on other hand JAVAFX 2 is on the rite track of creating GUI with use of object oriented concepts which makes java developers to easily code,debug and maintain without any hustle..

RhoMobile framework worth looking at?

I have been looking framworks for developing mobile apps and i have been told to work on rhomobile framework but i did google and i found very limited resources and tutorial... my apps are bit complicated and at this point i am not even sure rhomobile framework is good choice....
do you guys think it will worth investing time in learning?
any suggestions?
Thank you,
It depends on your requirements. If your application is data centric then I highly recommend Rhomobile, and If your application has less data and more static page then better use Native frameworks.
You can quickly start with following resources http://rhomobile.com/resources/
If you have some knowledge in ruby it is not very difficult to start using rhodes, but it will always depend on your requirements and on how much time you want to invest to develop apps for different OS.
I have found Rhomobile very easy to follow. Of course it is limited as it is a relatively new framework, but you can get very good help on their Google Group.
I have developed on iOS and Android, and I must say I hated Objective C. Android with Java was more familiar and easier for me, but still, it is not compared to doing one app that works for all (even though you have to make dome minor tweaks for each OS).
One thing I did have problems developing in Rhomobile was working with maps. Rhomobile's Maps have different limitations depending on the OS of deployment.
Anyways, specially if you are working by yourself, I would recommend experimenting with Rhomobile. I believe you will get your job done faster that developing for each one (Objective C is a nightmare!)
One thing I love about Rhomobile Rhodes framework is their support for those old Symbian S40 phones, although they are not the mainstream phones today but still those platforms need to be supported in many enterprise apps

Resources