Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you use Swift as a web programming language? [closed]

Tags:

swift

Could you technically use Swift as a programming language for building a website / web app?


Update: Looks like a lot of people are working on this.

  • https://github.com/PerfectlySoft/Perfect
  • https://github.com/glock45/swifter
  • https://github.com/grzegorzleszek/HTTPSwiftServer
  • https://github.com/izqui/Taylor
  • https://github.com/crossroadlabs/express
  • https://github.com/IBM-Swift/Kitura
  • https://github.com/vapor/vapor

Official support from Apple: https://swift.org/server-apis/

like image 406
Brian Weinreich Avatar asked Jun 16 '14 02:06

Brian Weinreich


People also ask

Is Swift an open source language?

Swift.org - Swift System is Now Open Source.

What language is Swift close to?

Swift is a successor to both the C and Objective-C languages. It includes low-level primitives such as types, flow control, and operators. It also provides object-oriented features such as classes, protocols, and generics, giving Cocoa and Cocoa Touch developers the performance and power they demand.

Can you use Swift on window?

Possibly to the surprise of some, it is also possible to write and run Swift code on Windows 10 systems. Swift can be described in much the same way as many of today's newer programming languages. Terms such as modern, clean, fast, and safe are all used to describe Swift.

Can Swift be used for backend?

Is Swift a frontend or backend language? The answer is both. Swift can be used to build software that runs on the client (frontend) and the server (backend).


1 Answers

In theory, of course.

Any program that can output plain text can also be used for CGI(Common Gateway Interface) which includes Swift as well.

Therefore, yes, you can use Swift for web programming. However, currently, there are no additional libraries(like there are in PHP or EJB/JSP) to make this process easy for you. Take a look at some popular web frameworks for Swift such as Vapor.

like image 85
CommanderHK Avatar answered Oct 11 '22 19:10

CommanderHK