Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Cocoa (API)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Implementations and bindings== The Cocoa frameworks are written in [[Objective-C]]. Java [[language binding|bindings]] for the Cocoa frameworks (termed the ''Java bridge'') were also made available with the aim of replacing Objective-C with a more popular language<ref>{{cite journal|url=http://www.mactech.com/articles/mactech/Vol.19/19.12/CocoaAppsinJava/index.html|title=Writing Cocoa Apps in Java|author=Steve Klingsporn|journal=[[MacTech]]|volume=19|issue=12|year=2003}}</ref> but these bindings were unpopular among Cocoa developers and Cocoa's message passing semantics did not translate well to a statically-typed language such as Java.<ref>{{cite web|url=https://developer.apple.com/legacy/library/documentation/Cocoa/Conceptual/Legacy/JavaBridge/JavaBridge.pdf|title=Using the Java Bridge|publisher=[[Apple Inc.]]|quote=Because Java is a strongly typed language, it requires more information about the classes and interfaces it manipulates at compile time. Therefore, before using Objective-C classes as Java ones, a description of them has to be written and compiled.}}</ref> Cocoa's need for runtime binding means many of Cocoa's key features are not available with Java. In 2005, Apple announced that the Java bridge was to be deprecated, meaning that features added to Cocoa in macOS versions later than 10.4 would not be added to the Cocoa-Java programming interface. At [[Apple Worldwide Developers Conference]] (WWDC) 2014, Apple introduced a new programming language named [[Swift (programming language)|Swift]], which is intended to replace Objective-C.<ref>{{cite web |url=http://appleinsider.com/articles/14/06/04/apples-top-secret-swift-language-grew-from-work-to-sustain-objective-c-which-it-now-aims-to-replace |title=Apple's top secret Swift language grew from work to sustain Objective-C, which it now aims to replace|date=June 4, 2014 }}</ref> ===AppleScriptObjC=== Originally, AppleScript Studio could be used to develop simpler Cocoa applications.<ref>{{cite web|title=AppleScript Studio Programming Guide (Not Recommended): About AppleScript Studio|url=https://developer.apple.com/legacy/library/documentation/AppleScript/Conceptual/StudioBuildingApps/chapter02/studio_about_book.html#//apple_ref/doc/uid/20001249-TPXREF101|publisher=Apple, Inc.|access-date=November 20, 2013}}</ref> However, as of Snow Leopard, it has been deprecated. It was replaced with AppleScriptObjC, which allows programming in [[AppleScript]], while using Cocoa frameworks.<ref>{{cite web |title=AppleScriptObjC Release Notes |url=https://developer.apple.com/library/mac/#releasenotes/ScriptingAutomation/RN-AppleScriptObjC/ |publisher=Apple, Inc. |access-date=November 20, 2013}}</ref> ===Other bindings=== The Cocoa programming environment can be accessed using other tools with the aid of [[language binding|bridge mechanisms]] such as [[PasCocoa]], [[PyObjC]], [[CamelBones]], [[RubyCocoa]], and a [[D (programming language)|D]]/Objective-C Bridge. <!--Try to organize bindings, alphabetically by language.-->Third-party bindings available for other languages include [[AppleScript]], [[Clozure CL]], [[Monobjc]] and [[NObjective]] ([[C Sharp (programming language)|C#]]), [[Cocoa Sharp|Cocoa#]] (CLI), Cocodao and [[D (programming language)|D]]/Objective-C Bridge,<ref>[http://sourceforge.net/projects/cocodao/ Cocodao], bridge to create Cocoa applications in D language.</ref><ref>[http://michelf.com/weblog/2007/d-objc-bridge/ D/Objective-C Bridge], a [[language binding]] mechanism for Cocoa.</ref> [[LispWorks]], [[Object Pascal]], [[CamelBones]] ([[Perl]]), [[PyObjC]] ([[Python (programming language)|Python]]), [[FPC PasCocoa]] ([[Lazarus (IDE)|Lazarus]] and [[Free Pascal]]), [[RubyCocoa]] ([[Ruby (programming language)|Ruby]]).<ref>[http://osx.hyperjeff.net/Reference/cocoa.php more extensive list of implementations]</ref> A Ruby language implementation named [[MacRuby]], which removes the need for a bridge mechanism, was formerly developed by Apple, while [[Nu (programming language)|Nu]] is a [[Lisp (programming language)|Lisp]]-like language that uses the [[Objective-C]] object model directly, and thus can use the Cocoa frameworks without needing a binding. ===Other implementations=== There are also open source implementations of major parts of the Cocoa framework, such as [[GNUstep]] and Cocotron,<ref>[http://www.cocotron.org/ Cocotron], free software implementation of Cocoa.</ref> which allow [[cross-platform]] Cocoa application development to target other operating systems, such as [[Microsoft Windows]] and [[Linux]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)