Quantcast
Channel:
Viewing all articles
Browse latest Browse all 3

Back To Basics – Objective J to Objective C and Back Again

$
0
0

I was fascinated a few months ago when I read about Cappuccino and Objective J. If you haven’t heard of it you should read their F.A.Q. Also check out some of the demos and especially 280 Slides. The people behind these projects have brains the size of small planets. Seriously.

Being a Mac man at heart, for the last few years I’ve been dabbling on and off with Objective C. However, my efforts were sometimes short lived and given the amount of PHP and .NET I had been doing, my Cocoa books began to collect dust on a shelf. Until I saw Cappuccino and Objective J.

With a project idea in mind for Cappuccino, I set about working through the scrap book tutorials. I got the hang of these and could understand the code behind them, but struggled a little taking that knowledge and applying it to my own application from scratch. I realised that to get really good with Objective J I was going to have to get really good with Objective C. This might seem obvious, but didn•t hit me at first. I was just too rusty.

So, reaching for the literary equivalent of Objective C WD40 for the mind, I picked out the brilliant Cocoa Programming For Mac OS X by Aaron Hillegass. Flicking through it, memories of the random number generator and other examples came flooding back and I happily got stuck into it. Then I got a little bit stuck. Being the second edition of the book and having updated to xCode 3.0 on my Mac, I had to alter a few of the steps when it came to Interface Builder. All good fun. Then I wondered if I could kill two birds with one stone here and have a crack at re-writing the examples in Objective J. I also thought it would probably be a good idea to make a few notes along the way and one night I decided it would probably make fairly interesting blog material .

The Plan

So here’s The Plan. I’m going through a slightly out of date Cocoa book and:

  1. Get each example to work in xCode 3.0
  2. Re-implement them using Cappuccino and Objective J
  3. Writing it all up as I go

I’ve already deviated from the plan a little bit with the first example and added a step or two:

  1. Get the Random Number Generator example to work in xCode 3.0
  2. Re-implement it using Cappuccino and Objective J
  3. Re-implement it using Cappuccino and Objective J using the 0.7 Beta and the magic of nib2cib
  4. Writing it all up as I go

Of course I didn’t just get the first example app written in Objective J straight away – hence re-impementing it in Cappuccino 0.6 and again in 0.7 Beta once I realised I could use Interface Builder and nib2cib to remove hand coding the front end. I also had to get to grips with building Cappuccino from the source so I’ll cover that too.

So, if like me you are new to Objective J and a bit rusty on Objective C I hope you find these tutorials useful. It’d be great to have people learning along side me. I’ll have Part One – Set Up published within the next few days.

Cheers,

Matt


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images