Suche senden
Hochladen
API дизайн: уроки известных проектов, Андрей Саломатин, KievJS
•
0 gefällt mir
•
333 views
F
flpvsk
Folgen
Доклад с KievJS, 2018-10-26
Weniger lesen
Mehr lesen
Ingenieurwesen
Melden
Teilen
Melden
Teilen
1 von 64
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
From programming languages to network protocols: lessons on API design
From programming languages to network protocols: lessons on API design
flpvsk
Kanban team simulation
Kanban team simulation
flpvsk
Hard working team simulation
Hard working team simulation
flpvsk
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Empfohlen
From programming languages to network protocols: lessons on API design
From programming languages to network protocols: lessons on API design
flpvsk
Kanban team simulation
Kanban team simulation
flpvsk
Hard working team simulation
Hard working team simulation
flpvsk
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
Weitere ähnliche Inhalte
Empfohlen
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
Empfohlen
(20)
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
ChatGPT webinar slides
ChatGPT webinar slides
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
API дизайн: уроки известных проектов, Андрей Саломатин, KievJS
1.
API дизайн: уроки известных
проектов Aндрей Саломатин 2018-10-26 @flpvsk @KyivJS
2.
Мы возможно встречались
на —MoscowJS —Frontend Unioin Conf —RadioJS 2018-10-26 @flpvsk @KyivJS 2
3.
Code Podcast codepodcast.com —Об общих
концепциях в программировании —Тематические эпизоды —На английском 2018-10-26 @flpvsk @KyivJS 3
4.
В этом докладе —3
примера дизайна —API систем —Много абстрактной информации 2018-10-26 @flpvsk @KyivJS 4
5.
В этом докладе —3
примера дизайна —API систем —Много абстрактной бесполезной информации 2018-10-26 @flpvsk @KyivJS 5
6.
Зачем? 2018-10-26 @flpvsk @KyivJS
6
7.
Application Programming Interface2018-10-26 @flpvsk @KyivJS
7
8.
#1 Цена абстракции2018-10-26 @flpvsk @KyivJS
8
9.
DOM API2018-10-26 @flpvsk @KyivJS
9
10.
Примеры 2018-10-26 @flpvsk @KyivJS
10
11.
2018-10-26 @flpvsk @KyivJS
11
12.
2018-10-26 @flpvsk @KyivJS
12
13.
2018-10-26 @flpvsk @KyivJS
13
14.
Immediate Mode GUI 2018-10-26
@flpvsk @KyivJS 14
15.
#2 Адрес / Содержимое2018-10-26 @flpvsk
@KyivJS 15
16.
Адрес = содержимое GET
'/person/flpvsk' PUT '/person/flpvsk' POST '/person/flpvsk/posts' 2018-10-26 @flpvsk @KyivJS 16
17.
Пример ! --> POST {
text: 'I love all' } '/flpvsk/posts' " <-- { id: 'addr1' } # --> POST { share: 'newId' } '/kickz/posts' " <-- { id: …, share: 'newId' } ! --> PUT { text: 'I hate birds' } '/flpvsk/posts/addr1' 2018-10-26 @flpvsk @KyivJS 17
18.
Пример ! --> POST {
text: 'I love all' } '/flpvsk/posts' " <-- { id: 'addr1' } # --> POST { share: 'newId' } '/kickz/posts' " <-- { id: …, share: 'newId' } ! --> PUT { text: 'I hate birds' } '/flpvsk/posts/addr1' 2018-10-26 @flpvsk @KyivJS 17
19.
Пример ! --> POST {
text: 'I love all' } '/flpvsk/posts' " <-- { id: 'addr1' } # --> POST { share: 'newId' } '/kickz/posts' " <-- { id: …, share: 'newId' } ! --> PUT { text: 'I hate birds' } '/flpvsk/posts/addr1' 2018-10-26 @flpvsk @KyivJS 17
20.
Пример ! --> POST {
text: 'I love all' } '/flpvsk/posts' " <-- { id: 'addr1' } # --> POST { share: 'newId' } '/kickz/posts' " <-- { id: …, share: 'newId' } ! --> PUT { text: 'I hate birds' } '/flpvsk/posts/addr1' 2018-10-26 @flpvsk @KyivJS 17
21.
Пример ! --> POST {
text: 'I love all' } '/flpvsk/posts' " <-- { id: 'addr1' } # --> POST { share: 'newId' } '/kickz/posts' " <-- { id: …, share: 'newId' } ! --> PUT { text: 'I hate birds' } '/flpvsk/posts/addr1' 2018-10-26 @flpvsk @KyivJS 17
22.
2018-10-26 @flpvsk @KyivJS
18
23.
2018-10-26 @flpvsk @KyivJS
19
24.
Git как база
данных —Commit, tree, blob – объекты в базе Git —Объект это файл в .git/objects/${id} —ID объекта это SHA1 от содержимого —blob = содержимое файла 2018-10-26 @flpvsk @KyivJS 20
25.
Git > git init
. > tree .git/objects objects/ 2018-10-26 @flpvsk @KyivJS 21
26.
Git > git init
. > tree .git/objects objects/ 2018-10-26 @flpvsk @KyivJS 21
27.
Git > git init
. > tree .git/objects objects/ 2018-10-26 @flpvsk @KyivJS 21
28.
Git > echo '{
"text": "I love all" }' > newId.json > git add newId.json > tree .git/objects objects/ └── d7 └── 62b07ccb7fd8ef56f06a72b3b716cfd0c850b0 2018-10-26 @flpvsk @KyivJS 22
29.
Git > echo '{
"text": "I love all" }' > newId.json > git add newId.json > tree .git/objects objects/ └── d7 └── 62b07ccb7fd8ef56f06a72b3b716cfd0c850b0 2018-10-26 @flpvsk @KyivJS 22
30.
Git > echo '{
"text": "I love all" }' > newId.json > git add newId.json > tree .git/objects objects/ └── d7 └── 62b07ccb7fd8ef56f06a72b3b716cfd0c850b0 2018-10-26 @flpvsk @KyivJS 22
31.
Git > echo '{
"share": "d762…b0" }' > shareId.json > git add shareId.json > tree .git/objects objects/ ├── 6a │ └── a55922efb726913f2848db03869efc03eea396 └── d7 └── 62b07ccb7fd8ef56f06a72b3b716cfd0c850b0 2018-10-26 @flpvsk @KyivJS 23
32.
Git > echo '{
"share": "d762…b0" }' > shareId.json > git add shareId.json > tree .git/objects objects/ ├── 6a │ └── a55922efb726913f2848db03869efc03eea396 └── d7 └── 62b07ccb7fd8ef56f06a72b3b716cfd0c850b0 2018-10-26 @flpvsk @KyivJS 23
33.
Git > echo '{
"share": "d762…b0" }' > shareId.json > git add shareId.json > tree .git/objects objects/ ├── 6a │ └── a55922efb726913f2848db03869efc03eea396 └── d7 └── 62b07ccb7fd8ef56f06a72b3b716cfd0c850b0 2018-10-26 @flpvsk @KyivJS 23
34.
Git > echo '{
"text": "I hate birds" }' > newId.json > git add newId.json > tree .git/objects objects/ ├── 52 │ └── 9b374bb968321f4651d03f74dd38198fabb58b ├── 6a │ └── a55922efb726913f2848db03869efc03eea396 └── d7 └── 62b07ccb7fd8ef56f06a72b3b716cfd0c850b0 2018-10-26 @flpvsk @KyivJS 24
35.
Git > echo '{
"text": "I hate birds" }' > newId.json > git add newId.json > tree .git/objects objects/ ├── 52 │ └── 9b374bb968321f4651d03f74dd38198fabb58b ├── 6a │ └── a55922efb726913f2848db03869efc03eea396 └── d7 └── 62b07ccb7fd8ef56f06a72b3b716cfd0c850b0 2018-10-26 @flpvsk @KyivJS 24
36.
Git > echo '{
"text": "I hate birds" }' > newId.json > git add newId.json > tree .git/objects objects/ ├── 52 │ └── 9b374bb968321f4651d03f74dd38198fabb58b ├── 6a │ └── a55922efb726913f2848db03869efc03eea396 └── d7 └── 62b07ccb7fd8ef56f06a72b3b716cfd0c850b0 2018-10-26 @flpvsk @KyivJS 24
37.
2018-10-26 @flpvsk @KyivJS
25
38.
CouchDB ! --> POST {
text: 'I love all' } '/posts' " <-- { id: 'addr1', rev: '1-abc' } ! --> PUT { text: 'I hate birds', _rev: '1-abc' } '/posts/addr1' " <-- { id: 'addr1', rev: '2-bde' } 2018-10-26 @flpvsk @KyivJS 26
39.
CouchDB ! --> POST {
text: 'I love all' } '/posts' " <-- { id: 'addr1', rev: '1-abc' } ! --> PUT { text: 'I hate birds', _rev: '1-abc' } '/posts/addr1' " <-- { id: 'addr1', rev: '2-bde' } 2018-10-26 @flpvsk @KyivJS 26
40.
CouchDB ! --> POST {
text: 'I love all' } '/posts' " <-- { id: 'addr1', rev: '1-abc' } ! --> PUT { text: 'I hate birds', _rev: '1-abc' } '/posts/addr1' " <-- { id: 'addr1', rev: '2-bde' } 2018-10-26 @flpvsk @KyivJS 26
41.
CouchDB ! --> POST {
text: 'I love all' } '/posts' " <-- { id: 'addr1', rev: '1-abc' } ! --> PUT { text: 'I hate birds', _rev: '1-abc' } '/posts/addr1' " <-- { id: 'addr1', rev: '2-bde' } 2018-10-26 @flpvsk @KyivJS 26
42.
Другие проекты 2018-10-26 @flpvsk
@KyivJS 27
43.
Другие проекты —BitTorrent 2018-10-26 @flpvsk
@KyivJS 27
44.
Другие проекты —BitTorrent —BitCoin 2018-10-26 @flpvsk
@KyivJS 27
45.
Другие проекты —BitTorrent —BitCoin —IPFS 2018-10-26 @flpvsk
@KyivJS 27
46.
Другие проекты —BitTorrent —BitCoin —IPFS —Dat 2018-10-26 @flpvsk
@KyivJS 27
47.
#3 Состояние / Операция2018-10-26 @flpvsk
@KyivJS 28
48.
Найди три отличия //
State { _id: 'cl1+1-2', name: 'Andrey', podcasts: [ 'Code' ] } // Op { $set: { name: 'Andrey' } } 2018-10-26 @flpvsk @KyivJS 29
49.
Состояние и операции //
State { _id: 'cl1+1-2', name: 'Andrey', podcasts: [ 'Code' ] } // Ops [ { $set: { name: 'Andrey' } }, { podcasts: { $add: 'Code' } } ] 2018-10-26 @flpvsk @KyivJS 30
50.
Состояние и операции //
State { _id: 'cl1+1-2', name: 'Andrey', podcasts: [ 'Code' ] } // Ops [ { $set: { name: 'Andrey' } }, { podcasts: { $add: 'Code' } } ] 2018-10-26 @flpvsk @KyivJS 30
51.
Состояние и операции //
State { _id: 'cl1+1-2', name: 'Andrey', podcasts: [ 'Code' ] } // Ops [ { _id: 'cl1+1', $set: { name: 'Andrey' } }, { _id: 'cl1+2', _parent: 'cl1+1', podcasts: { $add: 'Code' } }, ] 2018-10-26 @flpvsk @KyivJS 31
52.
Патч // State 1 { _id:
'cl1+1-2.cl2+1-2', name: 'Andrey S', podcasts: [ 'Code' ], instruments: [ 'Bass' ], } // State 2 { _id: 'cl1+1-2', name: 'Andrey', podcasts: [ 'Code' ] } 2018-10-26 @flpvsk @KyivJS 32
53.
Патч // Ops [ { _id:
'cl1+1', $set: { name: 'Andrey' } }, { _id: 'cl1+2', _parent: '1+cl1', podcasts: { $add: 'Code' } }, { _id: 'cl2+1', $set: { name: 'Andrey S' } }, { _id: 'cl2+2', _parent: 'cl2+1', instruments: { $add: 'Bass' } }, ] 2018-10-26 @flpvsk @KyivJS 33
54.
Патч // Patch ===
State { _id: 'cl2+1-2', name: 'Andrey S', instruments: [ 'Bass' ], } 2018-10-26 @flpvsk @KyivJS 34
55.
Состояние ~ Патч
~ Лог операций 2018-10-26 @flpvsk @KyivJS 35
56.
Пример из HeyMoose! 2018-10-26
@flpvsk @KyivJS 36
57.
Другие проекты 2018-10-26 @flpvsk
@KyivJS 37
58.
Другие проекты —RON –
replicated object model 2018-10-26 @flpvsk @KyivJS 37
59.
Другие проекты —RON –
replicated object model —Kafka 2018-10-26 @flpvsk @KyivJS 37
60.
Другие проекты —RON –
replicated object model —Kafka —Dat 2018-10-26 @flpvsk @KyivJS 37
61.
Итог 2018-10-26 @flpvsk @KyivJS
38
62.
Итог —Предположения определяют API 2018-10-26
@flpvsk @KyivJS 38
63.
Итог —Предположения определяют API —Изучайте
проекты вне вашей специализации 2018-10-26 @flpvsk @KyivJS 38
64.
@flpvsk codepodcast.com 2018-10-26 @flpvsk @KyivJS
39
Jetzt herunterladen