Cocoa

james on 2002-08-25T17:31:07

So today I seriously sat down to write some code in Cocoa - I've had a hankering for it for the last little while, and acme's work with offline clients at work has been pushing me a little closer to actually doing something about it...

I was impressed with the little I'd seen before, but now I'm wowed. Everything seems to fit together in just the right way, and its lovely to work with.

I do have a problem however. I want to get my nice little application to call some SOAP services. There is no Objective-C SOAP library that I can find, so I'm kinda hovering between a few options.

  1. Link the App with CamelBones, write the SOAP client in Perl with SOAP::Lite. Pros: easy Cons: need to distribute app with CamelBones and Perl
  2. Write the client uploader class in Java, and distribute that instead. I'm trying this at the moment, but I can't seem to call a Java method from an Objective-C class. Nothing I read seems to suggest that this is, or isn't possible. Hmm, maybe I should change strategies.
  3. Write an Objective-C SOAP library. At the moment, this seems the least achievable, but the most desireable
Ho hum...


CamelBones

Matts on 2002-08-25T23:15:11

I'm convinced that shipping CamelBones apps should be really simple. You should be able to copy the relevant .so and .pm files into the new apps' Contents/Resources directory. After all, Perl comes with OSX. Or something.

Of course I'm yet to manage it. But I'm sure it's possible. I'd love someone to write up how to do it.

Re:CamelBones

garth on 2002-08-26T01:45:42

It is vaguely simple to make shippable .app with camelbones. I've done it with JournalX.

The main thing you have to do is recompile the camelbones framework to be distributable within the application. There is an article that discribes what you have to do to compile the framework, and then how to copy and reference the framework in your application.

Re:CamelBones

james on 2002-08-26T09:58:10

Of course, if you've got someone whose installed a different version of Perl from you then it will prove difficult. However, now I've figured out how to use the Cocoa/Java bridge life is easy.

I'm very impressed with the C/J bridge - I've not had a problem with type munging yet (but then again I'm passing simple strings). Its not like I've never seen a piece of glue like this before -- I mean Perl does it all the time -- but its always impressive to see it done so well in another language :-)