Are you a developer who’s familiar with all layers in software development? Then consider yourself a full-stack developer! If you’re like me, you started your career by learning all aspects of software development. And you realized that it takes a lot of work and time to develop an app that has both the front end and back end. I recently worked with mobile apps and I had a lot of fun with building and deploying them on my phone. One problem that I faced initially was switching from coding in Swift for an iOS app, and then back to coding in JavaScript for the app’s Node.js back end. It was confusing at times, switching from one programming language to another. For example, I would get used to Swift’s syntax for if-else statements or variable declarations where it’s different from JavaScript. It was confusing for me to work in multiple languages, especially different frameworks from different languages. I thought it would be more convenient to work with just one language on both contexts—and that’s where full-stack Swift came in handy.

Swift on the server with Kitura

Kitura is one of the server-side Swift web frameworks out there. I’ve found that working with Swift in both iOS app development and back-end development is making development easier all around. I only have to focus on the logic of the software and it ends up allowing me to code faster. Kitura also has a lot of supporting packages to make it easier for developers to build cloud-native applications. One package that really stood out to me during this process was Swift-Kuery-ORM. It’s an Object Relational Mapping library that’s built for Swift. The library makes it easy to connect your Kitura server with a SQL database. It uses Codables for the data models that make your RESTful APIs with Kitura simpler. This also allowed me to use the same Codables in both my iOS app and its server.

Try it now with Kitura on Kubernetes!

Kubernetes is already one of the popular container-orchestration platforms for developers who work with containers. In this new pattern, “Kitura on Kubernetes,” I walk you through building a server-side Swift with Kitura to create a step-tracking app that rewards users with “fitcoins.” This pattern uses three simple Kitura microservices that are connected to a PostgreSQL database for its persistence storage. This helps developers expose their back end for their iOS apps to communicate with. You also learn how to expose the back end in Kubernetes to a public domain with a TLS certificate for HTTPS.

Check out the GitHub repo and contribute

Kitura is open source and available on GitHub at IBM-Swift/Kitura. And all of the packages and tools can also be found on that organization. If you want to improve something or give feedback, feel free to open issues and/or pull requests!

Join The Discussion

Your email address will not be published. Required fields are marked *