Saturday, June 27, 2015

Mastering Swift

Mastering Swift, the book I wrote on the Swift programming language, is about to be released by Packt Publishing.  The official release date is Tuesday June 30st, 2015.  You can order it from Packt’s site or from Amazon.  

I have always thought that you cannot master a programming language without a good understanding of the basics.  With that philosophy in mind this book starts with the basics of the Swift language before moving into more advance features and concepts.   With this structure, Mastering Swift will appeal to developers that are new to the Swift language because we cover the basics of the language and assume no prior knowledge of Swift.  Mastering Swift will also appeal to the experience developer because over half the books is spent on advance topics and concepts that are design to help the reader master the Swift programming language.

The fist five chapters will introduce the Swift programming language and will give the reader a good understanding of the Swift programming language.  the second half of the book will cover more advance topics such as concurrency, network development, design patterns and memory management including strong reference cycles.

This book takes a very code-centric approach to teaching the Swift programming language.   What this means is every feature and concept discussed in the book is backed by example code that is designed to demonstrate and reinforce the concept covered.  Details on how to download the sample code can be found in the preface of the book.

Below shows what is covered in each chapter:

Chapter 1, Taking our first steps with Swift, introduces the reader to the Swift programming language and will discuss what inspired Apple to create Swift. We will also go over the basic syntax of Swift.   We will also cover how to use Playgrounds to experiment and test Swift code.
Chapter 2, Learning Variables, Constants, Strings, and Operators, explains to the reader about variables and constants in Swift and how to use each of them. There will be brief overviews of the most common variable types with examples on how to use them. We will conclude this chapter by covering the most common operators in the Swift language.
Chapter 3, Using Collections and Cocoa Data Types, introduces Swift's Array and Dictionary collection types with examples on how to use them. We will also show how to use Cocoa and Foundation data types with Swift.
Chapter 4, Learning about Control Flow and Functions, explains how to use Swift's control flow statements. These include looping, conditional, and control transfer statements. The second half of the chapter is all about functions and how to use them.
Chapter 5, Understanding Classes and Structures, explains Swift's classes and structures in detail. We will look at what make them similar and what makes them different. We will also look at access controls and object-oriented design. We will conclude this chapter by looking at memory management in Swift.
Chapter 6, Working with XML and JSON Data, starts off by discussing what XML and JSON data are and their uses. We will then show several examples of how to parse and build XML and JSON data using Apple's frameworks.
Chapter 7, Custom Subscripting, examines what subscripts are and how we can add custom subscripts in our classes, structures, and enumerations.  We will look at the proper way to use subscripts and also when not to use subscripts.
Chapter 8, Using Optional Types and Optional Chaining, looks at what optional types really are, various ways to unwrap them, and optional chaining.  We do introduce the Optional type in earlier chapters but this chapter is designed to give the reader a complete understanding of them.  
Chapter 9, Working with Generics, allows us to write very flexible and reusable code that avoids duplication. In this chapter, we will examine how Swift implements generics. We will also examine the proper ways to use generics and examples of how not to use generics.
Chapter 10, Working with Closures, examines how to define and use closures in our code. We will conclude this chapter with a section on how to avoid strong reference cycles with closures.
Chapter 11, Using Mix and Match, examines how to include Swift code in our Objective-C projects and Objective-C code in our Swift projects.
Chapter 12, Concurrency and Parallelism in Swift, starts off by discussing the difference between concurrency and parallelism.  We then shows how to use both Grand Central Dispatch (GCD) and Operation Queues to add concurrency and parallelism to our applications.
Chapter 13, A Swift Formatting Style Guide, defines a style guide for the Swift language that can be a template for enterprise developers that need to create a style guide.
Chapter 14, Network development with Swift, looks at the Apple API's to connect to remote severs and how to best use them.  We also examine the RSNetworking framework on how to use it in our projects
Chapter 15, Adopting Design Patterns in Swift, looks at what design patterns are and why we should use them.  We also examine how to implement some of the more common design patterns in Swift.  

I would like to thank everyone at Packt Publishing who helped with this book.  Without their help and commitment to this book it would not have turned out so awesome and believe me I really think it turned out awesome.  So if you are new to the Swift programming language or an experience developer that is looking to take their skills to the next level, Mastering Swift may be just the book for you.  Once you have checked out the book, please continue to come back to this blog as I expand and enhance on the material in the book.    

No comments:

Post a Comment