Swift has come a long way since its initial release just more than 2 years ago, back in June of 2014. The programming language has quickly risen to one of the top contenders for application development, but also traditional web developers could draw on Swift’s benefits.
We’ve been in contact with Nodes, a high-end UK mobile development agency, these days mainly dealing with enterprise clients and budgets to match. Because Swift has bridged the gap between backend and frontend development, as well as being open-source and available on Linux, the language has been of great interest to the company, ever since Swift’s inception, but perhaps even more so with version 3.0 which was the first update to the language after going open-source.
Casper Rasmussen, CTO has been quoted: »Ever since day one we have been developing with and following the activity around Swift. In the early days it was sort of a bumpy ride, but we saw fast and effective updates on a regular basis, and once Apple released Swift 2.0 we saw a really stable and promising technology. We are pleased with being among the early adopters, and having gained valuable experience is of great benefit to us.«
Consolidating multiple languages
While Hybrid App Development has been gaining traction these past few years, the trend has been to gather as much code and programming as possible, in as few frameworks and environments as possible. The reasons for this are logical and rather obvious, mainly to cut down on time and to increase productivity, all while eliminating overhead from merging programming languages, minimizing compiling errors and compatibility issues.
While it’s not public knowledge what apps have been developed with Swift as their framework, a google search revealed a few announcements, and this article by Duolingo tells the story of how they developed the so-called Duolingo Test Center App using Apple’s Swift language.
Now Swift 3.0 has enabled developers to develop backend and frontend with the same language, and that alone is a valuable experience, but the developers at Nodes are now looking at frameworks with even more functionality, and more frequent updates than the lumbering giant of Apple could ever hope to achieve.
Frameworks for Swift
A few notable frameworks include Quick, Perfect, Kitura by IBM and Vapor. These are all larger frameworks, more or less complete and standalone, but hundreds of minor addons and hacks are available of course, and this well-curated list at github showcases stome of the awesome Swift projects available.
»Back in February, we came across these two developers at Github, who had started developing a web-specific framework for Swift inspired by Laravel, and within a short timeframe the community on Github had showed great interest. We entered a dialogue with the developers, and at some point asked them what they would need in order for Vapor to be ready at Swift’s 3.0 release. Both of the developers were working part time on the project, and so they answered that they would need to work full-time with Vapor. One thing led to another and we invested in them and their project.« Casper Rasmussen said.
From pet project to full time job
Vapor is headed by Tanner Nelson and Logan Wright, and as of the 25th of August they are assisted by more than 40 voluntary and passionate contributors on Github directly. Vapor has been making itself known on the large repository site, by harvesting an unusual amount of Stars and Forks compared to the project’s age.
»Apart from helping the open-source community, and having the Vapor framework available for our own developers, we’re also aware of the aspect of employer-branding by investing in Vapor. The developers interested in this framework are very much individuals we would like to put on our shortlist of potential employees.« explains Casper Rasmussen.
He continues, »We never intended this investment leading to Vapor becoming a ‘Corporate’ project, even if we are paying for Vapor 1.0 can be ready for Swift 3.0’s release in september. We are very interested in keeping the framework part of an open community and attracting the talents naturally seeking open-source solutions.«
What sets Vapor apart from similar frameworks are some more technical aspects, such as the possibility of programming all server related code as well in Swift. There’s also a security benefit since the framework compiles with a plethora of safety features, usually not available in open-source languages.
»Most of the popular web development frameworks are not utilizing a runtime. With Swift and Vapor, we have seen some exceptional benchmarks, with speeds up to 50-60 times what we normally experience. With a runtime we can also utilize the server resources more efficiently, and unlike scripts, there’s no need to restart our services either.« Casper Rasmussen explains.
The future of frameworks
According to Casper Rasmussen, established frameworks such as .Net and Java suffers from the fact that they have been on the market for a long time, more than 20 years in the case of Java. Twenty years have seen an incredible number of changes in the world of development, and the code is significantly ‘heavier’ and carries many outdated ways of handling things. Even Node.js which saw the first light of day back in 2009 has it’s own issues such as being less strict, but the most important is the fact that Nodes.js was not designed for server-side development, which in today’s markets have become an important factor.
Swift, Vapor and similar frameworks have been designed within the past 2 years, and have stood on the shoulders of the aforementioned technologies and languages, and even with the compact codebases compared to the older framework it is possible to code most of the things you could code in .Net or Java.
The tendency of consolidating coding languages and frameworks into just a few, compared to the large number of possible choices developes currently have, makes sense for several reasons, and Nodes is far from the only developers doing this. This post by whoishiring.io, provides some good insight into what current job seekers are looking for with regards to languages, although the sample date seems to just stem from that job-site, it should serve the purpose well.