Server side Swift with a proper production ready example
updated about 1 year ago; latest suggestion 12 months ago
This proposal has been withdrawn...
Introduction - About Me
Hi, I am an iOS engineer who recently started working on server side Swift around 6 -7 months ago and is now doing it full time. I am able to do it full time because I had a dream project which I wanted to work on for a long time so I left my job at the startup I was working, took a membership at co-working space and started experimenting with frameworks and started using Kitura for the production code of my project.
The best part is I am enjoying it ✌🏼 and I can assure that you will also once you get comfortable with it 🤟🏼.
So here comes the final proposal. In this talk, I would be sharing the first thing I would be sharing with you is the pons and cons of server-side Swift I mean when it comes to Swift thinking of writing backend in it seems an awesome idea but there are some small shortcomings too as they are with every early-stage technology. Then I will share some of my personal experiences. Then I would be talking about the direction in which the development is going on as I had spent personal time with Perfect and Kitura's engineers. Then I would be actually teaching you how to write a backend and getting started with it with an example application (written in Kitura) sharing all the modules a backend should have (list is given below) and then finally deploy the app with the help of Docker and what challenges you face while deployment as there are many like different development and deploy environments like and Linux respectively if we talk about the general scenario.
List of modules which would be there in the sample application
Some issues and common mistakes -
When it comes to Server-side Swift there are few issues which can become a very big entry barrier especially if you are a front-end iOS developer and want to dive into backend using Swift. The biggest barrier to the entry is the lack of good examples, tutorials, and documentation(in few cases) and even if you are able to take entry there are other few things like Swift package manager isn't that much stable yet and there are few things you have to take care of and if you don't you will waste lot of time scratching your head for no reason like for example - in some cases naming things with hyphens(-) can result in issues, some arbitary bug in the framework(which you are using) which isn't detected yet and you might be the fist one to find it like I personally found 3 major bugs etc and sometime you might have to write OS dependent code because opensource version of Foundation isn't complete yet.
Routes and Request handlers -
These are one of the most important element of backend development as whatever operation you want to perform you would be performing it when the client would be requesting you to perform it and these events can only be triggered with the help of routes and the operation can be performed with the request handlers. So it would be a brief intro of Routes and Request Handlers which would open the path for understanding upcoming topics.
Would be explaining how middlewares are useful and will explain their importance with the help of example application.
Database Management (Using MongoDB) -
Most of the backend applications are incomplete without the help of good Database setup so would be explaining how MongoDB is used in the code with the help of MongoKitten. This module will include setting up the MongoDB, using it in the application, for example, demonstrating different queries and avoiding common mistakes done by the people and finally how to run mongo DB on a different database server and all the things which an individual needs to deal in context of the database in an application.
Session Management -
In this would be explaining how a session is managed and everything without using any 3rd party dependency or anything so the attendies can understand how things work under the hood.
In this would be explaining how token based authentication works and why it is used, I mean one cannot use sessions like web in iOS and Android applications so you have to authenticate the application with token based authentication so would be explaining this to attendees without using any third party dependency so they understand how things work under the hood so they can implement authentication by understanding it. Architecture and best practices - Now once we are done with all of it then would be focusing on the way the app should be designed so it follows a proper Microservices architecture and would be covering the things which are different on Linux, what happens is when you run your code on macOS it runs but when you push on server there are errors so would be explaining the ways to deal with it.
Like iOS apps developing them is a challenge in itself but another big challenge there is the deployment of the application, same is in the case of backend engineering you have several challenges if you want to do it in a foolproof manner like you should know how your application should be broken into Microservices, what are Microservices, why you should do it, what is a VM, what is docker, what is a container, why are we using docker instead of VM etc. So I would be sharing a live deployment of the application with attendees after going through the explanation.
I would be excluding the testing from the talk because they duration of the talk would be around 30-35 mins so if I will cover testing then it will only take 10 - 15 minutes because there would be the requirement of jumping from the main project and test cases, failing a test case then passing it and then refactoring I mean Red Green refactor so it would consume a lot of time so what I will do is I will provide the test cases in the project so who so ever would be interested will go through them and if would be having doubt then would clarify in the office hours.
I would be taking the approach of explaining the concept with a flow diagram and then showing the live code running and hitting the endpoints with Postman(API client). I would be taking this approach because I want to focus on explaining the concepts without killing much time.
Yeah, it can be too much for 30 - 35 minutes but I think it can be a good idea to include all the examples in slides with proper screenshots and GIFs in slides so I don't have to jump to IDE again and again and show live examples. So I think in this way most of all might get covered in 30-35 mins.
It seems like you have a tremendous amount to cover in 30 minutes. You might want to consider ways to focus this talk a bit more.
I want a suggestion on something. Should I add PushNotifications too to the talk? I mean it will take 5 mins but can be useful as it's a very general requirement. And to give a good go through without consuming much time it can be done easily with Firebase so if you suggest it then I can add it to the proposal. Please let me know.