New Cocoa Programmers, iOS, Objective-C and Swift
It was not long ago when native apps development fascinated me. So I kicked off with basics of mobile apps development.
Gearing up for some solid learning. Starting with C++ and heading to iOS & Android. Future is full of more knowledge!
— Jabran Rafique (@jabranr) May 6, 2014
I started with reading through ecosystems of iOS and Android environments. As I read through ecosystems of both environments, I get a strong desire to start with iOS instead of Android despite having experience with Java and no experience at all with C family. So one could imagine that now days I am all about reading and practicing the iOS development.
I have to confess that originally it was C family syntax that held me start learning it. But as they say, to overcome a fear you have to go through it so here it goes. Objective-C definitely has extra long naming convention schemes which are bit awkward to write first but good part is that they are not only easily readable but also self explanatory. That means one can understand what actually is going on inside the method by just looking at the name of the method. For example:
- (void) didReceiveMemoryWarning { … }
As a web developer with history of working with a bit different kind of languages, some of the stuff in C family is both exciting and confusing at the same time. However, since all programming languages share the core concepts therefore it’s just a matter of getting familiar with new extra-lengthy-excitingly-confusing syntax.
But so far so good! I find it interesting and fun to learn Objective-C. Since I didn't have any clue about C family, I actually found this as a wonderful opportunity to learn one of those too. Therefore I have chosen C++ as a side learning with Objective-C.
Then comes WWDC 2014 where Apple announces Swift language in replacement of Objective-C. Given the reasons why they decide to orphan their 20 years old have created mix responses from Cocoa developers. As I am only warming up with it so I may not even qualify for making a response to this decision so instead I will only share my own exciting reasons.
One of the fascinating things in Swift seems to be eliminating the complex naming conventions and long typed syntaxes. In fact making it more alike JavaScript syntax – that is very exciting for programmers like me who are actually just turning to native mobile apps development. There is an excellent read about [Swift language syntax] (https://medium.com/programming-stories/swift-optionals-a10dcfd8aab5) on Medium by Matt Bridges.
Apple released a starter guide to learn Swift language – which actually is more than just a beginner’s guide. It is available at Apple app store and can be downloaded as an eBook from iTunes or iBooks.
Apple continues to support Objective-C and in fact it is possible to use both languages to build the apps. Getting a new easy to learn language doesn't mean that I'm going to just leave Objective-C and C++ in the middle. In fact I will carry on as usual and then adding Swift into this list eventually – just in time for iOS8 release in coming fall since it is the future of Cocoa apps.
Happy learning!