DPS923 MAP523 Assignment 1

Assignment 1 information.


Assignment 1 topic

The Toronto area will host the Pan American Games in July 2015.

Your app will enable a user to get information about the Games, and participate in Games-related activities.

Visit the Pan Am Games web site to learn more.


Assignment 1 due date

There is an interim progress due date, and a final due date.

Your interim progress will be assessed in-class on:
Thursday, March 12, 2015, at 9:50am ET

The final due date is:
Tuesday March 24, 2015, at 9:50am ET


Task 1 – discussion

The premise of the assignment is to display information about the Pan Am Games Sports and Venues.

A future version of the app could include other features, such as news feeds, event information, and social media integration.


Task 2 – design

Next, we will design the user interaction experience, and the app’s scenes.

The concept of a ‘launch’ scene will be introduced. An example is in the Week 7 folder of the course’s GitHub code example repository.


Interim progress requirements

On March 12, your professor will inspect your work. We are looking for the following functionality and features. It’s OK if your app includes more than the items on this list.

Completed object model for the app’s data.

Completed storyboard and navigation scheme.

Some initial data.

Deployed to a device.


Final requirements

Above, plus:

Load data from the web service.

Display list and details for all Sports.

Display list and details for all Venues.

Evidence of care and craftsmanship, and a suitable user interface.


Getting started

During class, we will get started on the project.

Use the ClassesV2 template to create a project named “Toronto 2015”.

As you know, the template’s initial controller is a table view controller, “ExampleList”. We will add a standard view controller, named “Launch”, and configure it to be the app’s initial view controller.

First, add a new item to the project. It will be a Cocoa Touch Class, named “Launch”. It will be a subclass of UIViewController (a standard view controller). Add a “model” property to this class’s source code.

On the storyboard, drag the navigation controller to the left, enough to open up a space for a new controller rectangle. Then, select the segue that joins it to the ExampleList scene, and delete the segue.

Next, add a “View Controller”, and position it between the navigation controller and ExampleList. Select the view controller item in its dock, and on the Identity Inspector, set its Class property value to the new controller, “Launch”.

Select the navigation controller item in its dock. Ctrl+click+drag to create a segue (relationship segue, root view controller) to the new Launch scene.

Add buttons or some other user interface to the Launch scene. These buttons will enable navigation to a “Sports” list, and a “Venues” list. For now, we can re-use the existing ExampleList controller, to demonstrate how this is done.

Select one of the buttons, then (Ctrl+click+drag) create a (push) segue to the ExampleList scene. Make sure that you set the segue identifier to a suitable value (e.g. “toSportsList”).



A video that shows how to do this has been posted (see below). Its technique is a bit different than the one shown in class, so watch the video and modify your app to match it.


Data for the app

Your professor will create a web service to hold data about Sports and Venues, and maybe Events:


However, your professor will not enter the data. You will help with that. Your professor will send you an email, and ask you to enter about ten (10) data items, which will take you less than one hour. (The data source will be the Pan Am Games web site.) Spreading the work among the students in the class will result in a good and usable database for the benefit of all.


Entities, version 1

Your app will need a small number of entities. To get started, you will create a Sport entity, and a Venue entity.

Show the Core Data Object Model Editor. For now, you can leave the existing Example entity, but we will remove it later.


If you change your object model, delete the app from your device or simulator, before you attempt to run it.


Add a Sport entity, perhaps with these attribute configurations. Notice that the data type for ‘logo’ and ‘photo’ is “Binary Data”:




Then, add a Venue entity, perhaps with these attribute configurations. Notice that the data type for ‘map’ and ‘photo’ is “Binary Data”:




Entity relationships, version 1

Sport and Venue are related. How? Many-to-many.

A sport can take place at one or more venues.

A venue can host one or more sports.

How to configure?


Add the relationships

Select the Sport entity. In the Relationships panel, (click the + button to) add a relationship. Its name will be “venues”.

Select the Venue entity. In the Relationships panel, add a relationship. Its name will be “sports”.

Now we will configure these relationships. We have to configure both ends of the relationships.


For the Sport entity, configure the “venues” relationship

Important configuration items:

  • optional
  • Destination: Venue
  • Inverse: sports
  • Type: To Many



For the Venue entity, configure the “sports” relationship

Important configuration items:

  • optional
  • Destination: Sport
  • Inverse: venues
  • Type: To Many



Data for the app

As noted above, your professors will create a web service to deliver initial and ongoing data to your app.

Sports data is at this URL:


Use the URL above when you load all Sports into your app.

FYI – if you’re looking for only one Sport, add its identifier to the URL above. For example:


Venues data is at this URL:


FYI – if you’re looking for only one Venue, add its identifier to the URL above. For example:


You will actually want to use the following URL when you load all Venues into your app, which includes the Sports that are related to each Venue.



Add ‘list’ and ‘detail’ controllers for each entity

Add these controllers:

  • SportList – table view controller subclass
  • SportDetail – view controller subclass
  • VenueList – table view controller subclass
  • VenueDetail – view controller subclass

For each, you can use the source code in the “Templates” text files in the project, to ease the process of writing code for your controllers.


Change the storyboard

Add scenes for these new controllers. DO NOT modify the existing ExampleList and ExampleDetail scenes. Add new scenes.

Configure them in the desired segue relationships:

  • Launch (Sports button) to SportList to SportDetail
  • Launch (Venues button) to VenueList to VenueDetail


As noted above, use a simple array (of strings or dictionaries) in your table view controllers, so that you can display some initial data.


Load data from the web service

Use the technique you learned on March 17 to fetch data from the web service and load the data into your app.

You have permission to use the code in the Toronto 2015 code example’s “Launch” controller methods:

  • checkForDataOnDevice()
  • fetchCompletedSports()
  • fetchCompletedVenues()


Display list and details for all Sports

Fully implement the ‘list’ and ‘detail’ functionality for Sports.

Yes, you should display small icons for each Sport on the ‘list’.


Display list and details for all Venues

Fully implement the ‘list’ and ‘detail’ functionality for Venues.

Yes, use the ‘Subtitle’ table view cell style.


Submitting your work

Follow these instructions to submit your work:

  1. Make sure your project works correctly
  2. Locate your Toronto 2015 project folder in Finder
  3. Right-click the folder, and choose Compress “Toronto 2015”, which creates a zip file (make sure the zip file is fairly small)
  4. Login to My.Seneca, and in this course’s Assignments area, look for the upload link, and submit your work there
















  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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

%d bloggers like this: