官术网_书友最值得收藏!

What this book covers

Chapter 1, Objects from the Real World to Playground, teaches you the principles of object-oriented paradigms. We will discuss how real-world objects can become part of the fundamental elements of code. We will translate elements into the different components of the object-oriented paradigm supported in Swift: classes, protocols, properties, methods, and instances.

Chapter 2, Structures, Classes, and Instances, starts generating blueprints to create objects. You will learn about an object's life cycle, and we will work with many examples to understand how object initializers and deinitializers work.

Chapter 3, Encapsulation of Data with Properties, introduces you to organizing data in the blueprints that generate objects. We will understand the different members of a class and how they are reflected by members of the instances generated from a class. You will learn the difference between mutable and immutable classes.

Chapter 4, Inheritance, Abstraction, and Specialization, introduces you to creating a hierarchy of blueprints that generate objects. We will take advantage of inheritance and many related features to specialize behavior.

Chapter 5, Contract Programming with Protocols, discusses how Swift works with protocols in combination with classes. We will declare and combine multiple blueprints to generate a single instance. We will declare protocols with different types of requirements, and then we will create classes that conform to these protocols.

Chapter 6, Maximization of Code Reuse with Generic Code, teaches you how to maximize code reuse by writing code capable of working with objects of different types—that is, instances of classes that conform to specific protocols or whose class hierarchy includes specific superclasses. We will work with protocols and generics.

Chapter 7, Object-Oriented Programming and Functional Programming, teaches you how to refactor existing code to take full advantage of object-oriented code. We will prepare the code for future requirements, reduce maintenance costs, and maximize code reuse. We will also work with many functional programming features included in Swift combined with object-oriented programming.

Chapter 8, Extending and Building Object-Oriented Code, puts together all the pieces of the object-oriented puzzle. We will take advantage of extensions to add features to types, classes, and protocols in which we don't have access to the source code. We will make sure that the code exposes only the things that it has to expose, and you will learn how everything you learned about object-oriented programming is useful in any kind of app we might create.

主站蜘蛛池模板: 宁陕县| 屏东市| 石河子市| 乐陵市| 晋宁县| 加查县| 台南县| 宜良县| 平果县| 梁平县| 安仁县| 眉山市| 武乡县| 白城市| 林芝县| 上蔡县| 仪征市| 永宁县| 合川市| 文安县| 寿宁县| 夏河县| 余江县| 都安| 伊川县| 河北省| 奉新县| 霍州市| 万载县| 开化县| 大邑县| 德钦县| 巴林左旗| 鄄城县| 永顺县| 南岸区| 巩留县| 延长县| 临洮县| 高清| 宁安市|