I have spent most of my programming career working with PHP and after branching out to Java I found that I have been fairly spoiled with some of PHP's ease of use. I have only recently been delving into objective-C as I believe it would be the language of choice for a new area of interest I am focusing on, which is genetic algorithms and evolutionary programming. I believe objective-C would be a good candidate because it is somewhat faster than C or C++ (from what I have read), it is self-documenting, high code reuse potential, dynamic typing, and because of Cocoa's rich objects.
I was recently reading over a post at Wikipedia that detailed a lot concerning Cocoa programming. As I read I came across what appears to be some shortcomings of Cocoa that I would like to try to address before I start programming with the language. If anyone can comment and/or offer solutions to these issues, I would greatly appreciate it.
Please excuse me for noting these shortcomings, whether perceived or real, from a PHP based perspective....that just happens to be the programming language I have the most expertise with so it is a convenient reference point.
1. Memory Management: Memory management appears to be completely manual, unless I am misunderstanding what I read. Is there any way to enable automatic garbage collection in a Cocoa app as is standard with PHP and Java?
2. NSString: This object appears to be missing a built-in regular expression package. I frequently use Perl and POSIX style regex in my PHP to handle a lot of parsing and searching. Can this be easily fixed and what would be involved in adding regex support to NSString?
3. High-End Database Integration: I very frequently utilitize MySQL during development in PHP. With PHP it is very simple to access data in MySQL (or any other DB server) through built-in functions and it is also possible to do similar in C++ through the use of the MySQL++ class. Can this be easily achieved in Cocoa or is there any workaround?
Know of any Cocoa quirks I should be aware of coming from a PHP background?
If you know of any other shortcomings that I should be aware of, I would appreciate knowing those, too. The easier it is for me to slide into Cocoa development the better as I am currently working a very heavy schedule that will leave me with very little time each week to become familar with the language and get around any problems.
Thanks in advance for any input!
I was recently reading over a post at Wikipedia that detailed a lot concerning Cocoa programming. As I read I came across what appears to be some shortcomings of Cocoa that I would like to try to address before I start programming with the language. If anyone can comment and/or offer solutions to these issues, I would greatly appreciate it.
Please excuse me for noting these shortcomings, whether perceived or real, from a PHP based perspective....that just happens to be the programming language I have the most expertise with so it is a convenient reference point.
1. Memory Management: Memory management appears to be completely manual, unless I am misunderstanding what I read. Is there any way to enable automatic garbage collection in a Cocoa app as is standard with PHP and Java?
2. NSString: This object appears to be missing a built-in regular expression package. I frequently use Perl and POSIX style regex in my PHP to handle a lot of parsing and searching. Can this be easily fixed and what would be involved in adding regex support to NSString?
3. High-End Database Integration: I very frequently utilitize MySQL during development in PHP. With PHP it is very simple to access data in MySQL (or any other DB server) through built-in functions and it is also possible to do similar in C++ through the use of the MySQL++ class. Can this be easily achieved in Cocoa or is there any workaround?
Know of any Cocoa quirks I should be aware of coming from a PHP background?
If you know of any other shortcomings that I should be aware of, I would appreciate knowing those, too. The easier it is for me to slide into Cocoa development the better as I am currently working a very heavy schedule that will leave me with very little time each week to become familar with the language and get around any problems.
Thanks in advance for any input!