TIME FOR SOME PROGRAMMING!!!!!!!


          Programming is the next, and most time consuming part of the app creation process. This is where my app comes to life and actually works. The programming aspect at this point is fairly mechanical, though difficult for a novice iPhone programmer (myself). So, up until now, all I have been doing is reading Apple's extensive documentation (believe me when I say extensive) to learn the language that iPhones use. This language is called Cocoa Touch and it has a Objective-C framework.  

          Cocoa Touch is an object oriented computer language that is more commonly used to program iPhone apps. It requires a background in C, and a fairly good understanding of computer programming. The IDE (software used for programming) that is required for programming iPhone apps is called Xcode and is provided by Apple, free of charge. Xcode provides a multitude of features including live compiling and app execution without the presence of an actual iPhone. Of course, there will be an iPhone needed to test the app after creation to make sure it is optimized for the user. 

          Before starting on my app, and after reading some Apple documentation, I realized that my app would be using a model-view-controller as its basic framework. The "model" contains the data behind a specific object that can be either created or modified. The "view" is the element that user sees and can interact with. The "view" is able to take in user commands, such as text when the user types or a button response when the user taps a button. The last part, the "controller" comprehends the data from the "view" and transfers it to the model. When the "model" gets the information and changes based on the information, this change is transferred to the "view" with the controller. Below, you can see the different relationships between the model-view-controller. Basically, the "model" gets updated when there is an user action by the controller. The model then notifies the "controller" of the update to the model, and the controller then updates the view based on the model. 



(picture from Apple Documentation
Image of Model-View-Controller to show all of the connections

          The second necessary feature that the Apple documentation revealed was "storyboarding". This feature allows the user to create a visual representation of the apps user interface, with each of the screens and transitions that are part of the app. After the visual representation is created, each element is programmed with its functionality, so that it can work. In the representation there are two main elements, scenes and segues. A scene, as shown in the image below, shows the app a given time. Imagine taking a screenshot of an app on its home screen. Everything in that screenshot would be in the scene portion of the app. In the storyboard, the user creates each scene that is part of the entire app. The second main element of the representation is the segues between the scenes. A segue is basically the transition between scenes that the user sees when clicking on an element. For example, if there is a button that opens up a popup window in the app, the segue would be the popup effect that the app user would see upon clicking the button. By combining the scenes and segues in the storyboard, it allows for the design aspect to be created visually, and then it can be programmed by targeting each of the different elements in the scenes and segues. 



(picture from Apple Documentation)
Shows the different scenes and segues that are used in app creation


          The last and arguably the most important feature that I came across in the Apple documentation was "core data", which is the database that apps use to save information in. In my app, it is important that the when the user enters in a homework assignment, or an after school meeting, the assignment or meeting entered doesn't disappear when the user exits the application. To address this issue, all of the information that an user enters must be stored in a database and the fetched whenever the user opens the app to check for the selected item. This is when core data comes in to play. Core data will save the user data in an XML file, and then the data will be fetched from the XML file to present it to the user. This becomes crucial when managing multiple assignments or after school meetings as it creates a storage hub for these different elements. 

          After learning the purpose and functionality of each feature, the next step I took was learning how these features work in Xcode. To do this I used the video tutorials from Team Treehouse to learn about each and everyone of these features. These tutorials were really helpful and taught me the coding basics behind storyboarding and core data. Check out some of their videos if you would like to see the above concepts in more detail with the programming aspect as well.

          As the learning behind the programming comes to a close, it is finally time to actually start programming the app. See you guys in my next entry!


SOURCES:

- Apple Documentation (the best source for learning about iOS programming and it's included with XCode)

- Team Treehouse (video tutorials for Xcode and iOS programming)

4 comments:

  1. Yo Mayank! After reading this post, I understand what you mean by "extensively". Jammed-packed with information, this post did a good job of giving me, as the reader, a good understanding of what is next on the path to creating an iPhone App. From your research I can tell that in oder to succeed, you are going to have to closely follow Apple's model as you create the app so that you hace the best chance to succeed. As challenging and demanding as this part of the creation process sounds, your passion is obvious and I definitely think that you can handle it.

    ReplyDelete
  2. This is very interesting so far. Like Robby said, there does seem to be a lot of information. As you are learning the basics of GUI, will you be designing your own interface, how do you plan on doing that? Also, do you plan on ever publishing this app to the Appstore? That being said, what you are doing is very interesting. Having used Xcode very briefly myself for C++, I can say it is easy and intuitive, and should not be of much hindrance. I cannot wait to see some graphics work! You also said that Cocoa is an object oriented language, this mean you will be coding multiple classes, which ultimately means more work. Keep up the good work, and good luck.

    ReplyDelete
  3. Hey Mayank. It looks like you've got a lot of work ahead of you, but the fact that you laid out so well everything you needed to do should make it a bit easier for you. Getting used to the model/view/controller framework is going to be one of the toughest parts of your project. I remember being introduced to something similar in advanced computer applications last year and I was incredibly confused. Don't let it get to you though, with a bit of practice you can get it down. When it comes to segues, I also agree that they are very important to an app. Some transitions are more user friendly than others, and having good transitions can lead to more people enjoying your app. Good luck building your app.

    ReplyDelete

 
iOS Programming:
App Development
© 2012 | Designed by LogosDatabase.com, in collaboration with Credit Card Machines, Corporate Headquarters and Motivational Quotes