Tip:
Highlight text to annotate it
X
Should I learn Java or Cocoa? I hear a lot of angry debate on each side but few solid
arguments.
It sounds like the war of the hot beverages, about to devolve into regular versus decaf
or Green Mountain versus Starbucks.
Mac developers are fighting over which brew to use. Did you know Java even has Java Beans?
Apple started deprecating Java back in 2010.
Say what? Making fun of it?
Back in 2010, Apple said that developers shouldn’t use the Apple supplied Java runtime for their
development.
And that’s despite Java being on of the backbones of the internet.
JavaScript is more important when it comes to developing web apps. But the fact that
Apple said Java was depreciated, AKA obsolete, means Apple itself turned its back on the
language.
And what do Apple developers do now?
Apple threw out the Java coffee and embraced hot Cocoa.
If you learn Cocoa, you have to work with Xcode. Eclipse for Java is more robust.
It’s just been around longer.
Why did they get rid of Java?
One of the complaints was that Java was too slow. This was true if you had immersive experiences
like shoot-em-up games.
And Java does not support Objective C, the language they use for the iOS hardware.
Objective C programmers need more workarounds to call Java code, but it can be done.
Then why does anyone still use Java?
Java has better access modifiers like public, private and protected. Objective C and Cocoa
don’t have the same options.
I’d hate to have to hack the code to implement good access control.
Java with Eclipse is also a more complete object oriented language than Objective C
and Cocoa.
What’s your verdict?
If you want to be an Apple developer, go with Cocoa because that’s their preference. For
everything else, use Java and Eclipse.