Home > 2010 Winter DPS913 > DPS913 lecture notes Wed Feb 10

DPS913 lecture notes Wed Feb 10

February 9, 2010 Leave a comment Go to comments

Now that you know something about a navigation-based application, we will build on that by using a table view. You will learn a design and coding pattern that will make this style of app easy to create.

.

Prepare for today’s class

Show up on time. Be alert and mentally agile. Be prepared to learn.

If you wish, you can look at some of the introductory readings in the DPS913 Virtual Textbook.

And, you can go through the digital content linked below.

.

Coming up in DPS913 / APD601

Fri Feb 12 – important – lecture topics continued, then work on Lab 4

Wed Feb 17 – introduction to Core Data

.

The importance of design and coding patterns

Today’s theme is “navigation-based apps that use a table view”.

These iPhone OS apps have many “moving parts”. As a result, you need to follow some design principles and coding patterns. Doing so will enable you to reliably and consistently create this style of app, with a predictable amount of effort. Additionally, your app will have good quality, and its components will be modular enough to enable reuse and replication.

Today, and in the next few lectures, you will learn about these design principles and coding patterns:

  • A view controller should include all its required behaviour (an obvious “given”), and it should also have the data it needs to do its job
  • This means you create a property to bear/hold the data it needs
  • Typically, its “parent” (in the navigation controller hierarchy) should provide/set the data
  • When preparing to activate the “next level” view controller (and its view), you should always follow a predictable set of three steps: 1) create the view controller instance; 2) configure it;, and 3) push it onto the navigation stack

There are a few other principles, patterns, and practices that you will encounter – be on the lookout for them.

.

Selecting the right Xcode app template

In the previous lecture, we introduced the navigation-based app style. We used the Xcode “Window-based Application” template. That was appropriate for the situation, because you needed to learn about navigation as an atomic topic, before moving on to more complicated scenarios.

From now on, we will use the “Navigation-based Application” template. This template includes a root view controller, with a table view. All of the components are configured to work right away. When using the navigation-based app template, the coding pattern is simplified – there are only three tasks:

  1. Configure the “root” view controller
  2. Create the next level, by a) creating and configuring its view controller (and optionally its view), and b) configuring its “parent” view controller
  3. Repeat Step 2 for as many levels as you need

.

Blog posts for today’s class

iPhone OS table view introduction

Data source choices for a navigation-based app style

Introduction to a navigation-based app with a table view

Multi-level navigation-based apps
.


Advertisements
Categories: 2010 Winter DPS913
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: