iOS programming assignment specifications 1

Assignment specifications document 1.

.

This is the first specifications document for the programming assignment.

Here is a link back to the programming assignment introduction.

.

Next due date, expectations and marking guide

The next due date and time is Wednesday, March 19, 2014, at 12:00pm ET (noon).

Plan to do the following. (If you do more, that’s OK.)

  1. Initial scene is ‘login’
  2. After login, display a list of players
  3. Drill down to player information
  4. Drill down to a list of equipment for the player

Submit your work by uploading to the My.Seneca/Blackboard link. The upload link will disappear after the due date and time, so don’t be late!

.

Getting started

The GitHub repository of code examples has a new ClassesV4 project in the “Project_Templates” folder.

You can use that as the template for your project.

Rename the ClassesV4 project to “Equip”, using the procedure that’s documented in the project.

.

Entities

For this ‘deliverable 1’, you must create an object model with the following entities:

Team – information about a hockey team.

Player – descriptive information about a hockey player.

EquipmentCategory – statically-configured list of equipment categories, to be used in various parts of the app.

Equipment entities… Create an abstract entity named Equipment. It will have properties that are common to all equipment categories.

entity-abstract

Then, create entities for the following equipment categories, and ensure each their “Parent Entity” setting is the abstract entity above, “Equipment”.

entity-inherits-from-abstract

List of equipment categories (create an entity for each):

  • Helmet
  • Gloves
  • SkateBoot
  • SkateHolder
  • SkateRunner
  • Stick

If you need a reminder about model object inheritance, see the topic in the March 13 class notes.

.

Entity relationships

In the app, Team is not related to any other entity.

EquipmentCategory is not related to any other entity.

A Player has a to-one relationship with each equipment entity (i.e. Helmet, ShoulderPads, etc.).

Each equipment entity (i.e. Helmet, ShoulderPads, etc.) has a to-many relationship with a Player.

.

Entity definitions

For this deliverable 1, ensure that your entities include at least these attributes.

Most attribute types are strings, except where noted.

In addition, every entity needs an integer attribute to hold the host web service object identifier. Name it “wsObjectId”.

Team

  • city
  • teamName
  • nameOfEM (equipment manager)
  • username
  • password
  • loginToken
  • loginTimestamp (Date)

EquipmentCategory

  • displayOrder (Integer 32)
  • displayName
  • displayIcon (Transformable, using the ImageToDataTransformer)
  • nameOfEntity

Player

  • lastName
  • givenNames
  • photoHeadshot (Transformable, using the ImageToDataTransformer)
  • jerseyNumber (Integer 32)
  • position
  • handedness
  • playingStatus
  • birthDate (Date)
  • height (Integer 32)
  • weight (Integer 32)

Equipment (abstract entity)

  • manufacturer
  • brand
  • modelCode
  • orderCode
  • colour
  • photo (Transformable, using the ImageToDataTransformer)

Helmet (this and the remaining entities use Equipment as their Parent Entity)

  • size (Double)
  • faceProtector
  • chinStrap

Gloves

  • size (Integer 32)
  • length (Integer 32)

Stick

  • pattern
  • leftRight
  • curve (Integer 32)
  • flex (Integer 32)

For skates, we should probably divide the entity into three, one each for boot, holder, and runner.

SkateBoot

  • size (Integer 32)
  • stiffness (Integer 32)
  • width

SkateHolder

  • size (Integer 32)

SkateRunner

  • size (Integer 32)
  • contour (Integer 32)
  • hollow (Integer 32)
  • pitch (Integer 32)

(For deliverable 2, we will add a few more entities.)

Here’s the graph-style editor view of your professor’s entity definitions:

  • The lines with arrowheads pointing to Equipment indicate an inheritance relationship
  • The other square-cornered lines indicate to-one and to-many relationships

Click to open the diagram full-size in a new tab/window.

entity-diagram-deliverable-1

.

Functionality required for this part of the assignment

As noted above…

The app’s initial scene is ‘login’. After login, display a list of players.

Allow drill down to player information.

Allow drill down to a list of equipment for the player.

.

Login to the app

A user must login to use the app. Therefore, a ‘login’ scene must be displayed when the app is launched for the first time.

The first scene of the (ClassesV4) project template is a list (managed by a table view controller).

We must change that startup, by adding a new scene and controller. Here’s what you will do:

  1. Add a new controller
  2. Add and configure a new scene
  3. Change the app delegate startup code

Here’s some more detail.

.

Add a new controller

Add a new controller to your project. It will be a subclass of UIViewController, and its name will be Login.

.

Add and configure a new scene

On the storyboard, (click-drag-drop to) add a “View Controller” object to the storyboard, and position it near the navigation controller on the left side.

Select the new View Controller object, and on its Identity Inspector, set its Custom Class to Login (which is the name of the new controller class you added above).

Next, click/select the segue object that connects the navigation controller scene to the scene managed by the EntityList controller. Delete it.

Now, arrange the three scenes so that they are aligned side-by-side. Use the layout guides. From left to right, you will have 1) the navigation controller, 2) the Login scene, and 3) the EntityList scene.

scenes-side-by-side

Next, click/select the navigation controller scene. Control+click-and-drag, from the yellow controller icon in the scene dock, to the new Login scene.

segue-nav-to-login

On the popup, choose Relationship Segue > root view.

Now, click/select the Login scene. Control+click-and-drag, from the yellow controller icon in the scene’s dock, to the EntityList scene.

segue-login-to-entitylist

On the popup, choose Manual Segue > push.

Finally, click/select this new segue, and on the Attributes Inspector, name it, using the same name that was used before, “toEntityList”.

The storyboard scenes should now look like the following. Click to view full-size in a new tab/window.

storyboard-with-login-scene

Now, you can iteratively edit the Login scene and controller to add, configure, and code these user interface objects:

Text field – for the username; outlet; Control+click-and-drag from the text field to the yellow controller icon in the scene’s dock

Text field – for the password; in its Attributes Inspector, check/mark the “Secure” property; outlet; Control+click-and-drag from the text field to the yellow controller icon in the scene’s dock

Button – for the login action

Activity indicator – shows login progress to the user; in its Attributes Inspector, check/mark the “Hides When Stopped” property; outlet

Label – used to display login progress status messages to the user

Follow the guidance and suggestions in the Login example app (which is in the GitHub code example repository’s Week_09 folder), and write code for the Login controller.

.

Change the app delegate startup code

You must change the app delegate startup code. The Login scene must be displayed first, so edit the application:didFinishLaunchingWithOptions: method.

.

Deliverable 1 – initial data for the app

In the store initializer class, write code to create these objects:

  • one (1) team object
  • five (5) player objects
  • objects for the ‘equipment categories’

Looking for data? Visit any team web site from the NHLAHLECHL, or CHL, and add a team and five players (one of which must be a goalkeeper).

The ‘equipment categories’ object collection will be initialized here too. The displayOrder attribute will used for sorting, so you should assign values so that an ascending sort shows the equipment categories from head (top) to toes (bottom) (and then put the stick equipment category below that. We suggest that you leave gaps between displayOrder attribute values (e.g. 10, 20, 30, etc.), so that future equipment categories can be accommodated without extensive data editing.

You do NOT have to create “Helmet” or “Stick” objects in deliverable 1. Just the ‘equipment categories’.

In the model class, add a property for the team object.

Also in the model class, add a fetched results controller for the player objects.

.

General functionality of the login process

Use the team object (from the model object) to compare username and password values with the user-entered values.

If you need a reminder about how to configure a standalone fetch request, see the topic in the March 13 class notes.

Incorrect credentials are rejected, and the user is notified (using the label user interface control).

An activity indicator control is used. Also a label control to communicate status to the user.

You may be wondering why we are working with an activity indicator. It’s for the future. In the future, we will authenticate by using a web server in some situations. That’s a process that may take a few seconds, so we’ll communicate status to the user.

Update the ‘most recent login date and time’ value in the team object.

At the end of this scenario, the ‘list of players’ scene will load.

.

List of players

Display the list of players in a table view.

Tapping anywhere on the row – except on the detail disclosure control – will drill down to a list of equipment categories.

In addition, details (information) view. Each row uses a detail disclosure control:

Tapping the detail disclosure control will drill down to a player information view.

This topic – detail disclosure button – is covered in the March 13 class notes.

.

Player information

Display player information in a standard view, that has been configured with a Scroll View user interface object.

The topic scrollable view is covered in the March 13 class notes.

.

Player’s equipment

Display player’s equipment categories in a table view. For this deliverable 1, you do not have to navigate any deeper.

.

Submitting your work (to My.Seneca/Blackboard)

Follow these instructions to send me your work:

  1. Make sure your project works correctly
  2. Locate your project folder in Finder
  3. Right-click the folder, and choose Compress <ProjectName>, which creates a zip file (make sure the zip file is fairly small, around 500KB or less)
  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 )

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: