What We’ve Learned

You came into this chapter knowing about strings, numeric types, control flow, and collections—the building blocks of a Swift application—but not enough to combine them together in interesting ways. In this chapter, we’ve gotten into the concepts of how to organize these types and their logic into meaningful and capable abstractions that can serve as the structure of an app.

We started in the comfort zone of object-oriented programming, building classes with properties and methods that would be perfectly recognizable to a Java 1.0 programmer from 1995. But, aware that toting around a bunch of state isn’t always how we want to do things in the 21st century, we looked at Swift’s functional programming--inspired alternatives for structuring our data. By using extensions and protocols, we can take simple enumerations and structures and make them as compelling as full-blown classes.

We’ve been able to do all this in the Xcode playground, which gives us a fine place to try out our Swift code. Now it’s time to pick up our toys and move into developing actual iOS apps. In the next chapter, you’re going to learn how to build actual iOS user interfaces and start building our real app.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.101.192