Re: CORBA with Mac OS X
Re: CORBA with Mac OS X
- Subject: Re: CORBA with Mac OS X
- From: Scott Thompson <email@hidden>
- Date: Fri, 19 Oct 2001 17:41:14 -0500
1. Any advice or corrections regarding the above concept and
observations?
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.
Chances are that whatever ORB you choose you'll do OK.
3. Is it easier or harder from Java?
I would venture to suggest that calling the Java ORB from Java would be
easier than trying to do it from Objective-C. The task of connecting to
the Java VM is pretty easy, but it's an extra step that you have to go
through.
The threading support in Java might also make contracting with the ORB
in multiple threads a little bit easier (though Cocoa's NSThread classes
are really nice).
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...)
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.
I encourage you to check out the java samples in the developer tools
examples folder. There's some pretty sophisticated application work in
there that's written in Java.
5. Is it possible to mix Objective-C and Java in one application with
Project Builder?
Yes. If you create a Cocoa/Java application and look in ProjectBuilder,
you will note that the "main" routine is actually written in
Objective-C. In fact, I don't think there's any way to create a
Java-Cocoa application that doesn't have main written in Objective-C.
(at least I had real trouble writing one).
I'd really like to hear from someone familiar with CORBA on Mac OS X.
I'd appreciate any advice or comments from anyone on any of this.
Please reply either to the list or directly to me.
I'm afraid my CORBA/ORB experience is limited to reading about what they
are and what they are for. I've spent the last several weeks working
with Cocoa and Java in my "off hours" and have been deeply impressed
both with the Cocoa framework and the ability to access it from Java.
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.
Scott