Re: ObJC vs. Java -- NEWBIE
Re: ObJC vs. Java -- NEWBIE
- Subject: Re: ObJC vs. Java -- NEWBIE
- From: Mijobe <email@hidden>
- Date: Thu, 5 Feb 2004 17:38:03 -0500
A few things...
#1 Java apps are not ugly, Swing is ugly. If you want to put a nicer
face on your Java app then use SWT, if you don't know what it is then
go check out www.eclipse.org, their editor uses it and you can find
more information about it there. If you write your app against SWT it
will run on a lot of platforms but it won't look native on all of them.
An application written once that has even a mildly complex UI will
never look native on all platforms. Why? Because you only designed
the UI and Windoze apps don't look like Mac apps and Mac apps don't
look like Linux/X11 apps. My advice, write against SWT for Windoze and
Linux, write against Cocoa for OS X, Mac users are finicky about their
UIs, everyone else is used to sub-par UIs.
#2 The same code path executed a second time in Java will run at
native speed, most likely faster than Cocoa. There are exceptions to
the this but once the Java Bytecode is compiled by the JIT once it
won't do it again, just like Microsoft's IL JIT compiler. Objective-C
applications have a lot of runtime overhead. Their runtime is smaller
and they are compiled to native executables but Objective-C uses true
messaging unlike Java/C#. In Java/C# when the Bytecode/IL is JIT
compiled it is basically linked into the running code. With
Objective-C messages are passed to the class and the class determines
what to do with it at runtime, basically when a method is called
(message is sent) to an Objective-C class at runtime it is passed a
method identifier that is examined and then the appropriate method is
executed or not. You can even override this behavior and instead of
reacting to the message forward it over the network to a remote object
providing extremely powerful location transparency. What is slower
about Java is the load time, graphics operations and some memory
operations may be slightly slower. The latency with graphics
operations is usually what makes people think Java is slow, if you use
the SWT instead of Swing you'll be much happier.
#3 Unless you know Smalltalk learn Objective-C. I couldn't agree more
with what everyone else on the list has said. I wouldn't say that
Objective-C is a superior language but you'll be doing yourself a favor
if you learn it. Objective-C is one of the most interesting
programming languages I've ever learned and one of my favorite.
Objective-C is not that far off from Java, same principles, different
implementation, feature set and look.
#4 To share my experience I don't write cross-platform applications.
When I write software if I want it to run on OS X then I use Cocoa, no
matter how much time goes by Java will never enjoy the same support as
Cocoa unless the language is fundamentally changed. Cocoa was designed
with Objective-C in mind and it uses a number of features available in
Objective-C that just can't be duplicated in Java and can't be copied
without serious overhead. The same can be said for every other
platform. If you already know .NET then write your windows app in
C#/.NET and write your OS X app with Cocoa/Objective-C. That's my
advice. There's no substitute for the real thing!
-
email@hidden
<xinjen/>
On Feb 5, 2004, at 7:36 AM, Lotsa Cabo wrote:
I'm still watching the WWDC videos. Since they are on loan from
someone, I am trying to go through them before I start writing code.
As some of you know, I'm about to write my first Mac application after
having been a M$ guy for a few decades.
The app is a simple compiled app that accesses web services from a
.NET server, modifies XML files locally, and uploads the XML blobs. I
am most familiar with Java, VB, VB.NET, and C#. The most natural type
of project for me would be a Cocoa-Java app. Unfortunately, I'm
worried about the deployability and speed of the app.
And the questions begin...
1. If I code my Cocoa app using Java, how much slower than Objective-C
will Java be?
2. For the .NET WebService access, which is better, Java or ObjC?
3. For XML parsing, which is better, Java or ObjC?
4. Each time I have installed an app on my new PowerBook, I've had to
copy one object (I think it's a "bundle") from a drive image to my
Applications directory. I think this is a great install process. If
I code my app using Java, will I be able to use this type of install
method when my app is distributed?
5. Java apps on Windows are ugly. If I code my app in Java, will the
user know that it's Java when it's running?
6. The few lines of Objective-C that I have seen has no resemblance to
any language that I'm familiar with. Considering I will be developing
on a Mac and M$ platform for years, is there any major benefit to
learning Objective-C?
In short, I'm trying to figure out which language to use. Thanks, in
advance, for those of you that choose to answer / respond.
Thanx,
Ryan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.