Professionally I am a back-end Java developer, but recently I’ve been interested in writing a desktop application for Mac, and have started to learn Objective-C as a result. My problem is that the more I delve into the complexities of Objective-C, the more I wish I was just writing my application in Java, especially to make use of the myriad of frameworks etc. that Java has to offer.
So my question is this: can anyone give me a (convincing!) reason not to develop my new projects back-end in Java, and the UI in Objective-C? Basically, I’m asking someone to shoot me out of the water, tell me I’m a fool for even considering it!
What are the disadvantages to this approach? Performance I imagine will be paramount, but in my experience with Java, the back-end tends to approach native code performance (when written well). Could this approach even work? Perhaps with some fancy messaging framework (json?) pumping data between the Java and Objective-C sides?
Pete
If you have a large amount of existing Java code, then this is a feasible plan. Communicating between the UI and the “back-end” can be done using the Java Native Interface to box objects/method calls back and forth, rather than having to design and implement a network protocol.
However, keep in mind that Java is not shipped with the latest versions of Mac OS X (users will be prompted to download and install it), and apps that include Java components will not be accepted on the Mac App Store.