CSC 581: Mobile App Development
Spring 2018
Course Overview
- To apply existing programming skills to the mobile domain, addressing challenges such as memory restrictions, touch-based interfaces, and rapidly evolving architectures.
- To appreciate the wide range of tools and platforms available for mobile development, and be able to identify appropriate tools for various tasks.
- To be proficient with the XCode development environment and the Swift programming language.
- To design and implement apps that address real-world needs, using best practices in design and software engineering.
Mobile landscape
mobile vs. desktop applications
native vs. Web-based development
Progressive Web Apps (PWAs)
other hybrid technologies: WebAssembly, Houdini
iOS vs. Android
market share, ease of development, profits vs. volume
iOS history
iOS architecture: Cocoa Touch, media layer, core services, core OS
mobile design guidelines
iOS design themes: clarity, deference, depth
iOS design principles
aesthetic integrity, direct manipulation, metaphors,
consistency, feedback, user control
Swift
language basics
variables: let vs. var, scope
data types: type inferencing, expressions, Strings, enumerations
optionals: ?, !, if-let
control statements: if, while, for (with ranges), guard
functions: internal vs. external names, default parameters
collections
array: e.g., names : [String]
field: count; methods: append, +=, remove, insert
dictionary (map): e.g., var ages : [String:Int]
fields: count, keys, values; methods: contains, remove, filter
user-defined types
struct: generally used for data structures
value type, must specify mutating methods, no inheritance
(note: arrays & dictionaries are structs)
class: generally used for full-blown objects
reference type, supports inheritance (must specify when override)
OO design
protocols: CustomStringConvertible, Equatable, Comparable, user-defined
computed properties/fields
Model-View-Controller (MVC) pattern
data persistence:
reading text from a file, Bundle.main.path
parsing the text using String.split and String.components
reading writing objects into plists
Codable protocol, PropertyListEncoder/PropertyListDecoder
encoding & writing, reading & decoding
Xcode/UIKit
Xcode IDE
playgrounds vs. projects
IDE areas: editor, toolbar, navigator, debug, utility
Single View App template: ViewController.swift, Main.storyboard
iOS UIKit
UIView subclasses: UILabel, UIImageView, UITextView, UIScrollView, ...
UIControl subclasses: UIButton, UISegmentedControl, UITextField, ...
Common tasks
UI elements:
drag from Object Library, create an outlet/action
app layout:
constraints, stack views
navigation:
hierachical vs. flat vs. content-driven design
show vs. modal segues, navigation bar, tab bar
images:
UIImageView, app icons
specialized views:
UIScrollView, UITableView, popovers
sensing:
motion events (e.g., shake), touch gestures (e.g., swipe)
timing:
Timer class, scheduledTimer method
HTTP requests:
URLSession, URL, URLRequest, DispatchGroup