Perfect README

The project's README from github.com/PerfectlySoft/Perfect. As one markdown file: README.md.

Perfect: Server-Side Swift 简体中文

Get Involed with Perfect!

Swift 5.2 Platforms macOS | Linux License Apache

Perfect: Server-Side Swift

Perfect is a complete and powerful toolbox, framework, and application server for Linux, iOS, and macOS (OS X). It provides everything a Swift engineer needs for developing lightweight, maintainable, and scalable apps and other REST services entirely in the Swift programming language for both client-facing and server-side applications.

Perfect includes a suite of tools that will enhance your productivity as you use only one programming language to build your apps: Swift. The global development community’s most dynamic and popular server-side toolbox and framework available today, Perfect is the backbone for many live web applications and apps available on iTunes.

This guide is designed for developers at all levels of experience to get Perfect up and running quickly.

Working with Perfect

Compatibility with Swift

The master branch of this project currently compiles with Xcode 11 or the Swift 5 toolchain on Ubuntu.

Getting Started

Access a tutorial to help you get started using Perfect quickly. It includes straightforward examples of how Perfect can be used.

Documentation

Get started working with Perfect, deploy your apps, and find more detailed help by consulting our reference library.

We welcome contributions to Perfect’s documentation. If you spot a typo, bug, or other errata, or have additions or suggestions to recommend, please create a pull request or issue in Github.

Community

We all need a little help now and then. If you do too, don’t be shy, ask us or the friendly and supportive Perfect community:

Slack | Twitter

Deployment

Your Perfect project can be deployed to any Swift compatible Linux server. We provide a macOS desktop application, Perfect Assistant, to help with AWS and Google Cloud deployments. Additional deployment options are in the works.

Samples, Examples, and Tutorials

Our library continues to grow as members of the Swift-Perfect development community have shared many samples and examples of their projects in Perfect. Examples include:

There are many more examples you can explore. Please share yours!

Core Perfect Modules

Perfect project is divided into several repositories to make it easy for you to find, download, and install the components you need:

Examples

DataSources

Utilities

More about Perfect

Perfect operates using either a standalone HTTP server, HTTPS server, or through FastCGI server. It provides a system for loading your Swift-based modules at startup, for interfacing those modules with its request/response objects, or to the built-in Mustache template processing system.

Perfect is built on a completely asynchronous, high-performance networking engine to provide a scalable option for internet services. It supports Secure Sockets Layer (SSL) encryption, and it features a suite of tools commonly required by internet servers such as WebSockets and iOS push notifications, but you are not limited to those options.

Feel free to use your favourite JSON or templating systems, etc.

Join and Contribute to the Community

The Swift-Perfect developer community is vital to improving Perfect and supporting one another.  

You can help other developers by sharing your expertise and tips, as well as learn from others, by joining the Perfect Slack channel. Contributions of all kinds are welcome: reporting issues, updating documentation, fixing bugs, building examples, sharing projects, and any other tips that may help the Swift-Perfect community.

If you would like to share your example project, tutorial, or video, please share the URL of your work on GitHub and Twitter, and the Perfect team will highlight it to the community.

Code of Conduct

The Perfect team welcomes people of all ethnicities, nationalities, ages, gender, disability, levels of experience, and religious beliefs to use and contribute to the Perfect project. We pledge to foster and enforce a harassment-free environment of openness, respect, and cooperation for everyone in all project and public spaces online or offline.

Please report any behaviour that violates our Code of Conduct to [email protected]. The Perfect team is committed to enforcing this Code of Conduct to ensure everyone who wishes to use, contribute to, and comment on the Perfect project may do so freely and openly and without fear of reprisal.

We will investigate all complaints of unacceptable or abusive behaviour or comments expediently, and we will maintain the confidentiality of the person who reports any perceived infraction or wrongdoing to us. We will not tolerate any form of direct or indirect harassment or discrimination within the Swift-Perfect community, and will take appropriate, fair, and corrective action to any instance of inappropriate behaviour.

The Perfect team maintains the right to remove, edit, or reject any comments, code, edits, or issues that do not align with our Code of Conduct.

Perfect (PerfectlySoft/Perfect)

Searching Database…

13.7K ·GitHub
这是什么?Perfect 是一套面向服务器端 Swift 的完整工具箱、框架和应用服务器:Swift 开发者可以用它完全使用 Swift 来搭建网站、REST 服务和移动端后端。
那它到底是一个框架、一个库,还是一整台服务器?三者兼具。这个仓库存放核心的 PerfectLib,其他独立的模块则提供 HTTP 1.1 服务器、数据库连接器、WebSocket、Mustache 模板等功能——你可以按服务需要自行组装这些组件。
我该怎么开始第一个项目?克隆 Perfect Template 起步项目,然后用 Swift Package Manager 编译,它会生成一个独立的可执行 HTTP 服务器。官方还同步发布了新手教程和完整的 API 参考文档。
在开始构建之前,我需要安装什么?只需要 Swift 本身:master 分支可以在 Xcode 11 或 Ubuntu 上的 Swift 5 工具链下编译,所以一台装了 Xcode 的 Mac,或一台装了 Swift 5 的 Ubuntu 机器就足够了。
这个项目还在积极维护吗?没有了。这个仓库现在被标记为 Legacy Perfect(遗留版本),可以把它看作一个成熟但已冻结的项目:用来学习或维护现有服务没问题,但如果要在它上面开发新东西,请先确认兼容性。
我必须是 Swift 开发者才能用它吗?是的——Perfect 是为希望在客户端和服务器端使用同一种语言的 Swift 工程师打造的,不过配套指南面向各种水平的开发者。
做好的服务可以部署到哪里?任何支持 Swift 的 Linux 服务器都可以。另外还有一个 Perfect Assistant,这是一款 macOS 桌面应用,可以帮助部署到 AWS 和 Google Cloud。
它开箱即支持连接哪些数据库?官方提供 Redis、SQLite、PostgreSQL、MySQL、MongoDB 和 FileMaker Server 的连接器,另外还有一个 FastCGI 模块,如果你通过 Apache 托管而不是用内置服务器,可以用它配合 Apache 2.4。
为什么用 Swift 来写 Web 服务器?卖点是全栈统一使用一种语言:iOS 和 macOS 开发者可以用同一套工具同时开发自己的应用和服务器端 REST 服务,README 中说这能提升开发效率。
它的网络层是异步的吗?是的。Perfect 运行在一个完全异步、高性能的网络引擎上,目标是支撑可扩展的互联网服务,而且你可以把内置的 JSON 或模板系统换成自己喜欢的那套。
有哪些示例项目可以学习?社区示例包括一个 WebSocket 服务器、URL 路由和一个上传文件枚举器,Perfect Examples 仓库里还有更多示例,并配有入门教程帮助你迈出第一步。
What are similar projects?drogon, aiohttp, chat, vapor, sails, martini, carno.js, gin-vue-admin
Size
5.3 MB
Stars
13.7K
Age
11y
Commits · 90 Days