Software:Vapor (web framework)

From HandWiki
Short description: Open source web framework written in Swift
Vapor
Vapor Swift Wordmark Horizontal.png
Developer(s)Tanner Nelson and others
Initial releaseJanuary 18, 2016; 8 years ago (2016-01-18)[1][2]
Stable release
4.84.6[3] / October 11, 2023; 9 months ago (2023-10-11)
Written inSwift
Operating systemmacOS, Ubuntu
PlatformSwiftNIO
TypeWeb framework
LicenseMIT License
Websitevapor.codes

Vapor is an open source web framework written in Swift. It can be used to create RESTful APIs, web apps, and real-time applications using WebSockets. In addition to the core framework, Vapor provides an ORM, a templating language, and packages to facilitate user authentication and authorization.[4]

Vapor's source code is hosted on GitHub and licensed under the MIT License.[5] Vapor has been a part of Swift's Server APIs working group since 2016.[6][7]

History

Vapor 0.1.0 was released as a proof of concept for Swift on the server a month after Apple open sourced Swift and began Linux platform support on December 3, 2015.[8] Vapor 1.0[9] arrived in September 2016, followed by the release of Vapor 2.0 in May 2017.[10]

The framework was rewritten for Vapor 3.0[11] to be built on Apple's non-blocking networking framework SwiftNIO. Vapor 3 was released in May 2018. Apple cited the speed with which Vapor (along with Kitura) adopted the new SwiftNIO framework on the main Swift.org server page.[12]

Vapor 3's beta period saw educational material published by Packt,[13][14][15] Paul Hudson,[16] Razeware LLC,[17] and lynda.com.[18] Vapor was recognized by Swift.org with an official Swift Forum in its inaugural group of Related Projects[19] in May 2018.

Vapor 4[20]'s Alpha 1 Release started in May 2019 and the stable version released in April 2020.[21]

Releases

Version Release date Swift version
1.0 Sep 15, 2016 ≥ 3.0
2.0 May 17, 2017 ≥ 3.1
3.0 May 4, 2018 ≥ 4.1
4.0 April 9, 2020 ≥ 5.2
5.0 TBD ≥ TBD

{{{2}}}

Source: Vapor Docs & GitHub Releases.[22][23]

Swift Version Support

Vapor 4 supports the last 3 minor Swift versions. As of October 27th 2023, this includes Swift 5.7, Swift 5.8 and Swift 5.9.

This meets the standards set out by the Swift Server Workgroup,[24] of which Vapor is a member[25]

Features

Vapor supports the following features:[26]

  • Async / non-blocking IO
  • Authentication: basic, bearer, JWT, and password
  • Cache: Redis and in-Memory
  • Commands / console formatting
  • Content Negotiation: JSON, multipart, and URL-encoded form
  • Crypto: RNG, ciphers, digests, RSA
  • Dependency Injection / Inversion of Control[27]
  • Fluent ORM: MySQL,[28] PostgreSQL, MongoDB and SQLite
  • HTTP Client and Server
  • Leaf Templating: HTML etc
  • Logging
  • URL Routing
  • Validation
  • WebSocket client and server
  • Queue Jobs

References

  1. "Vapor 0.1.0 Release". 2016-01-25. https://github.com/vapor/vapor/releases/tag/0.1.0. 
  2. "Server-side Swift Frameworks Comparison". https://www.netguru.co/codestories/server-side-swift-frameworks-comparison. 
  3. "Vapor 4.84.6 Release". 2023-10-11. https://github.com/vapor/vapor/releases/tag/4.84.6. 
  4. "Vapor GitHub Organization". https://github.com/vapor. 
  5. "vapor/vapor LICENSE at master". 2018-02-23. https://github.com/vapor/vapor/blob/master/LICENSE. 
  6. "Swift Server APIs". 2016-10-25. https://swift.org/server-apis/. 
  7. "Swift Blog: Server APIs Work Group". 2016-10-25. https://swift.org/blog/server-api-workgroup/. 
  8. "Swift is Open Source". 2015-12-03. https://developer.apple.com/swift/blog/?id=34. 
  9. "Vapor 1.0.0 Release". 2016-09-15. https://github.com/vapor/vapor/releases/1.0.0. 
  10. "Vapor 2.0.0 Release". 2018-05-17. https://github.com/vapor/vapor/releases/2.0.0. 
  11. "Vapor 3.0.0 released". 2018-05-04. https://medium.com/@codevapor/vapor-3-0-0-released-8356fa619a5d. 
  12. Inc., Apple. "Swift.org" (in en). https://swift.org/server/. 
  13. Patel, Ankur (2018-03-30). Hands-On Full-Stack Development with Swift. Packt Publishing. ISBN 978-1788625241. 
  14. Yeung, Angus (2018). Hands-On Server-Side Web Development with Swift: Build dynamic web apps by leveraging two popular Swift web frameworks: Vapor 3.0 and Kitura 2.5.. Packt Publishing Ltd. ISBN 9781789345865. https://books.google.com/books?id=iC59DwAAQBAJ. Retrieved 16 December 2019. 
  15. Kuepper, Ralph (2020-03-12). Hands-On Swift 5 Microservice Development. Packt Publishing. ISBN 978-1789530889. 
  16. Hudson, Paul (2018-03-01). Server-Side Swift (Vapor ed.). https://www.hackingwithswift.com/store/server-side-swift. 
  17. Condon, Tim. Server Side Swift with Vapor. Razeware LLC. https://store.raywenderlich.com/products/server-side-swift-with-vapor. 
  18. "Learning Server-Side Swift with Vapor". https://www.lynda.com/Swift-tutorials/Learning-Server-Side-Swift-Vapor/560883-2.html. 
  19. "Introducing Related Projects to Swift Forums". 2018-05-10. https://swift.org/blog/related-projects/. 
  20. VAPOR (2019-05-28). "Vapor 4: Alpha 1 Releases Begin" (in en). https://medium.com/@codevapor/vapor-4-alpha-1-releases-begin-94a4bc79dd9a. 
  21. "Release Vapor 4.0.0 · vapor/vapor" (in en). https://github.com/vapor/vapor/releases/tag/4.0.0. 
  22. "GitHub: vapor/vapor Releases". GitHub. https://github.com/vapor/vapor/releases. Retrieved 2021-02-15. 
  23. "Vapor Docs: Support". Vapor. https://docs.vapor.codes/3.0/version/support/. Retrieved 2018-05-04. 
  24. "Swift Server Workgoup". https://www.swift.org/sswg/incubation-process.html#graduation-requirements. 
  25. "Swift Server Workgroup Members". https://www.swift.org/sswg/. 
  26. "Vapor Docs" (in en). https://docs.vapor.codes/3.0/. 
  27. Elliot, Keith (2016-10-06). Swift 3 New Features. Packt Publishing. ISBN 978-1786462718. https://books.google.com/books?id=u5jcDgAAQBAJ. 
  28. Hussain, Shaista (2018-03-12). Proceedings of the 2018 6th International Conference on Bioinformatics and Computational Biology. Association for Computing Machinery. ISBN 978-1-4503-6348-8. https://dl.acm.org/citation.cfm?id=3194505.