- Hands-On Full:Stack Development with Swift
- Ankur Patel
- 335字
- 2021-08-27 19:39:49
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 1, Getting 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?
- 智慧城市:大數(shù)據(jù)、互聯(lián)網(wǎng)時代的城市治理(第4版)
- 物聯(lián)網(wǎng)(IoT)基礎:網(wǎng)絡技術+協(xié)議+用例
- 重新定義Spring Cloud實戰(zhàn)
- Learning QGIS 2.0
- Socket.IO Real-time Web Application Development
- Getting Started with Grunt:The JavaScript Task Runner
- 數(shù)字調(diào)制解調(diào)技術的MATLAB與FPGA實現(xiàn):Altera/Verilog版(第2版)
- 中國互聯(lián)網(wǎng)發(fā)展報告2018
- WordPress Web Application Development
- Microservice Patterns and Best Practices
- 通信十年:擁抱互聯(lián)網(wǎng)
- 網(wǎng)管工具使用與技巧大全
- 網(wǎng)絡綜合布線(第2版)
- AIoT應用開發(fā)與實踐
- 轉化:提升網(wǎng)站流量和轉化率的技巧