Pro Design Patterns in Swift [electronic resource] /
Freeman, Adam.author.
The Swift programming language has transformed the world of iOS development and started a new age of modern development. Pro Design Patterns in Swift shows you how to harness the power and flexibility of Swift to apply the most important and enduring design patterns to your applications, taking your development projects to master level. This book will teach you those design patterns that have always been present at some level in your code, but may not have been recognized, acknowledged, or fully utilized. Implementation of specific pattern approaches will prove their value to any Swift developer. Best-selling author Adam Freeman explains how to get the most from design patterns. He starts with the nuts-and-bolts and shows you everything through to advanced features, going in-depth to give you the knowledge you need. Pro Design Patterns in Swift brings design patterns to life and shows you how to bring structure and scale to your Swift code with a practical, no-nonsense approach.
Contents at a Glance; Part I: Getting Ready; Chapter 1: Understanding Design Patterns; Putting Design Patterns into Context; Introducing Design Patterns; Understanding the Structure of a Design Pattern; Quantifying the Value of Design Patterns; Using a Design Pattern After the Problem Occurred; Understanding the Limitations of Design Patterns; About This Book; What Do You Need to Know?; What Software Do You Need?; What Is the Structure of This Book?; Where Can You Get the Example Code?; Summary; Chapter 2: Getting Used to Xcode; Working with Xcode Playgrounds; Creating a Playground
Displaying the Value History of a VariableUsing the Value Timeline; Displaying UI Components in a Playground; Working with OS X Command Line Tool Projects; Creating a Command-Line Project; Understanding the Xcode Layout; Adding a New Swift File; Summary; Chapter 3: Creating the SportsStore App; Creating an Unstructured iOS App Project; Creating the Project; Understanding the Xcode Layout; Defining the Data; Creating the Basic Layout; Adding the Basic Components; Configuring Auto Layout; Testing the Basic Layout; Implementing the Total Label; Creating the Reference; Updating the Display
Implementing the Table CellsDefining the Custom Table Cell and Layout; Setting the Table Cell Layout Constraints; Creating the Table Cell Class and Outlets; Implementing the Data Source Protocol; Registering the Data Source; Testing the Data Source; Handling the Editing Actions; Handling the Events; Testing the SportsStore App; Summary; Part II: The Creation Patterns; Chapter 4: The Object Template Pattern; Preparing the Example Project; Understanding the Problem Addressed by the Pattern; Understanding the Object Template Pattern; Implementing the Object Template Pattern
Understanding the Benefits of the PatternThe Benefit of Decoupling; The Benefit of Encapsulation; The Benefit of an Evolving Public Presentation; Understanding the Pitfalls of the Pattern; Examples of the Object Template Pattern in Cocoa; Applying the Pattern to the SportsStore App; Preparing the Example Application; Creating the Product Class; Applying the Product Class; Ensuring View and Model Separation; Expanding the Summary Display; Summary; Chapter 5: The Prototype Pattern; Understanding the Problem Addressed by the Pattern; Incurring Expensive Initializations
Creating Template DependenciesUnderstanding the Prototype Pattern; Implementing the Prototype Pattern; Cloning Reference Types; Implementing the NSCopying Protocol; Understanding Shallow and Deep Copying; Implementing Deep Copying; Copying Arrays; Understanding the Benefits of the Prototype Pattern; Avoiding Expensive Initializations; Separating Object Creation from Object Use; (Not Really) Solving the Problem; Revealing the Underlying Problem; (Not Really) Solving the Underlying Problem; Applying the Prototype Pattern; Understanding the Pitfalls of the Prototype Pattern
Understanding the Deep vs. Shallow Pitfall
Includes index.
The Swift programming language has transformed the world of iOS development and started a new age of modern development. Pro Design Patterns in Swift shows you how to harness the power and flexibility of Swift to apply the most important and enduring design patterns to your applications, taking your development projects to master level. This book will teach you those design patterns that have always been present at some level in your code, but may not have been recognized, acknowledged, or fully utilized. Implementation of specific pattern approaches will prove their value to any Swift developer. Best-selling author Adam Freeman explains how to get the most from design patterns. He starts with the nuts-and-bolts and shows you everything through to advanced features, going in-depth to give you the knowledge you need. Pro Design Patterns in Swift brings design patterns to life and shows you how to bring structure and scale to your Swift code with a practical, no-nonsense approach.
Apple computer.
Programming languages (Electronic computers).
Computer programming.
Apple and iOS.
Programming Languages, Compilers, Interpreters.
Programming Techniques.