Johannes Fahrenkrug

author
+ Follow
since Mar 07, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Johannes Fahrenkrug

Haha, thanks, John, I fixed it
12 years ago
iOS
Hi Marco,

having knowledge on a different mobile platform is very valuable: You already know about the hardware constraints of a mobile platform and the different UI/UX patterns on mobile devices. When it comes to the APIs, however, iOS is quite different from Android.

And yes: one application is developed throughout the book. Some chapters build some stand-alone applications as well, though.

- Johannes
12 years ago
iOS
Hi Fei,

no, it's not good. It's AWESOME! There is no performance hit, since it happens at compile time, not at runtime.
Watch this video from WWDC 2011 about it: https://developer.apple.com/videos/wwdc/2011/includes/introducing-automatic-reference-counting.html#introducing-automatic-reference-counting

Cheers,

Johannes
12 years ago
iOS
Yes, it's very well suited for you. It doesn't waste a lot of time on super-basic stuff. I think with your background in C# you'll be the perfect audience for the book!

- Johannes
12 years ago
iOS
Hi Raghavan,

Wikipedia actually gives you a pretty good rundown on what Obj-C is: http://en.wikipedia.org/wiki/Objective-C

About memory management: On Mac OS, Obj-C has an (optional) garbage collector. iOS does not have a garbage collector, but something better is coming in iOS 5: ARC. ARC will automatically put instructions for retaining and releasing memory into your program when you compile it. So from a developer's perspective it's like garbage collection just with the big advantage that there's actually no garbage collector at runtime.

- Johannes
12 years ago
iOS
Hi Raja,

I have only written parts of the book, so some of the other authors might be more suitable to answer this question, but I'll try:

1. Performance is considered throughout the book and there's a whole chapter about concurrency with GCD.
2. No, to my knowledge those topics are not covered. The book focuses more on the low-level language stuff, plus _some_ frameworks like Core Data for data persistence.
3. I'm not sure what you mean.
4. Nope.

- Johannes
12 years ago
iOS
Hi Dipika,

probably not. This book is about Objective-C, which is a different language than C. It has an appendix about some C-basics, but the whole book focuses on Objective-C.

Cheers,

Johannes
12 years ago
iOS
Hi Adrian,

no, you can't use Java to develop iOS applications. The book we're promoting here would be a great way for you to start
This might also be an interesting read for you: http://www.jeviathon.com/2011/01/why-i-prefer-ios-development-over.html

Apple's "Your first iOS application" might be a good start, too: http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iPhone101/Articles/00_Introduction.html#//apple_ref/doc/uid/TP40007514-CH1-SW1

Or the Stanford courses: http://www.stanford.edu/class/cs193p/cgi-bin/drupal/

Enjoy!

- Johannes
12 years ago
iOS
Hi Eduardo,

honestly, I don't even know how to answer that question, but I'll try:
It's like asking "Why should I bother learning German if I already know English?" Maybe you want to talk to people in Germany, Austria and Switzerland? Maybe you want to order a meal at a restaurant there? Maybe you want to move there or open a business?
Just as learning new spoken languages is either useful or necessary, depending on what you want to or have to do, so is learning new programming languages.

You want to use Ruby on Rails? Well, you'll need to learn Ruby because Rails happens to be written in Ruby.
You want to use SproutCore or jQuery? Well, you'll need to learn JavaScript.
You want to develop for the Mac or iOS? Well, you'll need to learn Objective-C because all of the Cocoa frameworks are written in Obj-C (or C).



So, to sum it up: You don't have to learn Obj-C if you don't want to develop for iOS. If you want to stick with Java, you should check out Android. But if you do want to develop for iOS, you have to learn Obj-C (unless you use something like Titanium or make HTML5 apps, but then you'll have to learn JavaScript ).

Cheers,

Johannes
12 years ago
iOS
Hi Rogerio,

no, there's no automatic way. Android and iOS not just use different languages but fundamentally different frameworks and UI concepts. Automatic conversion is impossible.

@Carlos: You might want to check out Titanium (http://www.appcelerator.com/). SproutCore (http://sproutcore.com) is also a great option to build mobile apps using HTML5 and web technologies. That might not be the right way for all applications, but is definitely an option for some.

- Johannes
12 years ago
iOS
Hi Bill,

yeah, it's hard to keep up with everything, who are you telling ;-)?
So the book has been updated to Xcode 4 (it was initially started to be written for Xcode 3).

About resources: Definitely get the free WWDC videos from this and last year: http://developer.apple.com/videos/ They are incredibly great resources!
Also the Standford iPhone Development videos are great: http://www.stanford.edu/class/cs193p/cgi-bin/drupal/

Cheers,

Johannes
12 years ago
iOS
Hi Joei,

thanks for your question. Especially the first chapters build on one another and you should read them in order. Some of the later chapters (about GCD, Core Data or error handling, for example) can also be read on their own and just expect you to have fundamental Obj-C knowledge that you will have gathered in the first chapters.

- Johannes
12 years ago
iOS
Yes, it was written based on iOS 4. Since Apple imposes an NDA, we wouldn't even be allowed to write about iOS 5 specific stuff.

Just about everything that's covered in the book is the same in iOS 5, though. The book focuses on the language Objective-C, and that language will not change from iOS 4 to 5, except for a few additions for ARC (automated reference counting).

It won't be outdated and obsolete once iOS 5 is released.

- Johannes
12 years ago
iOS
Hi Daren,

great question. I've worked with Python a while ago and I really like the language. While I really like Objective-C, I by no means think that it's the One And Only True Language(tm) and that you should use it for everything. Always use the right tool for the job. For iOS development that happens to be Objective-C (at least primarily when you want to build native apps).

About the similarities:
- Both are object oriented, with classes and objects
- That's about it ;-)

The differences:
- Obj-C is C-based, you can mix and match Obj-C and C, even C++ and use lots of open source C-libraries in your Obj-C code
- Obj-C does not have namespaces (no packages). That kinda sucks, but in practice it's not as bad as it sounds.
- Obj-C is not a scripting language, it has to be compiled (which makes for very fast programs, but adds a compiler and linker step to your workflow)
- Obj-C uses square brackets. So calling "drawCircle" in Python is "foo.drawCircle(25, 50, 33)." In Obj-C: "[foo drawCircleAtX:25 y:50 radius:33]". Those named arguments make it a lot more readable, imho.
- Obj-C has "categories", which enable you to change existing classes (even of system libraries). I guess Python can do that, too.
- Obj-C has no significant whitespace
- Obj-C has no garbage collector on iOS. But a new addition for iOS 5 called "ARC" will mostly make manual memory management unnecessary
- Esp. string and array operations can be written in a much more concise way in Python than in Obj-C

This is probably not a complete list, but gives you an idea.

But in general this is my opinion: it takes time to learn the frameworks and the APIs, not so much the language. Even if Apple (or someone else) would support Python for iOS development one day, you'd still need to learn the CocoaTouch frameworks. So I'd say don't shy away from learning a new language, it's not that hard.

- Johannes
12 years ago
iOS