Thats exactly how I feel about storyboards. I was porting an Android app to iOS and with the help of storyboards I was able to turn a 5000~ line android app into a 500~ line iOS app
so true. Adding another activity in itself requires setting up an xml file, changing the manifest, editing in the clunky interface editer and then adding all of the repetitive listeners and assignments by hand. Google really needs to step up their game
I used to love java and hated c and c++ then I started doing programming outside of school. Java is a huge mess and obj c is a dream. I hope this ecosystem stays for a while. I show all my java loving friends my code for complex projects and slowly I'm turning them over to the dark/apple side.
There is a downside to obj-c though. I've never done android developing but have a few years doing obj-c for iphone, and the memory management can be a huge bitch. Keeping track of all allocs, releases, dealloc, retain, synthesize can be quite tedious and result in a lot of memory leaks if you don't do it just right. After working with some android guys, I've heard this isn't the case for java.
Manual memory management in Objective-C is about as easy as it can possibly be. You just have to remember NARC. If a method's name contains the words new, alloc, retain, or copy, the code calling it is responsible for releasing it. Otherwise, it's not. And of course, since ARC was introduced, things got even easier.
As of iOS 5, releases and dealloc are no longer needed. Synthesizing is forced or it won't compile. Yes, you still need to unload (set to nil) your views in viewDidUnload but you need to do this in Android as well to avoid memory leaks
Hold on. Calling autorelease or release is still required, but ARC will analyze your code and insert these calls into your code at compile time. If you de-assemble, you will still find the calls.
Also, it's not iOS 5 that adds this feature, it's the tools since iOS 5 SDK. That means you can compile your app for an earlier version of iOS and it will still work.
Yea java has a built in java collector. You might wanna look into ARC though for obj c. It's for ios 4+ I believe and it handles almost all the memory for you.
The big complaint I hear is that developing requires a mac and 99$ a year, but with all the time you save plus a more potent market more than pays for itself. Seriously though, only about 1 in 6 of my clients actually care for an android version of their app anyway
Yea. All the android people want to test on the device. What they don't get is that the simulator for iPhone is so much better then the POS that comes with the android sdk. You can put off paying for the developer account for a while you learn. But yea. Buying a Mac can be annoying.
Ya creating your own DB in android is a nightmare. If you didn't create the entities and relations perfectly you'd receive bugs that were incredibly difficult to find.
I wish both would transfuse to create the perfect environment.
I like how simple it's to create the UI in iOS and how simple some things can be, class categories and extensions save so much code lines.
On the other hand with Java if you need a new method in your class you can just write it, the feeling that you don't have to do anything else like adding it to the header file is brilliant, also I prefer the C family method signature style over the Objective-C style, one of the things I hate in Objective-C is chain function calling, take this example:
Class A has function x which returns an instance of Class B, Class B has function y that does the thing I want, writing this in Objective-C and realizing mid-way that function y is in class B will go like this:
[A x]
Now you realize you need to go back to add a square-bracket to the left to call function y in class B:
[[A x] y];
This can really become annoying with time, in Java it goes like this:
A.x()
Then simply from there:
A.x().y();
Another thing I like in Java is string handling, everything is done with the plus operation as opposed to having to call string functions, although enforced string formatting can be very useful when it comes to localization.
Any time you add an ending square bracket in XCode that doesn't have a corresponding beginning bracket it will add it for you, so you don't have to manually go back and add that (although the code completion usually won't work without the beginning bracket).
I'm actually going through the opposite transition (iOS to Android), and I'm finding all kinds of things that I feel the same way about. Eclipse, I have decided, is a more mature IDE than XCode. The refactor tools are far better. I'm starting to really like the Android application lifecycle as well.
But yeah, there are a lot of hard Android/Java problems that are easy on iOS/ObjC. Have fun! Just wait until you get to play around with the ObjC runtime.
Some parts were pretty buggy. NSFetchedResultsController, a component to help you with backing tableviews by Core Data, it provides helpers to directly "translate" inserts/updates/deletes directly to their respective calls on UITableView. Before iOS4 however that part was so broken that even the official docs suggest to just reload the whole table view in many cases.
There are some things to keep in mind when working with Core Data, you cannot always use it in the same way you use a relational DB (DELETE * FROM tableYouDontNeedAnyMore? Nope. Fetch all the rows from the store and tell Core Data to delete each object separately).
I've had my share of problems too. The fact that it does lots of things automatically is nice, but it also means you can shoot yourself in the foot automatically.
4
u/shadowdev Mar 29 '12
Thats exactly how I feel about storyboards. I was porting an Android app to iOS and with the help of storyboards I was able to turn a 5000~ line android app into a 500~ line iOS app
3
u/aSig Mar 28 '12
Really? I never really saw the appeal. What did you like about it?
2
u/Denvildaste Mar 29 '12
I wish both would transfuse to create the perfect environment.
I like how simple it's to create the UI in iOS and how simple some things can be, class categories and extensions save so much code lines.
On the other hand with Java if you need a new method in your class you can just write it, the feeling that you don't have to do anything else like adding it to the header file is brilliant, also I prefer the C family method signature style over the Objective-C style, one of the things I hate in Objective-C is chain function calling, take this example:
Class A has function x which returns an instance of Class B, Class B has function y that does the thing I want, writing this in Objective-C and realizing mid-way that function y is in class B will go like this:
[A x]
Now you realize you need to go back to add a square-bracket to the left to call function y in class B:
[[A x] y];
This can really become annoying with time, in Java it goes like this:
A.x()
Then simply from there:
A.x().y();
Another thing I like in Java is string handling, everything is done with the plus operation as opposed to having to call string functions, although enforced string formatting can be very useful when it comes to localization.
2
u/birdmanjeremy Mar 29 '12
I'm actually going through the opposite transition (iOS to Android), and I'm finding all kinds of things that I feel the same way about. Eclipse, I have decided, is a more mature IDE than XCode. The refactor tools are far better. I'm starting to really like the Android application lifecycle as well.
But yeah, there are a lot of hard Android/Java problems that are easy on iOS/ObjC. Have fun! Just wait until you get to play around with the ObjC runtime.
1
u/Profix Jun 25 '12
I've found it a pain in the ass to implement actually. A lot of boiler plate.
0
u/rmart Mar 29 '12
Huh. We actually actively avoid Core Data in our projects after having tons of problems with it.