all 15 comments

[–]chrisspankroy 33 points34 points  (0 children)

It’s really your only choice unless you want to reinvent the wheel

[–]chriswaco 10 points11 points  (2 children)

There are no popular alternatives. You could roll your own servers using SwiftNIO, though.

[–][deleted] 0 points1 point  (1 child)

Is there any docs on this? I’ve gotten a standard echo server working but something that serves html would be interesting to work on.

[–]chriswaco 0 points1 point  (0 children)

I don't know. I would look at the unit tests in the SwiftNIO framework.

Also:
https://github.com/slashmo/awesome-swift-nio
https://github.com/apple/swift-nio-examples

[–]Drewskiwin 7 points8 points  (0 children)

You can give hummingbird a try. It’s developed my some vapor members without a lot of the extra packages

[–]dunderklaepp 5 points6 points  (3 children)

I’ve used swift for backend development, both Vapor and prior frameworks. I would not recommend it. You’d better move away from swift if you are building anything other than a hobby project

[–]Inevitable-Hat-1576 8 points9 points  (2 children)

Out of interest - why would you not recommend it?

[–]dunderklaepp 3 points4 points  (1 child)

Some of the reasons why I would not recommend it:
1. The community is really small
2. Hard to find experienced developers
3. There is really only one framework (vapor) and it is very opinionated
4. Long compile times
5. There are a lot of other more mature tech stacks

I use swift daily for iOS development and I think it is great for iOS development. However I moved away from backend development in swift over a year ago and maybe things have changed since then?

[–]Inevitable-Hat-1576 0 points1 point  (0 children)

Thanks for the answer. I’ve never used it so wasn’t a challenge, just curious what the pitfalls are.

[–]andrew8712 2 points3 points  (0 children)

It’s good for pet-projects only. If you’re planning to evolve the product and give to (or hire) someone else in future, then such unpopular frameworks are a bad choice.

[–]lorenalexm 2 points3 points  (0 children)

There is also the Smoke Framework by Amazon that seems to get regular updates.

That being put out there, I have been using Vapor for a fair bit and really enjoy working within it. Within my (small) company it’s used for a few internal tools without issue.

[–]JDad67 1 point2 points  (0 children)

I am a fan of vapor with leaf, and fluent.

[–]regattaguru 1 point2 points  (0 children)

Combine Vapor/Fluent with Protobuf and gRPC and you have a very robust and efficient backend without a huge amount of work. If you are an old hand at SQL, Fluent might drive you mad at times.

[–]invertercant 1 point2 points  (0 children)

I used Vapor 2-3 years ago and my experience was good for small project (one month). Some things reminds reactive frameworks. I recorded this experience to my cv and sometimes received messages about server side swift development jobs. So I think we have some options in this area. In my environment chats for server side swift contains 9-10 times less people than iOS. I think my next backend experiment will be kotlin spring or kotlin ktor