Developing with Camel Bones - Perl, Cocoa, OS X goodness
by Jeremiah Foster
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!
|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.|
|Yeah, same thing with Camel Bones, only you get to use perl. Yay!|
|You're maybe just a step behind. See here: http://firstname.lastname@example.org/msg09739.html|
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.
Apple should be more active in supporting this sort of development.
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.
|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.|
|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.|