iPhone development, using XCode just reminds me how sweat development using Borland Delphi was about a decade ago. iPhone development is really easier than other similar technologies such as Microsoft .Net or Java in my opinion. I am talking about developing for a mobile phone with its limited resources. I think Java is just like a big truck that designed to carry heavy loads over wide and long highways. However Objective-C development is just like driving a small size BMW in a mediterranean messy city. Every environment needs its specific tools and I think Objective-C is the best platform for Mobile phones (iPhone) size devices. The followings are simple reasons that makes iPhone development cool:
Event Driven Development
I love event driven programming style for developing any interactive application. You don’t need to provide a lot of unused methods in the server side. Also event driven code helps developer to bind UI components to the event handlers by the best possible way.
No Code for UI Components
XCode doesn’t generate any code for UI components. As we know Java Swing and .Net forms generate a bunch of code to do the same. I mean they generate a bunch of code to draw UI components. Whatever you see in a swing or .net form UI are just executed code. However, XCode interface builder just create an XML which consists all UI coordinations and components. So code gets more clear and smaller in compare with the others. You just define an outlet to bind a component to the handler. The outlet definition also comes into the interface. So implementation part just use it.
Getter/Setter methods makes ugly code. Fortunately, iPhone development solved this wisely. It synthesize getter/setters during compile time. This feature keeps the code clear, smaller and beautiful. Also see my previous post.
WYSIWYG Interface Builder
XCode provides us an advanced interface builder. I’ve worked with a lot of IDEs and I believe XCode is one of the best ones. XCode interface builder is just a perfect WYSIWYG UI designer. I think multiple tabs on library inspector confuse the developer which used to develop using other technologies. However everything goes fine after first tries. Swing developers after using XCode Interface Builder will find soon, how they are making pretty simple things by the most difficult way.
Objective-C is significantly faster than Java, .Net or any other virtual machine based language. Another fact which makes Objective-C faster than competitors is C itself. Objective-C is just a thin wrapper over C.
Objective-C Runs Smoother Without Garbage Collecting Heart Attacks
Objective-C runs standalone. It doesn’t need to any virtual machine. So the developer has to care about what he creates and what he releases. So you won’t meet any interrupt at the time of Garbage Collecting. There is not much garbages on the shelf, so there is no a garbage collecting process at all.
Passing By Value
Passing by value is really the cool, missed option in Java world. In Java we have to make a complete copy of a complex object by traversing its all properties using reflection or manually. However, in Objective-C copying an object is just a simple assignment.
Pointer in Objective-C is a powerful tool in hands of experienced developers. In java you don’t have pointers at all. Because JVM maps a logical memory location to the real one. So you never access memory directly. But, you can access under hood using pointers in C family languages.
Objective-C is the only practical option for iPhone development. There is no other choice and this is a big chance to developers to try how development can be sweat using Apple technology.