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

Getting Started with Vapor

In the previous chapter, we went over how to make an iOS app using Xcode in pure Swift. We also covered different concepts in iOS development such as Model View Controller (MVC) pattern and how to build iOS apps using the models which contain the state of our app. We also went over how to use the controller to control the flow of our app, to add, delete, and rearrange items and shopping lists. We also covered how to configure the views in storyboard to define the look and feel of the app, such as the navigation bar to table view cells. We also used some of the elegant syntax provided by Swift to help us aggregate all of the changes to our models and use a consistent method to save the state of the application, so that it can be easily restored using extensions built in the Array class, codable protocol, UserDefaults, and Swift's didSet callback methods.

In this chapter, we will put our server-side engineering hat on and explore Swift on the server side, using Vapor framework. We will see how we can use Vapor to build an API server for the iOS app we just built. We will also explore the modularity of the framework, as Vapor is made up of multiple Swift packages built using the Swift package manager that we went over in Chapter 1Getting Started with Server Swift, it is a framework built purely in Swift, with performance in mind. More specifically, in this chapter, we will cover the following topics:

  • What is Vapor, and what Swift packages make up Vapor? What functionality do these Swift packages provide?
  • How can these Swift packages be used to build a simple HTTP server or your own web framework?
  • What is the Vapor toolbox, and how do you use it to start building Vapor apps?
  • How can you create and run a simple Vapor application server?
  • How is our Vapor app structured?
主站蜘蛛池模板: 大石桥市| 清苑县| 五指山市| 清镇市| 荥经县| 辽阳县| 峨山| 永川市| 怀宁县| 隆化县| 元江| 沂源县| 车致| 泾川县| 桂东县| 延吉市| 武川县| 忻城县| 门头沟区| 巫山县| 佛山市| 平定县| 光山县| 延长县| 岫岩| 乌拉特中旗| 宁蒗| 沭阳县| 罗山县| 社旗县| 利辛县| 郓城县| 邵东县| 惠东县| 香格里拉县| 从江县| 乐至县| 东兰县| 安陆市| 会昌县| 孙吴县|