Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Vapor - Swift Server-Side
Search
Giovane Possebon
April 18, 2018
Technology
0
75
Vapor - Swift Server-Side
Giovane Possebon
April 18, 2018
Tweet
Share
More Decks by Giovane Possebon
See All by Giovane Possebon
Sketch and Zeplin
giovanepossebon
0
45
FROM MV(X) TO VIP(ER)
giovanepossebon
0
29
Other Decks in Technology
See All in Technology
公開初日に Gemini CLI を試した話や FFmpeg と組み合わせてみた話など / Gemini CLI 初学者勉強会(#AI道場)
you
PRO
0
1.1k
AIでテストプロセス自動化に挑戦する
sakatakazunori
1
130
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
810
American airlines ®️ USA Contact Numbers: Complete 2025 Support Guide
airhelpsupport
0
390
アクセスピークを制するオートスケール再設計: 障害を乗り越えKEDAで実現したリソース管理の最適化
myamashii
1
370
AWS 怖い話 WAF編 @fillz_noh #AWSStartup #AWSStartup_Kansai
fillznoh
0
110
freeeのアクセシビリティの現在地 / freee's Current Position on Accessibility
ymrl
2
280
AWS CDKの仕組み / how-aws-cdk-works
gotok365
10
960
NewSQLや分散データベースを支えるRaftの仕組み - 仕組みを理解して知る得意不得意
hacomono
PRO
3
230
「Chatwork」のEKS環境を支えるhelmfileを使用したマニフェスト管理術
hanayo04
1
270
インフラ寄りSREの生存戦略
sansantech
PRO
9
3.5k
ビジネス職が分析も担う事業部制組織でのデータ活用の仕組みづくり / Enabling Data Analytics in Business-Led Divisional Organizations
zaimy
1
320
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
BBQ
matthewcrist
89
9.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Documentation Writing (for coders)
carmenintech
72
4.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Producing Creativity
orderedlist
PRO
346
40k
Being A Developer After 40
akosma
90
590k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.7k
Transcript
None
GIOVANE POSSEBON RAFAEL LEANDRO iOS Developer iOS Developer @giovanepossebon @CRF_Rafa
None
"Vapor is the most used web framework for Swift” INTRODUÇÃO
brew install Vapor INSTALLATION
TEMPLATES vapor new <projectName> --template=web
vapor build -> vapor run COMPILE & RUN
vapor xcode
FOLDER STRUCTURE
DROPLET “Responsible for registering routes, starting the server, and more…”
/droplet
CONFIG “Responsible for the providers, database preparations, etc…”
/config
ROUTE /user/32 V1
/routes/register
/routes/nesting
/routes/response Response ResponseRepresentable throw
/routes/response
/routes/representable
/routes/throws
PARAMETERS
/parameters/typesafe
/parameterizable
CONTROLLERS
None
/controllers
/controllers
/controllers
PROVIDERS
/provider Adding Provider Importing Provider
/provider Configure Provider
Fluent provides an easy, simple, and safe API for working
with your persisted data FLUENT & MODELS
/model
/prepare/database
/prepare/database id name age <database id type> string int
/model
CRUD
/crud Save Find
/crud Delete All
QUERIES
QUERIES Filter Sort Raw
query/filter Compare Subset
query/sort Basic sort Chaining sorts
query/raw Raw filter Raw query
JSON { }
json
json
drop.view.make(“index.html”) VIEWS
view Rendering HTML
LEAF A simple template language
Leaf #( ) #(variable) #import(template) #export("link") <a href="#( )"></a> #index(friend,
"1") #loop(friends, "friend") { <li>#(friend.name)</li> } #raw() { <a href="#raw">Anything goes!@#$%^&*</a> }
ENVIRONMENT
DEPLOY
vapor cloud deploy
None
None
https://vapor.team
Where to go?
vapor.university
None