I started using Xcode at the beginning of this year. At that point it was Xcode 3.2, and besides the standard concepts of Objective C, everything has changed since then.
Just when I got a grip of Xcode 3, Apple launched Xcode 4. An all new "One Window" experience with a lot of new features to learn. This confused an already confused programmer, but I powered through and started loving Xcode 4.
During the spring I developed my first iOS app called "Soffning" for a school project. It was a great project to start with. It had a lot of ViewControllers and became quite big at the end, and it really gave me a feeling of satisfaction when I was able to demonstrate this app for an entire class of peers, that I at least hope, was impressed.
During the summer I've been working as an sound engineer and has not been able to write as much code as I hoped I would. Now when the autumns here I've been getting back into the game and Have been starting to form a game plan for this years off-hours programming.
I will try to develop modules rather then entire applications during this fall. Modules that can be reused in coming projects. The first of these modules I call "Server Connector"
Server Connector will be an app for both the iOS and Mac OS X Lion. The app will in it self be quite useless, but will in a longer run hopefully prove to be a time saving resource.
Most of my planned applications will connect to an online PHP/MYSQL server for communication. And "Server Connector" will do exactly what the applications name promises. It will connect the application to a Server. Why is this useful?
- To save time and not having to rewrite the backend for each application that uses a server connection
- By having the code divided into modules/components it’s easier to update and stay organized. If you fix a bug in the server connector it applies to all applications that uses that module.
So, back to topic, I’ve started developing this module in the Xcode 4.2 Beta. And yet again I’m facing a lot of new stuff from Apples side. The major differences are as follow:
- ARC. Automatic reference counting. As you might know garbage collection isn’t available when you develop to iOS, which means that YOU have to keep track on when to release/destroy your objects. This is a double-edged sword, but Apple is trying to make it easier for developers by introducing ARC. With ARC you no longer have to manage your own releases. The system does that for you. That does not, however, mean that ARC is garbage collection. Just an automatic system for releasing objects.
In my opinion this system has potential, but there are still some question marks that needs to be sorted. I do however raise a question to Apple here. If they intend to hide object management this well, how will new programmers be able to learn and tackle problems related to Reference counting and memory leaks. To conclude, it’s a pain in the ass to take out your own garbage, but it gives you control over the application and you’ll learn a lot by doing it yourself. I’m glad a learned to write Objective C in the pre-ARC-era.
- Storyboarding. The next step for interface builder. My guesses are, that I will love this system once Apple get the bugs sorted out (And there are a lot, it crashes five to ten times a day.(I Know,it's only a beta.) and I get a grip on the fundamentals. Storybording let’s you develop your entire applications GUI in one window where every screen is called a “Scene” and every transition between “Scenes” are called segues. What it let’s you do is to design the interface without having to write a bunch of code. This is extra great in iOS though the number of ViewControllers very quickly can become hard to manage. Storyboarding together with ARC and weak referencing speeds up the process of designing GUI a lot. In theory there are some worrying signs of this new system though. It all becomes a little…hmm.. can I say Adobe (Flash) with all it’s dragging and dropping. And In my experience the easy isn’t always the best. When Apple use this approach and hides a lot of the code It also makes you feel a bit out of control.
Server Connector uses both ARC and storyboarding. My timeframe for this small application is only one week. It’s, as I pointed out, a very simple application. In that week, time for commenting code and make it accessible is also committed.
Download the project at my GitHub and give me idea and criticism if you like to.
And as always (Twice so far =): Code On!
//Objective Coder
Inga kommentarer:
Skicka en kommentar