BT

Perfect Aims to Bring Swift to the Server-side

by Sergio De Simone on Jan 16, 2016 |

Perfect makes it possible to use Apple’s Swift language to build enterprise-grade web applications, say Canadian startup PerfectlySoft Inc. With Apple having recently open-sourced Swift, Perfect promises to support cross-platform development across multiple platforms, including OS X, Linux, Windows, iOS, and Android. According to PerfectlySoft’s CEO Sean Stephens, using Swift both for the client and server side will make the development process more efficient by allowing developers to reuse their code and the logics behind it, while also ensuring a high level of safety, security, and performance thanks to Swift capabilities.

Perfect comprises PerfectLib, a Swift framework providing a set of core utilities that can be used both for frontend and backend development. On the client side, PerfectLib mostly duplicate functionality that is already provided by Apple’s SDKs, such as support for JSON encoding/decoding and marshalling, byte stream management, cURL support, SQLite access. By relying on PerfectLib’s implementation of those features, client code can be made less dependent on Apple SDKs, and therefore more easily reusable for the backend. On the server side, PerfectLib includes additional features that make most sense there, such as support for file management, process management and IPC, Mustache template parsing, state/session management, and database connectors for MySQL, ProgreSQL, SQLite, and MongoDB.

InfoQ has spoken with Sean Stephens to learn more about Perfect and better understand what it will provide to developers.

Could you explain how your project does relate to Apple open-sourcing Swift? What opportunities will that unleash?

Perfect will allow people who are building mobile apps, Apple TV apps, etc. to use Swift on the server side of their applications as well as client side, and additionally build websites and web applications using Swift. This will mean developers can reduce the time, learning-curve and code necessary to build their applications by using the same language across their application’s ecosystem.

We also believe that other platforms (Android, etc.) will quickly adopt compilers, leaving one native language which spans across all current popular platforms, mobile and otherwise.

At the moment Perfect comprises the PerfectLib framework only. How would you describe the role that PerfectLib plays?

Perfect also contains a connector for Apache through FastCGI (or alternatively a self-contained server), which allows for the serving itself - something Swift and a stand-alone SDK’s cannot do. Perfect does also include critical libraries for development (session management, JSON connectivity, etc.), which are not native to Swift. These libraries, while not necessary for mobile development, are critical to web and back-end development.

Do you have any plan to add new frameworks or somehow expand PerfectLib to include more features and abstractions to make it easier to develop server-side software?

We do plan on expanding Perfect with more features and functions and abstractions. We have several projects already in Beta (for example, an ORM), and several others in mid-development. Once the balance of important features and overall size of the project comes into alignment, we will stop inflating the feature set and concentrate on modular feature development and overall improvements. If developers have key features they would like to see, we will definitely consider them.

We also plan on offering additional configuration and server management tools, in due course, to make developer’s lives easier.

Will you provide any specific tools or tooling support for non-Apple platforms?

We have already started using other IDEs on Linux for our own Swift development - Sublime and Eclipse, for example. Swift is already well supported by popular tools and will likely continue to grow organically - though we would be happy to engage in these projects as well as they mature. Swift is the fastest growing and more loved language on the planet at the moment, and we are very happy to be riding in the front seat with them. Or perhaps we are in the back seat?

Perfect is available on GitHub.

Rate this Article

Relevance
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Server-side ... by Mark N

Server-side dev requires much more than client-side. You need ORMs and drivers to connect to multiple database types and messaging servers and build tools and (good) IDEs and etc. The effort to build all of this and the community is quite great. And to use it to build web apps - well the very reason for having swift server-side is the very reason not to use it for web apps. I wish them luck but Java, .NET and Node.js have a had a big head start. They need someone like Netflix or Amazon or etc to care. I've not heard of anyone caring about .NET from any of those companies even though now much of it is OSS and is targeting Linux.

They lost all credibility... by Greg Brown

...when they said this:

"We also believe that other platforms (Android, etc.) will quickly adopt compilers, leaving one native language which spans across all current popular platforms, mobile and otherwise"

There is NO WAY Google is going to adopt Swift for Android development. Dart, maybe. But not Swift.

That said, I do think Swift on the server is an appealing prospect. However, I'd prefer to see it done within the context of the JVM, not as a new stand-alone platform.

Re: Server-side ... by Deco Rior

What Sean does not discuss is that his organization has huge depth in the areas you outline. Many of us have been using his products for over a decade. He already has a passionate following that know what can be done.

What is funny is although java, .net, and node.js have a huge start in numbers, I think that they look dated compared to some of the innovations that Sean et al have done in the past.

Give it a try...you will become a believer!

Re: Server-side ... by Mark N

Swift is barely a few years old. I doubt they have all these things for Swift. And it is only one organization. And I highly doubt what they are doing makes java/.net/nodejs look dated. Ok, maybe .NET. Look at what Spring and Netflix are doing. Look at ElasticSearch, Fabric8. Etc. These are all pretty cutting edge. Is a good Swift IDE?

I'd be interested to see what they have though. Is it on Github? (the other stuff)

Re: Server-side ... by wang yi

.NET dated? Java copied lambda from it and ES6/python just copied async/await from it

Re: Server-side ... by Mark N

.NET is a platform, not a language. You are talking about language features.

Re: Server-side ... by Deco Rior

Yes. It is not that the languages/platforms have not copied the best features.

However, consider this. When .Net was released the internet was still relatively new and also the mobile market was almost non-existent. When java was release the internet was in its infancy. Since the release of these we have seen the uptake of some other languages that have developed. Swift is designed to attract the attention of "new" developers with functionality that allows rapid development of technologies that are needed "today" and with native speed.

It is not that .NET as a platform is bad or java is a poor language. But they have not been conceived with the current art. Swift brings with it many integrated features that require older languages to "add-in" this functionality.

It is no surprise that Android and iOS are basically not being developed on these older technologies going forward. But they are developed on the concepts that these technologies are based on.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

7 Discuss
General Feedback
Bugs
Advertising
Editorial
Marketing
InfoQ.com and all content copyright © 2006-2016 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT