• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: playing swf file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: playing swf file


  • Subject: Re: playing swf file
  • From: Scott Ellsworth <email@hidden>
  • Date: Tue, 21 Mar 2006 11:14:40 -0800


On Mar 17, 2006, at 6:45 AM, Gurmit Teotia wrote:

Please suggest me which approach I should use:- JNI or Cocoa-Java Bridge?

I would strongly recommend using JNI for what you have proposed in preference to the Cocoa-java bridge. JNI is the standard way to contact a Java service from C, and vice versa. Thus, if you ever port the code to a different platform, you can write a different OS- level shim or library that does the C-level work, and can then call it happily from Java as needed.


I dearly love Java as a language, even though it has its problems. That said, the Cocoa-Java bridge is not the right way to go for access to underlying Cocoa goodies. In my ideal world, Cocoa services would be exposed through carefully thought out Java APIs. Failing that, Cocoa/CF services would be exposed automatically by a supported and well maintained performant tool at Apple's end. Since neither is happening, the bridge is not the best way to go, IMO.

There is a cost to JNI - a pile of microseconds per call - so it is not the right way to go for a single arithmetic operation. It is a decent way to go, though, for a database call, network access, or multimegabyte disk write, as the small JNI overhead will be completely swamped.

Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: playing swf file
      • From: "Gurmit Teotia" <email@hidden>
References: 
 >Re: playing swf file (From: Dave Hersey <email@hidden>)
 >Re: playing swf file (From: Robert Walker <email@hidden>)
 >Re: playing swf file (From: "Gurmit Teotia" <email@hidden>)
 >Re: playing swf file (From: Scott Ellsworth <email@hidden>)
 >Re: playing swf file (From: "Gurmit Teotia" <email@hidden>)

  • Prev by Date: [Moderator] EOT Re: Installer
  • Next by Date: Re: folder monitoring...
  • Previous by thread: Re: playing swf file
  • Next by thread: Re: playing swf file
  • Index(es):
    • Date
    • Thread