BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Perfect Aims to Bring Swift to the Server-side

Perfect Aims to Bring Swift to the Server-side

Leia em Português

This item in japanese

Lire ce contenu en français

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

Adoption
Style

BT