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
Aviasales Отели - практический опыт объединени...
Search
Evgeny Shishkin
November 27, 2018
Programming
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Aviasales Отели - практический опыт объединения двух приложений
Evgeny Shishkin
November 27, 2018
More Decks by Evgeny Shishkin
See All by Evgeny Shishkin
Создать собственное приложение для планирования путешествий за 60 секунд
johnkil
0
49
Kotlin in production
johnkil
0
150
Life without Fragments
johnkil
1
530
6. Создание UI
johnkil
0
83
3. Создание Android приложения
johnkil
0
77
4. Структура Android приложения
johnkil
0
150
5. Android ресурсы
johnkil
0
78
1. Введение в Android
johnkil
0
71
2. Настройка среды разработки
johnkil
0
84
Other Decks in Programming
See All in Programming
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
120
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
230
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
180
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
1.1k
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
290
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.4k
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
17k
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
560
yield再入門 #phpcon
o0h
PRO
0
830
えっ!!コードを読まずに開発を!?
hananouchi
0
290
광주소프트웨어마이스터고등학교 DevFest 특강 - 바이브 코딩 시대에서 주니어 개발자로 살아남는 방법
utilforever
1
160
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
120
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Building Adaptive Systems
keathley
44
3.1k
sira's awesome portfolio website redesign presentation
elsirapls
0
310
Why Our Code Smells
bkeepers
PRO
340
58k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
200
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
57k
From π to Pie charts
rasagy
0
240
Everyday Curiosity
cassininazir
0
270
WCS-LA-2024
lcolladotor
0
770
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
280
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
270
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
400
Transcript
Практический опыт объединения двух приложений Евгений Шишкин, Aviasales +
Hotellook — метапоиск отелей
700 000 hotels 205 countries
None
Try to merge
+
Git
Mono-Repository
AS HL
AS HL HL Features
AS HL HL Features
AS HL HL Features
AS HL HL Features AS Features
AS HL HL Features AS Features
AS HL HL Features AS Features
AS HL HL Features HL Release AS Features
AS HL HL Features HL Release AS Features
AS HL HL Features HL Release AS Features hl_5.1.0
AS HL HL Features HL Release AS Features hl_5.1.0
AS HL HL Features HL Release AS Features hl_5.1.0
AS HL HL Features HL Release AS Release AS Features
hl_5.1.0
AS HL HL Features HL Release AS Release AS Features
hl_5.1.0
AS HL HL Features HL Release AS Release AS Features
hl_5.1.0 as_3.4.0
AS HL HL Features HL Release AS Release AS Features
hl_5.1.0 as_3.4.0
AS HL HL Features HL Release AS Release AS Features
hl_5.1.0 as_3.4.0
Renaming
Hotellook hl_app/ hl_wear/ hl_core/ hl_base/ hl_location/ hl_maps/ hl_utils/ Modules Aviasales
as_app/ as_wear/ as_core/
Hotellook/ res/ color/ hl_color.xml drawable/ hl_drawable.xml layout/ hl_layout.xml menu/ hl_menu.xml
… Aviasales/ res/ color/ color.xml drawable/ drawable.xml layout/ layout.xml menu/ menu.xml … Resources
Dependencies
OutOfMemoryError
OutOfMemoryError android:largeHeap="true"
Mainframer
Mainframer Tool that allows you to move build process from
a local machine to a remote one.
• CPU: Intel Core i7-8700K • Motherboard: MSI Z370 •
Memory: DDR4 Corsair 2x16Gb 3200MHz • SSD: Samsung 970 PRO • …
• CPU: Intel Core i7-8700K • Motherboard: MSI Z370 •
Memory: DDR4 Corsair 2x16Gb 3200MHz • SSD: Samsung 970 PRO • … ≈ 100k RUB
• CPU: Intel Core i7-8700K • Motherboard: MSI Z370 •
Memory: DDR4 Corsair 2x16Gb 3200MHz • SSD: Samsung 970 PRO • … ≈ 100k RUB cheaper than slowest mbp 13
3x faster builds
None
Insides
1. Permissions
Check List • Base on RxJava • Singleton • Mockable
• SuppoF logging
API
PermissionCheckResult PermissionGranted PermissionDenied val permission: String val permission: String val
shouldShowRequestPermissionRationale: Boolean Result
request(Manifest.permission.ACCESS_FINE_LOCATION)
subscribe() request(Manifest.permission.ACCESS_FINE_LOCATION)
subscribe() request(Manifest.permission.ACCESS_FINE_LOCATION)
subscribe() false request(Manifest.permission.ACCESS_FINE_LOCATION)
subscribe() subscribe() false request(Manifest.permission.ACCESS_FINE_LOCATION)
subscribe() subscribe() false request(Manifest.permission.ACCESS_FINE_LOCATION)
subscribe() subscribe() false true request(Manifest.permission.ACCESS_FINE_LOCATION)
requestSingle(Manifest.permission.ACCESS_FINE_LOCATION) subscribe() subscribe() PermissionDenied PermissionGranted
requestEach( Manifest.permission.CAMERA, Manifest.permission.ACCESS_FINE_LOCATION)
requestEach( Manifest.permission.CAMERA, Manifest.permission.ACCESS_FINE_LOCATION) subscribe()
subscribe() requestEach( Manifest.permission.CAMERA, Manifest.permission.ACCESS_FINE_LOCATION)
requestEach( Manifest.permission.CAMERA, Manifest.permission.ACCESS_FINE_LOCATION) subscribe()
requestEach( Manifest.permission.CAMERA, Manifest.permission.ACCESS_FINE_LOCATION) subscribe() PermissionDenied ACCESS_FINE_LOCATION
requestEach( Manifest.permission.CAMERA, Manifest.permission.ACCESS_FINE_LOCATION) subscribe() PermissionDenied PermissionGranted ACCESS_FINE_LOCATION READ_CONTACTS
requestEach( Manifest.permission.CAMERA, Manifest.permission.ACCESS_FINE_LOCATION) subscribe() PermissionDenied PermissionGranted ACCESS_FINE_LOCATION READ_CONTACTS
require(Manifest.permission.ACCESS_FINE_LOCATION)
require(Manifest.permission.ACCESS_FINE_LOCATION) subscribe()
require(Manifest.permission.ACCESS_FINE_LOCATION) subscribe()
require(Manifest.permission.ACCESS_FINE_LOCATION) subscribe() PermissionsDeniedException
require(Manifest.permission.ACCESS_FINE_LOCATION) subscribe() subscribe() PermissionsDeniedException
require(Manifest.permission.ACCESS_FINE_LOCATION) subscribe() subscribe() PermissionsDeniedException
require(Manifest.permission.ACCESS_FINE_LOCATION) subscribe() subscribe() PermissionsDeniedException
Mockable class Permissions( private val permissionsHandler: PermissionsHandler, private val logger:
((message: String) -> Unit)? = null )
Mockable interface PermissionsHandler { fun checkPermissions(vararg permissions: String): Observable<PermissionCheckResult> fun
requestPermissions(vararg permissions: String): Observable<PermissionCheckResult> }
Singleton abstract class PermissionsDelegate<in T : Any> : PermissionsHandler {
fun attach(component: T) {…} fun detach() {…} fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {…} PermissionsActivityDelegate PermissionsFragmentDelegate
Logging class Permissions( private val permissionsHandler: PermissionsHandler, private val logger:
((message: String) -> Unit)? = null ) Permissions: Request android.permission.CAMERA, android.permission.ACCESS_FINE_LOCATION Permissions: PermissionDenied(permission=android.permission.CAMERA, shouldShowRequestPermissionRationale=false) Permissions: PermissionGranted(permission=android.permission.ACCESS_FINE_LOCATION)
hips://github.com/JetradarMobile/mrbutler
2. Navigation
None
Navigation Navigation #1 Navigation #2 Navigation #3 Navigation #4 Navigator
Router Activity Application * Command 1_1 * Command 1_2 * Command 1_3 * Command 2_1 * Command 2_2 * Command 2_3 * Command 3_1 * Command 3_2 * Command 3_3 * Command 4_1 * Command 4_2 * Command 4_3
hips://github.com/JetradarMobile/nautilus
Thank you @johnkill