Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why should anybody learn Objective-C if already know Java?

 
Eduardo Hernandez
Greenhorn
Posts: 13
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I mean... If somebody already has mastered Java why should bother learning Objective-C?

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65113
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to write native apps for either OS X or iOS, Objective-C is the language of least resistance.
 
Eduardo Hernandez
Greenhorn
Posts: 13
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:If you want to write native apps for either OS X or iOS, Objective-C is the language of least resistance.


So.. it's just all about performance?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65113
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I said nothing about performance.

It's all about what language is best supported in the environment.
 
Eduardo Hernandez
Greenhorn
Posts: 13
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:I said nothing about performance.


I know you didn't say something explicitly about performance but since performance is one of the benefits of coding in native....

It's all about what language is best supported in the environment.[/quote wrote:

Please point/post what about Java isn't supported and what is best supported in Objective-C than Java.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65113
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Besides, one can never learn enough languages.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eduardo Hernandez wrote:I know you didn't say something explicitly about performance but since performance is one of the benefits of coding in native....


What performance benefits of being native? People don't do enough computation in IOS apps to care about performance of the app, its all about the performance of the frameworks, and you can't change that.

The point is that writing for IOS essentially requires you to write in Objective-C. These days, the best way for an independent to have a profitable product is to sell it through the app-store, which means writing Objective-C.

The good reason is that when you write in Objective-C, you get, for free, or at least no cost to use, a very rich framework that gives your app the native look and feel, and all the cool multi-touch support, etc. Java is cursed/blessed with being platform independent, so you only get to use the minimal common subset of features on all platforms. THis means that Java is way behind IOS on cool touch and sensor apps.
 
Fei Ng
Ranch Hand
Posts: 1245
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"What performance benefits of being native?People don't do enough computation in IOS apps to care about performance of the app, its all about the performance of the frameworks, and you can't change that."

We are talking about iOS devices right? There isn't a much ram or cpu power on these devices? When you do a lot of animations you really should go for C in opengl.
 
Eduardo Hernandez
Greenhorn
Posts: 13
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Pat Farrell wrote:The point is that writing for IOS essentially requires you to write in Objective-C. These days, the best way for an independent to have a profitable product is to sell it through the app-store, which means writing Objective-C.


Good one... PROFIT!

Pat Farrell wrote:The good reason is that when you write in Objective-C, you get, for free, or at least no cost to use, a very rich framework that gives your app the native look and feel, and all the cool multi-touch support, etc. Java is cursed/blessed with being platform independent, so you only get to use the minimal common subset of features on all platforms. THis means that Java is way behind IOS on cool touch and sensor apps.


Another one.. "Native look and feel" and "Multi-Touch Support".

What else guys?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65113
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd say that's sufficient reasons.
 
Eduardo Hernandez
Greenhorn
Posts: 13
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:I'd say that's sufficient reasons.


I agree that those are sufficient reasons but the point is to get the whole pack and complete the list from the guys that "knows" both languages.

Perhaps the Authors should add the rest if we are still missing....
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pat Farrell wrote:
Eduardo Hernandez wrote:I know you didn't say something explicitly about performance but since performance is one of the benefits of coding in native....


What performance benefits of being native? People don't do enough computation in IOS apps to care about performance of the app, its all about the performance of the frameworks, and you can't change that.

The point is that writing for IOS essentially requires you to write in Objective-C. These days, the best way for an independent to have a profitable product is to sell it through the app-store, which means writing Objective-C.

The good reason is that when you write in Objective-C, you get, for free, or at least no cost to use, a very rich framework that gives your app the native look and feel, and all the cool multi-touch support, etc. Java is cursed/blessed with being platform independent, so you only get to use the minimal common subset of features on all platforms. THis means that Java is way behind IOS on cool touch and sensor apps.

Whether it is can be called Java or not, but does your last line applies on Java's Android?
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Todd wrote:Whether it is can be called Java or not, but does your last line applies on Java's Android?


Java as a cross-platform product, sure, its cursed with minimal common subset. Nothing prevents a vendor such as Google from releasing a library that works great on a specific set of hardware. But that doesn't mean that Swing or AWT has any modern UI support.

Which gets back to what is Objective-C really? and what is Java?

The modern interest in Objective C is for IOS development. Its really Objective-C plus the Apple supplied frameworks for their hardware.

While I'm sure someone could, in theory, write Objective-C for Android, I've never heard of anyone doing that. For Android, you write in Java with the Dalvik world. Or for the Dalvik world. I believe that Google is being sued over whether or not you write in Java for Dalvik.
 
Johannes Fahrenkrug
author
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eduardo,

honestly, I don't even know how to answer that question, but I'll try:
It's like asking "Why should I bother learning German if I already know English?" Maybe you want to talk to people in Germany, Austria and Switzerland? Maybe you want to order a meal at a restaurant there? Maybe you want to move there or open a business?
Just as learning new spoken languages is either useful or necessary, depending on what you want to or have to do, so is learning new programming languages.

You want to use Ruby on Rails? Well, you'll need to learn Ruby because Rails happens to be written in Ruby.
You want to use SproutCore or jQuery? Well, you'll need to learn JavaScript.
You want to develop for the Mac or iOS? Well, you'll need to learn Objective-C because all of the Cocoa frameworks are written in Obj-C (or C).



So, to sum it up: You don't have to learn Obj-C if you don't want to develop for iOS. If you want to stick with Java, you should check out Android. But if you do want to develop for iOS, you have to learn Obj-C (unless you use something like Titanium or make HTML5 apps, but then you'll have to learn JavaScript ).

Cheers,

Johannes
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic