iPhreaks

209 iPS Vapor with Bob Snyder


Listen Later

iPS 209: Vapor with Bob Snyder On today's episode of iPhreaks, Andrew Madsen and Jaim Zuber talk about Vapor with Bob Snyder. Bob is on the show today to discuss the structure of Vapor and web app deployment, etc. Don't miss this one! [00:01:20] – Introduction on Vapor Vapor is a server-side Swift framework. It came out two months after Swift became open-source. A couple of weeks ago, they just released Vapor 2.0. It’s a big jump from 1.5. Swift has protocols and has incredible performance as compared to Objective-C and other languages like JavaScript. It deserves more attention. [00:02:30] – Back-end development before Vapor Bob is a former graphic designer. He went to a boot camp last year and made that career shift. The boot camp focused on Python and iOS but that was all front-end for apps. Right now, he is a full-stack developer for a start-up called Crew and he works on Objective-C and Python, and Python Django for the backend. You can deploy, build, and have a production-ready server-side Swift application but you probably want to keep it for a small to mid-size projects. It’s not quite enterprise-level yet. [00:03:35] – Swift vs. Python Besides the curly brackets, Bob also loves the Swift protocols. With these protocols, you can apply pretty much different attributes to a class. Working with Xcode and protocols, it gives you good practices for building applications. It’s also type-safe. When it comes to making variables, knowing that you’re keeping the same type of values is very important. That’s actually one of the reasons why the performance is better than JavaScript that isn’t type-safe. [00:04:45] – Projects with Vapor Bob has a project with his friend, and they’re making it open-source. It’s a web-based application where you just insult your friends and maybe insult you back. It goes back and forth. In doing that, what allowed Bob to really explore is how easy it is to set up relationships for your database inside Swift versus something else like Python. [00:05:40] – Structure of Vapor You have the Droplet which is your entire application. It’s where everything comes down to. That is your server. Everything else just kind of relates to that. You have the Vapor Nodes, which is going to be your central point for all of your data types. The real premise of the server is you have information that you take from outside, get request, you process them, and most of the time that you’re sending it to the database or returning it without going to the database. Each one of those parts to this environment generally takes a lot of interaction to get information for one piece to the next. That’s what vapor nodes kind of comes into play. It makes using that data very easy. [00:06:30] – Node A node is a class that has protocols built on top of it. If you want to return a JSON object with a request that you got, you can immediately spit out a JSON object. You get some information from the database. It’s basically a converter that you can return almost any format that you will need inside of Vapor. [00:08:25] – Fluent Nodes interact with Fluent. It allows Vapor to communicate with whatever database you’re using. It makes it easy to go from Vapor to a MySQL, a Postgre, or a MongoDB database. You can have a basic server. You’re going to have the Droplet. You’re going to have the information you want to get into a Node. And then, you’re going to send that information to Fluent. Then, Fluent will communicate your profile of the database. That will send on to the actual database. If you want to change the database you’re using, you can do that without changing Fluent, without changing Nodes, or the Droplet. All you have to do is change how your profile on the back-end. [00:09:30] – Droplets Vapor has different packages that are built into the Vapor library. The Droplet is the thing that you create. You instantiate one of those. That’s the web server and you can attach handlers for URL’s for routing to it, etc....
...more
View all episodesView all episodes
Download on the App Store

iPhreaksBy Charles M Wood

  • 4.8
  • 4.8
  • 4.8
  • 4.8
  • 4.8

4.8

17 ratings


More shows like iPhreaks

View all
Teach Me To Code » Screencasts by Charles Max Wood

Teach Me To Code » Screencasts

11 Listeners

JavaScript Jabber by Charles M Wood

JavaScript Jabber

235 Listeners

Ruby Rogues by Charles M Wood

Ruby Rogues

45 Listeners

The Freelancers' Show by Charles M Wood

The Freelancers' Show

23 Listeners

React Native Radio by Jamon Holmgren, Robin Heinze, Mazen Chami

React Native Radio

59 Listeners

My JavaScript Story by Charles M Wood

My JavaScript Story

4 Listeners

JavaScript Jabber by Charles M Wood

JavaScript Jabber

61 Listeners

Ruby Rogues by Charles M Wood

Ruby Rogues

21 Listeners

Adventures in Angular by Charles M Wood

Adventures in Angular

15 Listeners