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

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?
主站蜘蛛池模板: 廉江市| 威信县| 且末县| 佛冈县| 民乐县| 昂仁县| 渝北区| 万载县| 临猗县| 方山县| 曲麻莱县| 隆德县| 东至县| 镇赉县| 岑巩县| 垦利县| 东乌珠穆沁旗| 沁源县| 萨嘎县| 西乌珠穆沁旗| 改则县| 乌拉特中旗| 罗甸县| 卢湾区| 信丰县| 孙吴县| 太和县| 陇西县| 周口市| 日土县| 四子王旗| 孟州市| 安多县| 班玛县| 吉木乃县| 行唐县| 丰台区| 塔河县| 广平县| 双柏县| 南平市|