Upload
stanfy
View
307
Download
0
Tags:
Embed Size (px)
Citation preview
Making friends with backend developers
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 1
Making friends with backend developers
Well, at least don't fight
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 2
Own experience
• Outsource
• Own products
• Working with remote backend team
• Creating backends ourselves
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 3
SituationRemote team:
Mobile team <~> Backend team
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 4
SituationRemote team:
Mobile team <~~~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ > Backend team
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 5
SituationRemote team:
Mobile team <~~~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~ ocean ~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ > Backend team
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 6
What we want from backend?
• Use less requests
• Send only needed data in suitable format
• Low latency
• Handle heavy computations
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 7
What we do?
• Hey, let's change this request
• Hey, let's add this field
• Hey, let's get data in that format
• Hey, let's have public URL to pics
• Hey, let's ...
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 8
What we usually hear from backend devs?
• No, I need yet another table to join
• No, it's not simple to add that field
• No, calculate it on your side
• No, our library can't do that
• No, I'll deploy these changes in next sprint
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 9
Problems
• Different goals
• Misunderstanding
• Lack of trust
• Limited experience
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 10
Solutions?
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 11
No solution
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 12
Approaches
• Write documentation
• Write tests
• Write constructive emails
• Explain on examples
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 13
API documentation
• Need time to write
• Need time to update
• Need time to search
• Useless if outdated
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 14
API documentation
• 'Put everything in one place' (not in emails, not in head)
• User friendly
• Access anywhere at any time
• Determined
• Always updated
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 15
Creating API documentation
• Auto generated docs from code
• API tests
• Wiki
• Google Doc
• Emails/skype history/developer's head
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 16
Documentation in Google Doc• Easy to create (access anywhere)
• Easy to share
• Easy to update (ACL)
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 17
Documentation in Google Doc• Loooong & slow
• Not super-structured (as wiki)
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 18
Must have: easy navigationTable of changes
• When
• Who
• What was changed (with links)
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 19
Must have: easy navigationTable of changes
• When
• Who
• What was changed (with links)
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 20
Must have: easy navigationContents
• Quick to search
• Easy to deep into
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 21
Must have: fundamentalsEnvinronment description
• Production server URL
• Dev server URL(s)
• Main accounts
• Version
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 22
Must have: fundamentalsData formats
• JSON/xml
• Response should be valid!
• Encoding
• Timestamp format
• Boolean format
• Float format
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 23
Must have: fundamentalsRequest formats
• GET
• POST (body format)
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 24
Must have: headersHTTP headers for Request
• Accept content-type
• Accept encoding
• Cookie
• Device
• App version
• Image scaling
• Session handling
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 25
Must have: HTTP codesHTTP codes
• What are valid?
• What app should do?
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 26
Must have: response structureResponse structure
• Inner error code
• Error message to user
• Body
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 27
Must have: communication with userInner error codes + message
• Ok
• Session is expired
• DB error
• Synchonization needed
• Just show message to user
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 28
Must have in API documentation
• Easy navigation and search:
• Table of changes
• Contents
• Fundamentals
• Envinronment description
• Data formats
• Request/response structure
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 29
API tests
• Shared with backend dev
• Public results
• 'Everything is broken' - blame
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 30
API tests. Heliumhttps://github.com/stanfy/helium
• DSL description
• Poke tests
• Scenarios tests
• Object generation
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 31
MiscommunicationBe definite
• Discuss smth in emails/chat -> add to API doc
• Add manager to email thread
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 32
MiscommunicationProvide full details
• Add headers
• Add timestamps
• Add session IDs
• Mark out details
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 33
Explain
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 34
Explain
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 35
MiscommunicationExplain
• Backend developer is not iPhone/Android user
• Have no idea how data will shown
• Design driven vs DB-data driven
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 36
MiscommunicationBe polite
• Thanks for quick changes
• Thanks for deploy
• Thanks for description
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 37
Why we need this?• We deal with real users• We gather feedbacks
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 38
Last slide
Heliumhttps://github.com/stanfy/helium
Google dochttp://bit.ly/1s69iVP
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 39
Questions
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 40
Making friends with backend developers. Stanfy MadCode Meetup, 2014. 41