From: Arno P. <ar...@pu...> - 2009-11-27 07:48:38
|
Markus Heberling wrote: > I would be interested in such a solution. > > Combined with this: http://code.google.com/p/jnaerator/ we would have a > full java environment with full access to all Objective/C frameworks. I looked at jnaerator a while ago. Again I'm personally a little divided over such an approach. The big appeal is certainly to get complete coverage very quickly. However, I find the jnaerator-generated Java binding "ugly". To be a little more specific what I mean by that: right now we take the (labor intensive) approach of custom-designing the Java API from the Objective-C counterpart. The benefit is a natural looking Java interface that you can still relate very easily to its original (which makes it easy to consult Apple's documentation). In some cases we have also made use of Java's strong-typedness: instead of passing an arbitrary selector for a delegate we have introduced strongly-typed Java interfaces which is much more in the spirit of the Java programming language. Again there are pros and cons for either approach. Perhaps we can achieve the best of both worlds: first use jnaerator to generate the Java API and then create custom APIs for certain parts. Anyone interested in doing a proof-of-concept with jnaerator? Ideally I would like to see a patch to XMLVM that integrates jnaerator and creates the Java API for a selected UIKit class. Any contenders? Arno |