Vapor vs Perfect?

vapor
perfect

(Rick M) #1

I came across Vapor the other day and wondered if it were an "official" Swift.org project. I guess it's not, but it uses SwiftNIO, which is? In any case, a little more googling turned up perfect.org, and I'm wondering if anyone has thoughts on which framework is "better" or "easier" to use for building a webapp with both JSON REST APIs and some kind of simple HTML templating engine.

Thanks!


(Rick M) #2

Oh, I've found these articles:



(Frank Swarbrick) #3

No love for Kitura?


(Rick M) #4

It's mentioned in that first Medium link I posted: https://medium.com/@rymcol/current-features-benefits-of-the-top-server-side-swift-frameworks-b15b4f2d7bc3

I decided to go with Vapor because that article touted it as "pure Swift," and thus having a nicer syntax. We'll see how my choice works out.


(Steven Van Impe) #5

@JetForMe Definitely try out all the frameworks before settling on one.

Since you're interested in HTML templating, you should also compare Leaf (Vapor's templating language) with Stencil (everyone else's templating language). They accomplish the same, but with a very different syntax.


(Alik Vovk) #6

After I saw this presentation I was reeky inspired to try Kitura myself.


(Wayne) #7

I had an attempt with all three platforms.

Perfect
I really enjoyed working with Perfect and deployed a simple server side app to production. I used their Perfect Assistant (PA) Mac App to help me deploy the application to an AWS EC2 instance. I followed a Ray Wenderlich video tutorial and everything worked perfectly. (https://www.raywenderlich.com/3989-server-side-swift-with-perfect/lessons/1). Upon deploying updates to AWS using PA I encountered issues and had to talk to the team on slack to resolve some Swift Package Manager (SPM) versioning issues with regards to Perfect, PA updates and what versions of swift the PA Mac App was writing to compile the application using SPM via PA vs version Xcode and SPM were using. (The PA Mac App would attempt to create a SPM package using a user interface.) Docker some times had issues with the latest image vs the PA Mac App image complier.

After all the back and fourth I decided I didn’t have time to handle the AWS Dev Ops set up along with the Perfect Assistant issues. I wanted to build a server side swift project and deploy it easily, after all the coding was done. That is when I looked into Vapor and saw they offered Vapor Cloud (https://vapor.cloud). Don’t get me wrong I loved Perfect as a server side swift framework. It was simple to use very explicit in what was returned from responses and made a lot of sense as a iOS swift developer. This was back in late 2017 so things may have changed. It is a great framework and highly recommend checking it out.

Kitura
Great that it works on IBM Cloud Platforms. Easy to understand. Had a big issue with the response times of IBM support (was almost a month and a half and the issue was not responded to), attempting to use Watson with some server side swift. Seemed ok. It was not better than Perfect though.

Vapor
Vapor seems to handle issues straight out of the box. Error responses were handled amazingly, Codable was a game changer and there were sufficient docs and community support for many issues. I do recommend Vapor as the winner.

Again Perfect was used a while ago (a year and a bit ago, an eternity in tech), it was great but Vapor seemed ahead of the game.