Swift server-side frameworks, which is best?

I just watched a couple of videos. The first was an introduction to Vapor. The second was an introduction to Perfect. Being new to server development, I’d like to know which one is favored and why?

I was wondering the same thing. Can anyone who has used Vapor and/or Perfect give some insight on the strengths and weakness of each? If they are roughly the same, that is good to know.

Reading a few articles - this one was good: https://www.sitepoint.com/server-side-swift-comparing-vapor-perfect/

1 Like

Vapor

  • Inspired from Laravel which uses MVC structure for easy development but this is not as performant as Perfect because it use pure HTTP written in Swift vs CHTTP in Perfect, Zewo and Kitura.
  • Someone ran Vapor as a web server on Ras Pi, there is an article in medium
  • If you want best support from community to make changes or bugfix, Vapor has the size to work on it.
  • Beautiful code and easy to organize your projects but Swift is always a beautiful languages as Ruby.
  • Fast to response community
  • Easy to start, easy to develop a blogging website.

Perfect

  • Great for hackers who wants to push performance beyond the limit like it’s a mixture of C and Swift, don’t worry about C pointers, as you learn how to integrate C libraries into Perfect, you could do lot of awesome stuff. Swift is develop using Clang, so it’s familiar.
  • It has SCADE which Perfect has partnership with for writing Swift and compile “native app” to iOS and Android, it’s currently in Beta 3 stage but we won’t know how much the commercial license will cost in the future, I tried to put as low as possible. Give a try and it’s easier to develop than Android Studio. If you need help, seek them in Slack channel.
  • You want code stability but you’ll still need to do your own testing to ensure it’s working as expected because Swift is still evolving until ABI is in place.
  • Not limited to MVC, you could do any way you want Perfect to fit your projects.
  • Easy to setup on Linode and other managed or unmanaged VPS.
  • Medium to response community, if you have any technical issues, you might expected longer response during weekend or when they are on trips for talks or other matters.
  • Longer to grasp but it has all the essential stuff you need to setup a basic website like WordPress minus the backed admin which you have to develop on your own.

I’m not so experience in Swift but Perfect is the way if you want some features that is missing in Vapor.

Kitura

  • There is a way to run Kitura in iOS too.
  • It has everything like Perfect but has tied to IBM cloud service if you want to use their addon so you won’t have to worry about setting up your own VPS and worry about security especially database.
  • Slow to response community

I would suggest you to give them a try and compare which is ideal for your projects and do test on HTTP vs HTTPS and many security features you need to tweak or use C to improve performance bottleneck, it took me 2 months to piece all features that could have been done with Laravel within a month.

Don’t read the articles based on comparing Perfect and Vapor because it’s biased.

Don’t read the articles based on comparing Perfect and Vapor because it’s biased and not professional. You need is a honest and fair comparisons on the current stage, not the past.

If I was to compare Rust is better than Swift for web server in performance, even Rust is top 5 in Techempower benchmark (preview) but Vapor failed the test for unknown reason, we hope that it can be resolve as soon as possible.

https://www.techempower.com/benchmarks/previews/round14/

Swift as a primary language for everything, including the server, has been intriguing since it was first to open sourced and ported to Linux. Many of you are assuredly as curious as I am, so I’m very pleased to share the results of my study here.
The Top Server-Side Swift Frameworks
At the time of writing, the top Server-Side Swift Frameworks (Listed in order of Stars on GitHub) are:
Perfect
Vapor
Kitura
Zewo

Thanks for sharing this information. It was very useful.