Building REST APIs on Linux with Swift and Zewo
dev.iachieved.it
dev.iachieved.it
And just to be clear I think that's awesome. I love the work they're doing; it's just time consuming. I've been writing my own approach to a Swift MVC framework so this is something I'm experiencing firsthand:
Swerver: https://github.com/jparishy/swerver (example usage: https://github.com/jparishy/swerverorg - it's based on libuv and makes many choices for you a la Rails compared to the framework demoed in the OP)
and it has been way more time consuming that I would have expected going into it. And right now it doesn't build on Linux because the latest Apple build broke something in CryptoSwift, which Swerver depends on.
All that said, Swerver has been super fun to work on so. After a lot of the hard work had been done, the actual usage (as demoed in jparishy/swerverorg with user authentication, client-side session state, and the basic MVC/DB access stuff) has been really smooth and enjoyable. /shamelessplug
But, there are some big issues in this code.
First, you are constructing SQL with string interpolation. Never do this, not even in sample code. People will blindly copy.
Second, way too much unsafe code. Why all the try! and explicit unwraps? Swift has all these great safety nets. Why let your code crash with unhandled exceptions while you can also properly deal with them?
That said, glad people are starting to explore Swift for backend development.