123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Computer-Programming >> View Article

Cocoa Applications Development With The Use Of Mac Ruby

Profile Picture
By Author: Dharmesh Aegis
Total Articles: 105
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

Over past few years a dynamic programming language named Ruby has gained immense popularity and this is due to its Rails web framework. Now for iPhone developers this can prove to be beneficial as they can create Mac OS X application with the use of MacRuby while still maintaining the performance benefits that is offered by a fully-fledged Cocoa application. Here in this article we will see how we can get started with MacRuby and iPhone development can be done with building of sample application.
Common Ancestry:
For iPhone application development or writing any application with Mac OS X Leopard iPhone developers need to consider Objective-C as the de-facto programming language. Ruby has the support for Cocoa development also via its Ruby Cocoa Bridge. Objective-C and Ruby both are sharing a common ancestor in Smalltalk so as to make them ideally suitable for integration. Thus this evident made Ruby Cocoa popular as it serves the basis for several significant projects used for iPhone development, iPhone application development, iPad application development or iPad applications. It also includes the ...
... open sources like Lime Chat IRC client, Blog and Podcast Producer of Apple.
Why use Mac Ruby?
iPhone developers if need to create bridge between two languages can be a complex, costly, low performing and difficult to truly integrate. Thus Apple came out with an open source project aiming to address all these problems faced during iPhone development or iPad application development and that is MacRuby. With implementation of Ruby Cocoa it serves as a bridge between the official Ruby interpreter and Objective-C runtime. Thus every time you talk to an objective-C object from Ruby you need to cross the bridge and vice versa. From a typing system to another one all objects are needed to get converted and also the messages are forwarded which turns into prohibitive costs if repeated too often.
MacRuby is aimed to focus addressing on these and a number of other challenges by providing an implementation of Ruby language on top of core Mac OS X technologies like Objective-C runtime, the Core Foundation and the generational garbage collector. All classes in MacRuby are Objective-C classes, all methods are Objective-C methods and all objects again Objective-C objects. Thus now there is no bridge and successfully Ruby finishes its implementation direct on top of the Objective-C runtime.
The fundamental data types of MacRuby like Array, Hash and String are re-implemented on top of counterparts. All strings that you create in MacRuby are native Cocoa strings and you can pass to underlying C or Objective-C APIs that expects Cocoa objects. Also it is implied from this implementation that the strings in MacRuby are UTF-16 compliant by default.
MacRuby is also re-entrant which means that it can be safely called from multiple threads. Objective-C is used by MacRuby as a garbage collector for reclaiming unused memory. It has two benefits – the first one is that it has generational nature that performs fast collections and the next one is its non-interrupting nature for current process while collection of memory and all collections are done in separate thread.
For getting started and installation of MacRuby can be done easily by downloading it from one of the binary installers. Well you can also retrieve the sources from the source repository and build them manually. Refer the page of Installing MacRuby and it will guide you through entire process of getting the installation done on your machine.
For More Info:- iPhone Development | iPhone App Development

Total Views: 394Word Count: 575See All articles From Author

Add Comment

Computer Programming Articles

1. Product Matching At Scale: How Retailers Match Exact Products, Variants & Comparable Items Across Marketplaces
Author: KVETOIQ

2. Enterprise Web Crawling At Scale: 10 Requirements For Reliable, Continuously Refreshed Web Data
Author: KVETOIQ

3. Quick Commerce Data Scraping: How Businesses Can Turn Real-time Market Data Into A Competitive Advantage
Author: KVETOIQ

4. Best Data Extraction Companies In India (2026): 8 Managed Providers For Custom Business Data
Author: KVETOIQ

5. Ecommerce Assortment Intelligence: How Retailers Track Product Gaps, New Launches & Category Changes
Author: KVETOIQ

6. Simple Google Maps Business Data Scraping For Global Reach
Author: webfusion

7. Amazon Price Monitoring: How Brands Track Competitor Prices, Discounts & Stock Changes
Author: KVETOIQ

8. Product Engineering Solutions In The Usa: Building Scalable And Innovative Digital Products
Author: John Smith

9. How An Emergency Assembly Point Helps Organize Workplace Evacuations
Author: How an Emergency Assembly Point Helps Organize Wor

10. How To Improve Workplace Safety Awareness Through Daily Practices
Author: scrum

11. Sap Tutorial: A Beginner’s Guide To Sap Software
Author: Tech Point

12. Visualforce Page Tutorial: Learn Salesforce Visualforce Development From Scratch
Author: Tech Point

13. Strengthening Business Security With Professional Cybersecurity Training Programs
Author: CompCiti

14. How Smart Contracts Help Businesses Automate Digital Transactions
Author: naomiscott

15. Apache Ant Tutorial: A Complete Guide To Build Automation For Beginners
Author: Tech Point

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: