Linked by Thom Holwerda on Thu 13th Sep 2012 21:44 UTC
General Development "We are proud to announce the open source release of J2ObjC, a Google-authored translator that converts Java source code into Objective-C source for iPhone/iPad applications. J2ObjC enables Java code to be part of an iOS application's build, as no editing of the generated files is necessary. The goal is to write an application's non-UI code (such as data access, or application logic) in Java, which can then be shared by Android apps, web apps (using GWT), and iOS." Huh.
Order by: Score:
HTML5 on a phone?
by p13. on Thu 13th Sep 2012 22:08 UTC
p13.
Member since:
2005-07-10

Commented on wrong article ;)

Edited 2012-09-13 22:11 UTC

Reply Score: 1

seriously?
by Nelson on Thu 13th Sep 2012 22:47 UTC
Nelson
Member since:
2005-11-29

Just use Mono with MonoTouch and MonoDroid

Reply Score: 2

RE: seriously?
by satsujinka on Thu 13th Sep 2012 23:19 UTC in reply to "seriously?"
satsujinka Member since:
2010-03-11

That sounds far too much like spreading a disease to me. Also you should stop kissing robots, they don't need your mono :p

Reply Score: 0

RE: seriously?
by darknexus on Fri 14th Sep 2012 02:58 UTC in reply to "seriously?"
darknexus Member since:
2008-07-15

Just use Mono with MonoTouch and MonoDroid

What, and add a bunch of bloat to my app? No thanks. The default system APIs can already add enough of that and, especially in the case of Android apps, they really don't need to be any slower. Write once, run everywhere doesn't really work as well as most people seem to think.

Reply Score: 1

RE[2]: seriously?
by Nelson on Fri 14th Sep 2012 03:29 UTC in reply to "RE: seriously?"
Nelson Member since:
2005-11-29

What bloat? Size? Performance? I've found it adds a few MBs to size, but performance isn't really severely impacted.

Start up? Slightly, but you can get around that in well documented ways.

The upside? The Mono JIT is dramatically FASTER than Dalvik. So, no, actually, if anything it makes your app more responsive.

Plus, write once run anywhere was never the intention. The intention is code sharing. Write platform agnostic back end code and write a native front end for Android, iOS, Windows Phone, Windows 8, WPF, and OSX (MonoMac or Silverlight)

.NET is the only platform enabling actual, real world, non made up, cross platform developer productivity.

It'd help if you tried it once in a while.

Reply Score: 4

RE[3]: seriously?
by moondevil on Fri 14th Sep 2012 07:09 UTC in reply to "RE[2]: seriously?"
moondevil Member since:
2005-07-08

Using Mono in Android means running two VM alonside each other with lots of marshling between VM, because your .NET application needs to make use of the DalvikVM APIs.

Just code the core of your application in C or C++, and make use of the platform native UI for the best user experience.

As for WP7, just let it die, as WP8 also supports C++.

Reply Score: 7

RE[4]: seriously?
by Nelson on Fri 14th Sep 2012 16:59 UTC in reply to "RE[3]: seriously?"
Nelson Member since:
2005-11-29

VM alonside each other with lots of marshling between VM, because your .NET application needs to make use of the DalvikVM APIs.


Have you actually used it and run into these supposed performance problems? Ive used it, and I haven't.



Just code the core of your application in C or C++, and make use of the platform native UI for the best user experience.

As for WP7, just let it die, as WP8 also supports C++.


Yeah, no. To do that, you'd still need JNI on Android, and a Cocoa bride on iOS since key APIs are not available as native interfaces.

You're doing the same bridging that Mono does, albeit without the slight double GC perf impact.

Also, nice little pot shot at WP7, but it has over 100,000 apps, and moving forward, C# will still be the majority language (as it is for Windows 8 apps).

Seriously, I don't get the Mono and C# bashing. Sure, maybe if you felt like hurting your productivity enough, you could use C++, but Mono has been proven to work in the real world.

Reply Score: 2

RE[5]: seriously?
by moondevil on Fri 14th Sep 2012 20:27 UTC in reply to "RE[4]: seriously?"
moondevil Member since:
2005-07-08

"VM alonside each other with lots of marshling between VM, because your .NET application needs to make use of the DalvikVM APIs.


Have you actually used it and run into these supposed performance problems? Ive used it, and I haven't.
"

How many devices have you tried it on?

Actually you might find this talk interesting,
http://vimeo.com/43529195


"
Just code the core of your application in C or C++, and make use of the platform native UI for the best user experience.

As for WP7, just let it die, as WP8 also supports C++.


Yeah, no. To do that, you'd still need JNI on Android, and a Cocoa bride on iOS since key APIs are not available as native interfaces.

You're doing the same bridging that Mono does, albeit without the slight double GC perf impact.
"

In Android's case JNI is an issue, but not as much as with Mono.

See Andreia's talk, there are some exposed APIs that go multiple times between VMs.

In iOS there is no marshalling happening.

Also, nice little pot shot at WP7, but it has over 100,000 apps, and moving forward, C# will still be the majority language (as it is for Windows 8 apps).


In Germany, the only person I've seen carrying a WP7 mobile outside a store, was a guy I've met that works for a startup that develops WP7 games.

Seriously, I don't get the Mono and C# bashing. Sure, maybe if you felt like hurting your productivity enough, you could use C++, but Mono has been proven to work in the real world.


Don't take it wrongly. Personally my only issue is that Mono/C# is promoted as the only way to achieve portability of native application across mobile platforms, when actually other solutions do exist, depending on what platforms are valuable to target.

Reply Score: 3

RE[3]: seriously?
by phoenix on Fri 14th Sep 2012 15:41 UTC in reply to "RE[2]: seriously?"
phoenix Member since:
2005-07-11

So, how is a "faster VM than Dalvik" relevant to a technology for writing apps on iOS devices using a Java-to-Obj-C translator?

Reply Score: 2

RE[4]: seriously?
by Nelson on Fri 14th Sep 2012 17:00 UTC in reply to "RE[3]: seriously?"
Nelson Member since:
2005-11-29

Im pretty sure you know how to read.

Reply Score: 2

RE[2]: seriously?
by zima on Fri 14th Sep 2012 05:42 UTC in reply to "RE: seriously?"
zima Member since:
2005-07-06

>Just use Mono with MonoTouch and MonoDroid
What, and add a bunch of bloat to my app? No thanks. The default system APIs can already add enough of that and, especially in the case of Android apps, they really don't need to be any slower. Write once, run everywhere doesn't really work as well as most people seem to think.

Meanwhile & pushing aside prejudices, the facts seem to be that ~Mono is the way which quite possibly gives most straightforward multi-platform capabilities with nice performance (adequate for that most demanding category: games), and numerous multi-platform examples in appstores - some of them quite high-profile (Bastion, for example - Xbox, Windows, iOS, OSX, Linux Humble Bundle)

http://monogame.codeplex.com/

Edited 2012-09-14 05:48 UTC

Reply Score: 2

RE[3]: seriously?
by moondevil on Fri 14th Sep 2012 06:52 UTC in reply to "RE[2]: seriously?"
moondevil Member since:
2005-07-08

And I thought that would be C and C++.

Reply Score: 3

RE[4]: seriously?
by zima on Fri 14th Sep 2012 07:01 UTC in reply to "RE[3]: seriously?"
zima Member since:
2005-07-06

Well I did put some emphasis on most straightforward there :p (broadly speaking, also how ~XNA is a quite accessible path)

Reply Score: 1

RE[3]: seriously?
by dvhh on Fri 14th Sep 2012 11:30 UTC in reply to "RE[2]: seriously?"
dvhh Member since:
2006-03-20

Most portable example spacechem
Linux (!)
Windows
Mac
iPad
Android Tablets
Build on mono (While I agree that the game is not graphic intensive, it is a great example for game with mono )

Reply Score: 2

This sounds...
by thavith_osn on Fri 14th Sep 2012 01:29 UTC
thavith_osn
Member since:
2005-07-11

...very interesting!

Looking forward to checking this out. I love the idea of writing a lot of the business rules in one language for all my projects.

Reply Score: 2

Fascinated
by darknexus on Fri 14th Sep 2012 02:56 UTC
darknexus
Member since:
2008-07-15

I am rather dubious when it comes to code translators from one language to another, but still, it's an interesting idea and I'll have to give it a whirl just for kicks if nothing else. A part of me can't help but remember that old Pascal to C translator and the god awful results that gave. Anyone else remember playing with that?

Reply Score: 3

Apple loves Google
by zhulien on Fri 14th Sep 2012 04:14 UTC
zhulien
Member since:
2006-12-06

Apple loves Google as they are great supporters of the iPhone platform ;)

Reply Score: 2

Let's face it
by ThomasFuhringer on Fri 14th Sep 2012 07:24 UTC
ThomasFuhringer
Member since:
2007-01-25

The smartest move would be for Google to move away from Java and switch to ObjC on Android.
- I know, just fantasy.

Reply Score: 2

RE: Let's face it
by fithisux on Fri 14th Sep 2012 07:57 UTC in reply to "Let's face it"
fithisux Member since:
2006-01-22

The smartest move would be for Google to move away from Java and switch to ObjC on Android.
- I know, just fantasy.


or switch to Google Go.

Reply Score: 4

RE[2]: Let's face it
by satsujinka on Fri 14th Sep 2012 08:19 UTC in reply to "RE: Let's face it"
satsujinka Member since:
2010-03-11

Go would certainly be welcome. It would even make a sort of sense.

Reply Score: 2

RE[3]: Let's face it
by moondevil on Fri 14th Sep 2012 11:47 UTC in reply to "RE[2]: Let's face it"
moondevil Member since:
2005-07-08

Except that Go does not seem to be that used by Google.

It is only part of Google App Engine, because the Go team is doing this work, not the Google App Engine team.

For me it appears to be a political decision not to support Go on Android, since the Go team has Go builds for Android.

Reply Score: 2

RE[4]: Let's face it
by satsujinka on Fri 14th Sep 2012 13:48 UTC in reply to "RE[3]: Let's face it"
satsujinka Member since:
2010-03-11

Of course. It is already possible to use Go on Android. The "sorta sensible" part is really just that Go is also a "Google" project. Of course, I don't expect Go to become standard, but after doing some Android dev. I wouldn't mind something a bit less verbose.

Reply Score: 1

RE: Let's face it
by Neolander on Fri 14th Sep 2012 10:31 UTC in reply to "Let's face it"
Neolander Member since:
2010-03-08

Actually, I think that interpreted languages sort of make more sense for mobile phones, due to the large amount of SoCs that apps will have to run on.

Apple's native code approach only works because there only is a handful of devices to target, with similar underlying hardware.

Reply Score: 4

RE[2]: Let's face it
by Nelson on Fri 14th Sep 2012 17:01 UTC in reply to "RE: Let's face it"
Nelson Member since:
2005-11-29

Very true. JIT compilers are good enough, and an intermediary bite code ensures architecture agnosticism

Reply Score: 2

Any GNUstep hope?
by fithisux on Fri 14th Sep 2012 07:56 UTC
fithisux
Member since:
2006-01-22

I have non-UI code in java and I would like to make it ObjC, compile it with Gnustep and run.

Reply Score: 2

Yea, debugging translates code...
by dsmogor on Fri 14th Sep 2012 09:54 UTC
dsmogor
Member since:
2005-09-01

is something I just love doing all day long.

Edited 2012-09-14 09:55 UTC

Reply Score: 3

Very cool
by pmac on Fri 14th Sep 2012 15:53 UTC
pmac
Member since:
2009-07-08

Very cool, but your data access layer would have to be self-written/managed on both platforms. It's obviously not going to translate the Android content provider API, and I don't see how it could work with iOS' CoreData, so you'd have to manually do your DB data reading/writing code, right? That sounds like you'd end up with a horrible Frankenstein app, but I don't know. If Google is using it on some of its iOS apps (would love to know which), there must be a way to do that better.

For projects without huge resources, it sounds great. But ideally you'd write each app from scratch. I have no idea why Google would be using this itself.

And for all the people talking about MonoTouch: hahahahahaha.

Edited 2012-09-14 15:58 UTC

Reply Score: 1

Comment by kovacm
by kovacm on Sun 16th Sep 2012 10:31 UTC
kovacm
Member since:
2010-12-16

Hm... Google bought Motorola and Motorola bought before 280 North - cappuccino.org

"Cappuccino is built on top of standard web technologies like JavaScript, and it implements most of the familiar APIs from GNUstep and Apple's Cocoa frameworks."

Reply Score: 1