When Can I Code Swift on the Server?

tldr;  Probably never

Apple_Swift_Logo

After Apple’s surprising news on Monday to launch the new Swift programming language to replace Objective-C, lots of questions popped up around the programmer community.  These questions mainly focused on what Swift provided to developers of iPhone apps, iPad apps, and Mac apps.  What about the bigger picture – we can see what Apple’s intended purpose is with Swift today, but what is their ultimate goal with it?  After all, Swift is a programming language, it’s not simply an iPhone app language.

One big question that popped into my head is “when, if ever, will we be able to program in Swift for our server-side code?”  Look at the popularity of JavaScript and how it’s grown quickly the past 10 years as its usage has grown from “just a way to swap images on mouseovers” to “wow, jQuery is awesome” to “I can write an entire app that doesn’t reload” to finally “my entire client/server app is all JavaScript baby”.  Could Apple look at the growth of JavaScript and look to replicate it by putting out a Swift server implementation?

First, let’s remember that Swift ultimately is just another language that compiles to native code using LLVM (edit: correction, thanks for the double-check).  Any server-side Swift would likely come from existing Objective-C solutions.  However, the number of Objective-C server solutions is almost non-existent.  You can find products like Objective-Cloud, but these cost money.  You can find open source projects like CocoaHTTPServer or HTTPKit, but these aren’t even actively maintained.  One thing you cannot find is an Apple product, or even an Apple endorsed product.

Another common solution that iOS developers are using are so-called “Backend as a Service” sites like Parse and Firebase.  Expect these companies to have Swift libraries out quickly, within the next few weeks.  But these aren’t exactly server-side code, they’re simply a gateway via client-side code to server-side functionality.

So, let’s ask the question for real – when can I code Swift on the server?  When will server side Swift become a reality?  Based on Apple’s past work with providing Obj-C on the server (none), Apple’s desire to provide open source products (none), and the need in the developer community for another server-side solution (low), I’d say we should never expect to be able to code Swift on the server.  It’s a shame, because in the 4 days I’ve been coding in it, it’s been a pleasure to work with.

Objc

At CabForward, we believe strongly in writing software that doesn’t suck. Why? Because our geeks care. How much do we care?

Find Out

CabForward Alternate Logo
Read More:
Professional Training
Private Training vs. In House Training