Module Outline
Use the following resources and work with your mentor to master the objectives for this module. Practice by completing the Mini-Project, Project, and Challenges.
Objectives
- You will be able to use basic best practices for proper database design
- You will be able to describe and implement the Core Data stack from scratch
- You will be able to describe, identify, and implement proper Model-View-Controller principles
- You will be able to systematically plan out each class needed for an MVP product
Part 1
The Core Data framework provides generalized and automated solutions to common tasks associated with object life-cycle and object graph management, including persistence.
Part 2
Review the MVC and planning process to build a simple Task app. This planning will carry over to the accompanying project.
Required Preclass Resources
- Introduction to Database Design
- 11 Important Database Designing Rules
-
Core Data Programming Guide
Read 'Getting Started' and 'Integrating Core Data with iOS'
- Getting Started with Core Data Tutorial
-
Stanford iOS Development MVC Description
Watch from 13:30 - 29:55.
- Apple's MVC Documentation
- Understanding Model-View-Controller
- DevMountain App Canvas
- Core iOS Application Architectural Patterns
Lesson Video
Preclass Videos
-
iOS Cohort - Andrew Madsen
Intro to Core Data - Part 1
-
iOS Cohort - Andrew Madsen
Intro to Core Data - Part 2
-
iOS8 Cohort - Andrew Madsen
Part 1 - Core Data
-
iOS4 Cohort - Caleb Hicks
Part 2 - MVC Planning and Review
-
iOS5 Cohort - Andrew Madsen
Part 1 - Core Data
-
iOS4 Cohort - Andrew Madsen
Part 1 - Core Data (alternative)
Video Challenges
-
Extremely Simple Core Data
Redo the last part of the teacher demo independently.
- Create a new project
- Add a UITextField to the initial scene with an IBOutlet
- Add a 'Save' button to the scene with an IBAction
saveButtonTapped()
- Create the Model
- Add a 'Person' model object with a 'name' attribute
- Import the Stack file
- On save, create a new Person object using
NSEntitiyDescription
- On view did load, initialize and execute a fetch request and set the text field text
-
Plan MVC Architecture for a Family Recipes App
Draw the MVC triangle. Take 5 minutes to think through a simple Family Recipe App listing favorite family recipes. What type of model objects are there? What types of views are there? What View Controllers are there? What model controllers would be helpful? Add each of them to a list. Discuss with your neighbor.
Stretch Problem
Number Printer
Create a function that takes an Int
as a parameter and prints it to the console the way an old-school alarm clock would look. You may create auxilary functions.
e.g. If you pass 257 the console might look something like this:
--- --- ---
| | |
--- --- |
| | |
--- ---
♦ Black Diamond
Modify the function to take an Int
array and print each number in the same fashion but on its own line.
Guided Project
Playlist Core Data
PlaylistCoreData is designed to help have students practice using Core Data and creating simple relationships between objects.
Project
-
Task Part One
Students will build a simple task tracking app to practice project planning, progress tracking, MVC separation, intermediate table view features, and Core Data.
ReadMe
Mastery Review
- Number Printer stretch problem
- Challenges
- Extremely Simple Core Data objective challenge
- Plan MVC Architecture for a Family Recipes App objective challenge
- Playlist Core Data guided project