Server Side Swift with Kitura

Jun 12 2018 · Intermediate · Video Course · 2 hrs, 20 mins

Learn how to create server side Swift apps with Kitura.

Version

  • Swift 4, iOS 11, Xcode 9

Hello, Kitura

We'll cover what you'll learn in this course, and how you'll walk away from this course with a truly full-stack application.

1

We'll walk through the finished product and what it should look like, outlining each component of the application and what you'll use to make it.

2

We'll set up your development environment and make sure you have everything you need to know to write all the code you'll need for this course.

3

I'll walk you through the basics of HTTP and how it will act as a data transport layer for the basis of this course.

4

Let's set up Docker on your machine so that you can easily test your Kitura API on Linux and prepare it for deployment.

5

Learn how to set up your API for deployment with Cloud Foundry via IBM Cloud, and set up your machine to easily push new versions every time you make a change.

6

I'll walk you through what to expect when you "push the button" to put your API in the Cloud, and how to test it when it's live on the internet!

7

I'll also walk you through the Kitura CLI, which allows you to generate boilerplate Kitura servers from the command line.

8

Conclusion

1:07

Let's recap everything we've covered and how it positions you to focus on one component at a time as we go through the rest of the course!

9

Completing Your Backend

We'll cover the basics introduced in Kitura 1.0, and then go into some of the finer points of what was added to the Kitura framework in version 2.0, including what a router is and how codable routes work.

10

Let's make a basic GET route using Kitura, and then let's enhance and streamline that route using the Codable protocol with Kitura's best built in feature - Codable Routing.

11

Now that you've made two routes in Kitura, you'll make your third one to improve on its functionality.

12

I'll show you how CouchDB works, and how you'll make use of it to store journal entries that you enter with EmojiJournal.

13

I'll walk you through setting up CouchDB on your local machine, and how to connect your Kitura server to it.

14

After I show you how to set up an instance of CouchDB in IBM Cloud, I'll challenge you to connect to it once you have all the information you need to do so.

15

I'll walk you through writing a series of persistence functions in your Kitura application, so that you have an easy way to keep track of how your app uses CouchDB.

16

After you write your persistence functions, you'll hook up your codable routes to your database, finally putting all the pieces together.

17

Conclusion

0:50

Take a second to smell the roses and look at what you built! I'll run you through a test drive of your Kitura application.

18

Linking Your iOS Client To Kitura

Learn how KituraKit makes client-side connections to Kitura straightforward, and how it can drastically reduce the amount of code for networking on your client.

19

Let's walk through what the iOS app does right now, and highlight the pieces you need to get into and make work.

20

I'll help you set up KituraKit with Cocoapods on your iOS application so that nothing stands in the way of you writing your networking code.

21

We'll walk through writing a client class for your KituraKit client, so that you have easy functions to use when you are connecting your iOS app to your server.

22

Now that you've made your client class, I'll help you hook up a couple of the functions to the UI, and let you finish putting the puzzle together yourself.

23

Conclusion

1:02

You can be a full-stack developer! Let's test out your mobile application, and see how well it works with your shiny new Kitura server!

24

Templating A HTML Front-End With Stencil

Learn why it's important to have web functionality for your application and a client thats accessible to everyone, and how Kitura can help you accomplish that.

25

Learn how Stencil, a templating engine, can help you make any website, and how you can pass info from your Swift API into your HTML page with KituraStencil.

26

Let's start by serving up a static HTML page using your existing Kitura router, and take some time to explain how you can serve a context with it.

27

Expand on your previous route by adding some context to your template page, and take a look at how that gets populated throughout your HTML - you'll have a web UI working by the end of this video!

28

Now that you can see the entries you've populated, let's make it possible to use the web UI to add another entry to your EmojiJournal.

29

You've got everything you need to know to fit the last puzzle piece into your web UI. I challenge you to add it in and then delete some EmojiJournal entries.

30

Conclusion

1:42

You did it! Let's see how you can use either of your clients at any time to use EmojiJournal, and what you might be interested in trying out next time around!

31

Contributors

Comments