Friday, June 5, 2009

ObjC experiments

After some experiments with iPhone development and ObjC I decided to take a look at ObjC and use it to implement some simple but useful app.

As I don't use any kind of tray or docker whatever (I will elaborate on that topic) I decided to implement some app which would poll IMAP server for new messages and notify me using libnotify.

If you're interested, you can check sources on github. Actually, it's more toy than real app atm, however it seem to work alright with my gmail account. And yeah, it's pretty simple and can only work with IMAPS (IMAP with SSL).

Well... ObjC impression... surprise! Nothing is looking really impressive. What can I say. The language looks pretty natural and intuitive. I guess I like it more than C++, though I cannot be quite right in that since I don't know C++ and ObjC well enough, but I just like how ObjC feels. One more thing is that I haven't read any ObjC so I don't know best practices and design principles that should be used when wring in ObjC. I think it would worth to read some good book about ObjC.

I didn't use GNUstep foundation classes on purpose. First reason is my philosophy of writing tools is that a tiny tool should not bring such huge dependencies like GNUstep. The second reason is that it would be better to learn pure language before moving to high-level frameworks. And my understanding is that using foundation classes changes ObjC programming dramatically.

I think I'll play with this tool a little because it contains a lot of bugs and leaks (but it's more related to the C aspect of programming), will probably try to redesign it and move to playing with GNUstep classes, just need to come up with a project which would worth it.

PS Yeah, the only thing that makes me curious is "+/-" in method signatures. IIRC, they're used to distinguish class and instance methods. In the most code I've seen or wrote, most of methods were actually instance methods, class methods appear not quite often, at least for me, so I don't really get why they deserved so much attention in ObjC.

No comments:

Post a Comment