Course Syllabus

 

 Syllabus

E65-g Introduction to Mobile Application Development Using Swift and iOS

 

Instructor:                              Ronald V. “Van” Simmons (rvs606@g.harvard.edu)

 

Course Dates/Times:       Monday 5:30-7:30, Aug 31 - Dec 14, 2020

 

Location:                                 Online via Zoom

 

PREREQUISITES:

While this is an introduction to mobile development, it is not an introductory programming course.  Accordingly, students need to have:

  • working knowledge of at least one object-oriented programming language such as Java, Javascript or C++ 
  • a semester course in data structures or equivalent
  • a firm understanding of how to compile code, use libraries, use a debugger, and
  • the ability to use a source control tool such as git. 

This is a class about Apple's iOS platform, so the student must have a Macintosh laptop running a current version of the operating system with the most recent version of Apple's Xcode IDE installed. (In particular  students will need to have Mac OS 10.15 "Catalina" installed).  Please note that it is not possible to use a Windows or Linux computer for this course as code written on those platforms cannot be deployed to either an iOS simulator or device.

PRE-TEST

A pre-test has been made available.  All students should verify that they meet the course prerequisites by taking the pretest.

Assignment 0

Assignment 0 consists of preparatory readings and setting up the student's code repository for assignments. GitHub classroom will be used for all assignment repositories and will require an invitation from the Instructor (and hence completed registration by the student) in order to join the class along with a demo of how to set up student's repository.  

Assignment 0 will be posted to the course website the week of August 17th, 2020.  All students should have Assignment 0 completed before first class meeting.

COURSE OUTLINE:
 This course introduces the basics of contemporary mobile application development using Apple’s iOS technology as the development platform. The objective of the course is to enable to the student to build an iOS application using the standard Apple tool chain. Requirements for the course will be met by the student demonstrating an ability to develop an application which implements a coherent data model, a view with layout, drawing and touch handling, asynchronous network access and timer management, animation and proper data flow design along with usage of a number of the standard Apple-provided user interface components.

We start with the Swift programming language and portions of its system library. Language features which will be most focused on will include: the Swift type system (tuple/enum/struct/class/func/protocol), closures, optionals, and generics. This basis will then lead to discussion of various functional programming techniques in Swift centered around the map/reduce and other higher order functions. As part of our survey of Swift, we will cover in great detail Apple’s Combine functional reactive programming layer, in particular its usage to perform network access and timed event handling.

We then proceed to study the architecture of an application which uses Apple’s new SwiftUI toolchain.  The emphasis will be on creating a unidirectional dataflow architecture from many small elements which can be composed into an overall architecture for the application. Specific attention will be paid to proper practices for coding each of the various portions of an app and techniques for communicating between them using a (State, Action) -> (State, Effects) paradigm.  Additional Swift language features such as protocol extensions and their proper use will be added to the students skill set during this section.

We continue by surveying the major features of the XCode IDE focusing on building interfaces with the Xcode Preview tool. Specific techniques to be explored will include layout, view hierarchys, and Apple’s SwiftUI DSL.  We continue by exploring: various drawing functions in SwiftUI Views, event handling, Bezier Path handling in SwiftUI.  Finally we explore various techniques in the implementation of touch handling. We also discuss integration of custom views within Xcode Preview.

As an aside during this section, time permitting, we will discuss Apple’s run time analysis tool, Instruments. This will be used to explore the details of the Apple memory model and performance debugging.

 Topics to be covered in order:  

Course Section (~2 classes each)

Focus

Section topics

1

Introduction to Xcode and Model Development with Swift

Policies; Xcode Intro: Demo of a basic iOS App & Playgrounds;  Navigating Xcode to create a real project.

Swift language essentials: Arrays, Dictionaries, functions, Optionals, Control Flow, Structs Enums and Classes, Playgrounds.  Elements of The Swift Foundation classes, CocoaTouch Foundation Framework, Simple connections to the User Interface.  Functional Reactive Programming (FRP) with Combine.

Major emphasis will be on the Swift type system (base types, tuples, enums, structs, classes, function, and protocols), generics, optionals and closures.  This will then be extended to include the higher order functions as developed in the map/reduce and similar functions of the Swift Standard Library’s Sequence type. 

Assignment 1 due: Sep 21st

2

Functional Reactive Programming (FRP) with Combine.

Advanced higher-order functions, functions-returning-functions and their use in Combine

Introduction to FRP concepts, Publishers, Subscribers, Subjects.  Survey of basic publisher types, Map, Zip, FlatMap, Collect, etc. 

Concurrency and Asynchrony in Combine.  The Future Publisher type. Use of Combine in networking and timer management.

Assignment 2 due: October 5th

3

Composable Application Architecture

Introducation to and use of the Apple property wrappers including EnvironmentObject, Published, State, and Binding.  Organizational concepts: separate model classes, the event loop, application state, events as actions, use of multiple environments, effects as publishers of actions, reducers as functions of state, action, environment to new state, and effects, higher-order reducers, cancellable effects.

Assignment 3 due: November 2nd

4

Drawing and Layout with SwiftUI

The SwiftUI Framework, essential debugging tools, the View protocol, Basic View types, the relationship between the backing code and the UI, custom drawing through View composition, touch and gesture handling, Color models, Alpha, Images, and Text

Assignment 4 due: November 16th

5

Animations

Animation modifiers in SwiftUI, animating color, frame, rotation, and opacity explicitly and implicitly.

6

Scrollable Views, Tabs and Navigation

 List, ForEach  Navigation views and their use, Tabbed Views and their controllers.

7

XCTest, Memory Management and Instruments, and Final Project Support

Using XCTest to write Unit Tests and UI tests. 

Final Project due at last class meeting: December 14th

ASSIGNMENTS AND READINGS: Frequent small assignments progress from basic programming to realistic app development with a focus on responsive device graphics and algorithms. We will build a working app covering all topics as a final project.  The final project will reuse code from each of the assignments, so please be aware: the final project is cumulative over all of the material discussed in the class, failure to absorb any of the basic concepts mentioned above will be very detrimental to the student’s outcome. Readings will come from a combination of: The Apple Developer Library; Chapters from e-Books; and online blog posts and tutorials.

GRADING: Each of the 4 regular assignments is valued at 100 points, the final project at 200 points. It should be noted that the eventual grade of the student will depend most heavily on building the application for the final project. If the student can demonstrate mastery of all of the techniques in the final project they may have their grade be based solely on the final project.  The instructor will grade on the higher of the overall average across all assignments, including the final project or of the final project grade alone.  When grading programming assignments, a strong emphasis is placed on good coding practices, code design and correct implementation of platform-specific architectural principles.  These criteria are to some extent subjective but expectations for them will be clearly specified in class.

LATE POLICY: As the course builds on previous material and students will receive a working version of code immediately following the due date for each assignment, there has to be a zero-tolerance late policy for all assignments. 

TOOLS: Xcode and InterfaceBuilder and git. Class assignments (which include readings) will be hosted on Canvas and lecture materials will be hosted on the instructors GitHub account which will be publicly available. As part of Assignment 0 to be completed before the first class, each student will need to set up an individual repository, with a username and password, into which they will submit all assigned work. The naming conventions will be spelled out so that all submissions have the same directory structure. The first class will review how to obtain all materials to verify that students have successfully completed Assignment 0. For more information on git and GitHub see: 

  • https://services.github.com/on-demand/ 
  • https://guides.github.com/activities/hello-world/ 
  • https://guides.github.com 
 

ONLINE DISCUSSION: We will use the discussion forums as provided in the Canvas platform to allow students to communicate with the instructors, TA's and each other.  All questions about the course material should be directed to this forum:

  • for maximum visibility to staff and students 
  • to assure that all students are doing their own work 
  • to make sure that everyone has equal access to all resources.

While you are welcome to read additional material on the internet, asking questions using outside sources for assistance such as StackOverflow will be considered an honors violation and treated accordingly.

LECTURES AND WORKLOAD: Lectures will be heavily example-driven. The final project requires cumulative knowledge drawn from each lecture, so attendance, while not part of your grade, is EXTREMELY important. For a well-prepared student, the workload is ~2 hours or reading and ~2 hours of programming/per week, with the final project being roughly 15 hours of effort.  

GRADUATE CREDIT EXPECTATIONS: If you are taking this course for graduate credit, there will be  specific additional programming requirements for your final project. Assignments 1-4 will be the same for all students,  the specific graduate credit requirements will be detailed in the final project definition.

ACCESSIBILITY: The Extension School is committed to providing an accessible academic community. The Accessibility Office offers a variety of accommodations and services to students with documented disabilities. Please visit https://www.extension.harvard.edu/resources-policies/resources/disability-services-accessibility for more information.

ACADMIC INTEGRITY AND STUDENT RESPONSIBILITY: As with all Harvard courses, you are responsible for understanding Harvard's policies on academic integrity.  Here are the Official Harvard Extension School Policies:  (https://www.extension.harvard.edu/resources-policies/student-conduct/academic-integrity)

Not knowing the rules, misunderstanding the rules, running out of time, submitting the wrong draft, or being overwhelmed with multiple demands are not acceptable. There are no excuses for failure to uphold academic integrity.

To support your learning about academic citation rules, please visit the Harvard Extension School Tips to Avoid Plagiarism (https://www.extension.harvard.edu/resources-policies/resources/tips-avoid-plagiarism), where you'll find links to the Harvard Guide to Using Sources and two free online 15-minute tutorials to test your knowledge of academic citation policy. The tutorials are anonymous open-learning tools.

 

 Course Information

Student Support Tips Instructor Support Tips

Course Summary:

Date Details Due