Introduction to Swift for Beginners

Hands-on Swift Essentials: Swift Programming Basics, Swift Essentials, Practical Application of Swift & More

TTMBSFT005

Introductory

5 Days

Course Overview

Introduction to Swift for Beginners is a hands-on course designed to get you quickly familiar with Swift and up and running with essential Swift programming skills to a basic level.  You’ll gain ample practice with Swift code, learning to apply the skills and language in a practical way.   

This course is approximately 50% hands-on lab and 50% lecture, designed to train attendees in core swift programming skills, coupling the most effective techniques with the soundest industry practices. Throughout the course you’ll be led through a series of progressively advanced topics, where each topic consists of lecture, group discussion, comprehensive hands-on lab exercises, and lab review.  You’ll find mini-exercises throughout the course, which are short exercises about the topic at hand. There are also challenges at the end of each module, which are either programming questions or longer coding exercises to test your knowledge.

The project example code in this course is platform-neutral; that means it isn’t specific to iOS, macOS or any other platform. The code runs in playgrounds, which you’ll learn about in the very first module. You’ll be able to play with the code by making changes and see the results immediately.

Course Objectives

Working in an interactive learning environment, led by our expert facilitator, you’ll explore:

  • Expressions, Variables & Constants
  • Types & Operations
  • Basic Control Flow
  • Advanced Control Flow  
  • Functions 
  • Optionals 
  • Arrays, Dictionaries & Sets
  • Collection Iteration with Closures
  • Strings
  • Structures 
  • Properties 
  • Methods 
  • Classes
  • Advanced Classes
  • Enumerations
  • Protocols  
  • Generics 
  • Access Control, Code Organization and Testing
  • Custom Operators, Subscripts & Keypaths 
  • Pattern Matching
  • Error Handling
  • Encoding & Decoding Types  
  • Memory Management 
  • Value Types & Value Semantics 
  • Protocol-Oriented Programming
  • Advanced Protocols & Generics 

 

Need different skills or topics?  If your team requires different topics or tools, additional skills or custom approach, this course may be further adjusted to accommodate.  We offer additional ISO  / Swift, mobile development, mobile testing, programming, security or other related topics that may be blended with this course for a track that best suits your needs.

Course Prerequisites

This is an Introductory level course for technical team members.

Course Agenda

Section I: Swift Basics

Chapter 1: Expressions, Variables & Constants

  • How a computer works
  • Playgrounds
  • Getting started with Swift
  • Printing out
  • Arithmetic operations 
  • Math functions    
  • Naming data
  • Increment and decrement

Chapter 2: Types & Operations

  • Type conversion   
  • Strings   
  • Strings in Swift
  • Tuples   
  • A whole lot of number types
  • Type aliases
  • A peek behind the curtains: Protocols

Chapter 3: Basic Control Flow

  • Comparison operators
  • The if statement   
  • Loops  

Chapter 4: Advanced Control Flow  

  • Countable ranges   
  • For loops 
  • Switch statements  

Chapter 5: Functions 

  • Function basics   
  • Functions as variables
  • Commenting your functions  

Chapter 6: Optionals 

  • Introducing nil    
  • Introducing optionals
  • Unwrapping optionals
  • Introducing guard  
  • Nil coalescing    

Section II: Collection Types

Chapter 7: Arrays, Dictionaries & Sets

  • Mutable versus immutable collections
  • Arrays  
  • What is an array?  
  • When are arrays useful?
  • Creating arrays   
  • Accessing elements
  • Modifying arrays  
  • Iterating through an array
  • Running time for array operations
  • Dictionaries
  • Creating dictionaries
  • Accessing values  
  • Modifying dictionaries
  • Sets   

Chapter 8: Collection Iteration with Closures

  • Closure basics    
  • Custom sorting with closures  
  • Iterating over collections with closures

Chapter 9: Strings

  • Strings as collections 
  • Strings as bi-directional collections
  • Raw strings
  • Substrings
  • Character properties 
  • Encoding

Section III: Building Your Own Types

Chapter 10: Structures 

  • Introducing structures
  • Accessing members 
  • Introducing methods 
  • Structures as values 
  • Structures everywhere
  • Conforming to a protocol

Chapter 11: Properties 

  • Stored properties  
  • Computed properties
  • Type properties   
  • Property observers 
  • Lazy properties    

Chapter 12: Methods 

  • Method refresher  
  • Introducing self   
  • Introducing initializers
  • Introducing mutating methods  
  • Type methods    
  • Adding to an existing structure with extensions

Chapter 13: Classes

  • Creating classes   
  • Reference types   
  • Understanding state and side effects
  • Extending a class using an extension
  • When to use a class versus a struct

Chapter 14: Advanced Classes

  • Introducing inheritance
  • Inheritance and class initialization
  • When and why to subclass
  • Understanding the class lifecycle

Chapter 15: Enumerations

  • Your first enumeration
  • Raw values
  • Associated values  
  • Enumeration as state machine  
  • Iterating through all cases
  • Enumerations without any cases 
  • Optionals 

Chapter 16: Protocols  

  • Introducing protocols
  • Implementing protocols
  • Protocols in the Standard Library

Chapter 17: Generics 

  • Introducing generics 
  • Anatomy of generic types
  • Arrays  
  • Dictionaries
  • Optionals
  • Generic function parameters 

Section IV: Advanced Topics

NOTE: Some Advanced topics may be marked Optional / Time Permitting based on audience level and goals.

Chapter 18: Access Control, Code Organization and Testing

  • Introducing access control
  • Organizing code into extensions 
  • Swift Package Manager
  • Testing  

Chapter 19: Custom Operators, Subscripts & Keypaths 

  • Custom operators   .
  • Subscripts
  • Keypaths 

Chapter 20: Pattern Matching

  • Introducing patterns 
  • Basic pattern matching
  • Patterns
  • Advanced patterns  
  • Programming exercises
  • Expression pattern  

Chapter 21: Error Handling

  • What is error handling?
  • First level error handling with optionals
  • Error protocol    
  • Throwing errors   
  • Handling errors   
  • Advanced error handling
  • Rethrows 
  • Error handling for asynchronous code

Chapter 22: Encoding & Decoding Types  

  • Encodable and Decodable protocols
  • What is Codable?   
  • Automatic encoding and decoding
  • Encoding and decoding custom types .
  • Renaming properties with CodingKeys.
  • Manual encoding and decoding  .
  • Writing tests for the Encoder and Decoder  .

Chapter 23: Memory Management 

  • Reference cycles for classes
  • Reference cycles for closures  

Chapter 24: Value Types & Value Semantics 

  • Value types vs. reference types 
  • Defining value semantics
  • Implementing value semantics   
  • Recipes for value semantics

Chapter 25: Protocol-Oriented Programming

  • Introducing protocol extensions 
  • Default implementations
  • Understanding protocol extension dispatch 
  • Type constraints   
  • Protocol-oriented benefits
  • Why Swift is a protocol-oriented language 

Chapter 26: Advanced Protocols & Generics 

  • Existential protocols 
  • Non-existential protocols
  • Recursive protocols 
  • Heterogeneous collections
  • Type erasure    
  • Opaque return types 

Course Materials

Student Materials: Each participant will receive a digital Student Guide and/or Course Notes, code samples, software tutorials, step-by-step written lab instructions (as applicable), diagrams and related reference materials and resource links. Students will also receive the project files (or code, if applicable) and solutions required for the hands-on work.

Hands-On Setup Made Simple! Our dedicated tech team will work with you to ensure our ‘easy-access’ cloud-based course environment, or local installation, is accessible, fully-tested and verified as ready to go well in advance of the course start date, ensuring a smooth start to class and effective learning experience for all participants. In some cases we can also help you install this course locally if preferred. Please inquire for details and options.

Every-Course Extras = High-Value & Long-Term Learning Support! All Public Schedule courses include our unique EveryCourse Extras package (Course Recordings, Live Instructor Follow-on Support, Free *Live* Course Refresh Re-Takes, early access to Special Offers, Free Courses & more). Please inquire for details.

Raise the bar for advancing technology skills

Attend a Class!

Live scheduled classes are listed below or browse our full course catalog anytime

Special Offers

We regulary offer discounts for individuals, groups and corporate teams. Contact us

Custom Team Training

Check out custom training solutions planned around your unique needs and skills.

EveryCourse Extras

Exclusive materials, ongoing support and a free live course refresh with every class.

Mix, Match & Master!
2FOR1: Two Courses, One Price!

Enroll in *any* two public courses (for 2023 *OR* 2024 dates!) by December 31, for one price!  Learn something new, or share the promo!

Click for Details & Additional Offers

Learn. Explore. Advance!

Extend your training investment! Recorded sessions, free re-sits and after course support included with Every Course
Trivera MiniCamps
Gain the skills you need with less time in the classroom with our short course, live-online hands-on events
Trivera QuickSkills: Free Courses and Webinars
Training on us! Keep your skills current with free live events, courses & webinars
Trivera AfterCourse: Coaching and Support
Expert level after-training support to help organizations put new training skills into practice on the job

The voices of our customers speak volumes

Special Offers
Limited Offer for most courses.

SAVE 50%

Learn More