Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a broader article about getting into Server-Side Swift #18

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Joannis
Copy link
Member

@Joannis Joannis commented Oct 18, 2024

I want this article to kickstart people new to Server-Side Swift. I want to add more guidance on what to look into, and point to various articles by us. Let's discuss how to best shape it from here.

@Joannis Joannis requested a review from tib October 18, 2024 14:28

Once you've created your project setup, you can start building your application. Both frameworks have excellent documentation that will guide you through the process of building a web application.

Alongside a web framework, you'll quickly find that you need to use other libraries to build your application. This commonly includes a database, observability and authentication among others.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Article Needed: What database to pick
Article Needed: Observability
Article Needed: Authentication (JWTKit tutorial for one)


Alongside a web framework, you'll quickly find that you need to use other libraries to build your application. This commonly includes a database, observability and authentication among others.

Swift Package Manager (SwiftPM) is the way to manage dependencies in Swift, and is built into the toolchain.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Article Needed: Getting started with SwiftPM


Swift is a modern, statically-typed language that's designed to be secure, fast and expressive. Thanks to features such as type inference and labeled parameters, Swift code reads like plain English.

Swift is also designed to be easy to pick up, with a syntax that's concise and expressive. However, as you delve deeper into the language, you'll find that Swift is just as powerful and performant as other languages like C++ and Rust.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: C++ interop article link (I believe Doug has one)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also mention of interop in general


Swift is also designed to be easy to pick up, with a syntax that's concise and expressive. However, as you delve deeper into the language, you'll find that Swift is just as powerful and performant as other languages like C++ and Rust.

This concept, claled "progressive disclosure", is one of the reasons why Swift is so popular. You can utilise high-level features, just like other popular languages. However, when you need to drop down to a lower level, Swift _also_ provides the tools to do so.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to progressive disclosure


Vapor 4 is an older framework, and has a "batteries-included" approach. It comes with a lot of features out of the box, such as authentication, database support, and templating. This makes Vapor very simple to set up.

Hummingbird 2 is the newer framework, adopting the latest ecosystem tools, and features a more modular approach. This makes Hummingbird more flexible and lightweight. In contrast to Vapor, the modular approach means that you only include the features you need, which can result in a smaller binary size, but requires more setup.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to Hummingbird article or the talk, on note about modern tools


The advantage of cloud functions is that you only pay for the time your code is running, which can be much cheaper than running a server 24/7. Especially for projects with a relatively low amount of traffic, cloud functions can be a great way to save money.

Popular cloud providers such as AWS, Google Cloud and Azure all provide cloud functions as a service. You can write your Swift code and deploy it to these services using their respective SDKs.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to deployment guides (soon)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant