Developing with Camel Bones - Perl, Cocoa, OS X goodness

by Jeremiah Foster

I have been working on a series of articles for the MacDevCenter about alternative windowing systems for Mac OS X and I haven't been blogging recently. I am kind of hiding out from my editor since I am a little behind with the next article, its coming soon Bruce, I promise! :)

I wanted to mention something really cool that I found in researching the articles and that something is Camel Bones. Camel Bones is an Objective-C to Perl bridge which means you can use the underlying OS X system from perl to develop applications.
While you can develop desktop applications in nearly any programming language on OS X, Objective-C is really the best choice since there is so much good Apple documentation and it is what Apple uses. Camel Bones allows you to use perl and connect to all the Cocoa/Objective-C bindings obviating the need to learn Objective-C. This might be useful since you can scour CPAN for modules that have the functionality you want and you can use Camel Bones to build a GUI wrapper around the perl code and Voila! you have a new desktop application.

There are some apps already written using Camel Bones, like a web browser for example, so there is interest in the development community and the developer of Camel Bones, Sherm Pendley, is working actively on developing so here is your opportunity to influence the future of Camel Bones.

Apple should be more active in supporting this sort of development. Third party application development is key to the success of OS X, at least so says Apple's SEC reports, and this is an excellent way for Apple to get some slick perl hackers on board. Recently SUN stated that Open Source Software developers should be compensated for their work and I think Apple too should look into this since their platform benefits directly from so much excellent Open Source tools, like Apache, MySQL, OpenSSH - the list is long. Making sure that Camel Bones is actively developed and has the resources it needs would be an excellent move by Apple showing its support for its development community.

Now go out and develop the next killer app!

8 Comments

poss
2007-05-09 08:14:31
Really, without getting into a language war, if you don't want to program in Objective-C checkout PyObjC (http://pyobjc.sourceforge.net/). Since it is python, it lets you write *readable* and maintainable code. This is also the most mature of the Objective-C high level language bridges available. Unlike the Java-Objective-C bridge since python is a dynamic language you can do all the things you can do in Objective-C. I think it is easier to read than Objective-C, requires fewer lines of code and is more productive.
Jeremiah Foster
2007-05-09 08:38:32
Yeah, same thing with Camel Bones, only you get to use perl. Yay!
Larry
2007-05-09 08:42:02
You're maybe just a step behind. See here: http://www.mail-archive.com/macosx@perl.org/msg09739.html
Sherm Pendley
2007-05-09 11:50:08
Funny that you should mention CPAN - one of the first inspirations for CamelBones was when I looked at Apple's C API for their "Web Services" framework, and compared that with Soap::Lite.


If you do develop a killer app, let me know! I'll add it to the "links" page on the CamelBones site.

acrylic
2007-05-09 15:09:45
Apple should be more active in supporting this sort of development.


They are. PyObjC and RubyCocoa will be included in Mac OS X 10.5, and they employ commiters from both projects.

Bas
2007-05-10 02:23:22
Apple should not only support bridges with the major scripting languages, and Perl is one of them, but also take the lead because they bought Objective C. To keep it alive they should make the language a good citizen: bridges to other languages, and a generic API to major third party systems;
- like a single SQL layer to connect to MySQL, Postgres, Oracle, SQL Server, Sybase, Informix.
- better support for general purpose file types: XML, CSV, etc.
LD
2007-05-14 23:03:24
The ONLY reason to use this would be to take advantage of EXISTING Perl modules. We now have much better languages at our disposal, that already have mature bridges to Cocoa. Perl as a language has little value these days (different story when Perl broke), the wealth of libraries available for it is where the value is.
IMSCARY
2007-07-24 08:39:02
CPAN functions are a great reason to use Camel Bones for Mac applications, but hardly the only one. Perl is accessible to non-programmers and lots of people who don't program for a living use it. For Perl people to have a way to make a GUI applications for the Mac is a Good Thing.