Re: CORBA with Mac OS X
Re: CORBA with Mac OS X
- Subject: Re: CORBA with Mac OS X
- From: email@hidden
- Date: Sat, 20 Oct 2001 00:02:57 -0400
On Friday, October 19, 2001, at 08:06 PM, David Sinclair wrote:
At 5:41 PM -0500 10/19/01, Scott Thompson wrote:
2. What is involved in using CORBA from Objective-C, i.e. installing
and setting up the ORB, and calling it?
Dunno about calling the ORB, but setting up an application to call from
Objective-C through to Java should be easy enough. If you use an ORB
other than the Java Orb, then likely you are going to have some kind of
C or C++ header file to use. The Objective-C++ compiler in Mac OS X
allows you to reasonably freely mix Objective-C, plain C, and C++ code
all in the same line of source.
Using the built-in Java ORB from Objective-C, rather than a third-party
ORB, is an intriguing possibility that I hadn't yet considered.
I would not recommend this. This would be too slow. If you want to use
Objective-C you should try omniORB3 from AT&T (
http://www.uk.research.att.
com/omniORB/omniORB.html). It's a certified ORB (one of the few out there)
, it's really fast and it's free. It generates C++ bindings (or Python,
really nice to test the servants) and so you can use Obj-C and C++ for
your application.
You should note also that you can mix and match multiple languages with
CORBA. You can write a C++ server and a Java GUI or you can do the
opposite, write a Java server and a Obj-C GUI app. Or my preferred
solution a pure-C++ server and a Obj-C (with C++ bindings to the CORBA
servers).
You should also note that designing a distributed (CORBA) application is
different from designing a single executable application. CORBA should not
be used where it's not necessary. Always keep in mind that CORBA adds
considerable overhead to every call you make.
Between Obj-C and Java for the GUI part I would suggest Obj-C. My problem
with Java is running multiple applications at the same time. If you run
one Java application on your desktop the performance is acceptable but if
you start a couple more you will see what I mean. Multiple virtual
machines slow down the most powerful machine. If only someone would come
up with a shared virtual machine...
Regards,
Jorge Monteiro
You have the tradeoffs for Java and Objective-C that are intrisic to the
languages too (Objective-C is native code, Java is JIT compiled,
Objective-C has explicit memory management, Java has a garbage collector,
etc...)
Yes, those and other issues are also important factors. How is
Java/Cocoa performance-wise compared to Objective-C/Cocoa? Any
noticeable difference under normal conditions?
4. Is Java versatile enough to create a full Cocoa application?
My experience, limited as it is, is that Cooca does a very excellent job
of allowing you to create "full" applications. I wrote some
uninteresting-but complex Java/Cocoa applications while playing with
Cocoa and Java.
That does sound like a popular recommendation; others have praised Java
under 10.1. I'll have to investigate it more closely.
Comming from a Carbon background as you are, Cocoa will likely be a bit
of a culture shock (it was for me... I'm still getting used to NOT
having to write as much code). After a little treading water with some
prods from helpful people, however, I hope you will find it as
interesting as I do.
I've been using Object Pascal for a few months, to help ease the
transition, but I'm sure you're right, it'll be a bit of a shock. But I'm
confident that Cocoa is the way of the future, and am looking forward to
diving in. I'm glad that this and similar lists are available as life
preservers.
Thank you for your helpful reply.
--
David Sinclair, Dejal
mailto:email@hidden
http://www.dejal.com
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev