Coroutines in Kotlin provide a way to write asynchronous, non-blocking code while maintaining a synchronous appearance and avoiding callbacks. Coroutines allow suspending functions to yield and resume work, providing an alternative to callbacks for asynchronous operations. The Kotlin standard library provides primitives for coroutines including suspending functions, builders for sequences and streams, and methods for job control and cancellation. While still experimental, coroutines are stable and recommended for use in production code.
Rust
Why do you care about Rust? Who has the time to learn all these new languages? It seems like a new one is popping up every other week and this trend is growing at an exponential rate. Good news, a fair number of them are crafted really well and efficiently solve specific problems. Bad news, how do you keep up with all of this, let alone decide which languages to include in your companies technology portfolio.
Despite the challenges of all these new languages, a majority of developers are intrigued about the idea of becoming a polyglot, but don't know where to begin or don't have the time. In my polyglot travels, there is one language of late that is the sure-fire answer to the above questions, Rust.
In this talk I’ll explore the value behind becoming more polyglotic as a developer, how to pick languages to learn, and then dive deep in the the language of Rust. Which in my opinion, is hands down the best up and coming languages to learn.
About the Presenter
Anthony Broad-Crawford has been a developer since the year 2000 with a short side stint as a semi-professional poker player. Since his transition to software development Anthony has...
1. Built 8 patent receiving technologies
2. Founded two global companies
3. Been a CTO (3x), CPO (1x), and CEO (1x)
and is currently the CTO at Fooda where he manages product, user experience, and engineering. Fooda is predominantly web and mobile technology company focused on bringing great & healthy food from the best restaurant's to people while at the office.
Through his career, in production applications Anthony has used Ruby, Java, Jave (Android), Objective-C and Swift, .NET, Erlang, Scala, Node.JS, LISP, Smalltalk, and even assembly, with his recent favorite, Rust . No, not all at the same time in the same application.
Anthony now spends his time building great teams, that leverage great technology, to build great products, but still looks to codes every chance he can get :)
Grand Central Dispatch (GCD) dispatch queues are a powerful tool for performing tasks. Dispatch queues let you execute arbitrary blocks of code either asynchronously or synchronously with respect to the caller.
Rust
Why do you care about Rust? Who has the time to learn all these new languages? It seems like a new one is popping up every other week and this trend is growing at an exponential rate. Good news, a fair number of them are crafted really well and efficiently solve specific problems. Bad news, how do you keep up with all of this, let alone decide which languages to include in your companies technology portfolio.
Despite the challenges of all these new languages, a majority of developers are intrigued about the idea of becoming a polyglot, but don't know where to begin or don't have the time. In my polyglot travels, there is one language of late that is the sure-fire answer to the above questions, Rust.
In this talk I’ll explore the value behind becoming more polyglotic as a developer, how to pick languages to learn, and then dive deep in the the language of Rust. Which in my opinion, is hands down the best up and coming languages to learn.
About the Presenter
Anthony Broad-Crawford has been a developer since the year 2000 with a short side stint as a semi-professional poker player. Since his transition to software development Anthony has...
1. Built 8 patent receiving technologies
2. Founded two global companies
3. Been a CTO (3x), CPO (1x), and CEO (1x)
and is currently the CTO at Fooda where he manages product, user experience, and engineering. Fooda is predominantly web and mobile technology company focused on bringing great & healthy food from the best restaurant's to people while at the office.
Through his career, in production applications Anthony has used Ruby, Java, Jave (Android), Objective-C and Swift, .NET, Erlang, Scala, Node.JS, LISP, Smalltalk, and even assembly, with his recent favorite, Rust . No, not all at the same time in the same application.
Anthony now spends his time building great teams, that leverage great technology, to build great products, but still looks to codes every chance he can get :)
Grand Central Dispatch (GCD) dispatch queues are a powerful tool for performing tasks. Dispatch queues let you execute arbitrary blocks of code either asynchronously or synchronously with respect to the caller.
HTTP/2, full json support and a great networking stack, all that is part of Go’s standard library. Just like everything else you need for a smashing web application. You can run your Go application on AWS Lambda, any operating system or in your browser with WebAssembly thanks to Go’s extreme portability.
You will learn the basics of web development with Go very hands on and with just the standard library of Go. Along the way we will touch essential tooling and dev setup. By then building a REST API or simple server rendered frontend is a piece of cake. And let us not forget to properly test the bastard, before putting it out in the wild.
entwickler.de Go Day: Go Web Development 101Jan Stamer
HTTP/2, full json support and a great networking stack, all that is part of Go’s standard library. Just like everything else you need for a smashing web application. You can run your Go application on AWS Lambda, any operating system or in your browser with WebAssembly thanks to Go’s extreme portability.
You will learn the basics of web development with Go very hands on and with just the standard library of Go. Along the way we will touch essential tooling and dev setup. By then building a REST API or simple server rendered frontend is a piece of cake. And let us not forget to properly test the bastard, before putting it out in the wild.
betterCode() Go: Einstieg in Go, Standard-Library und ÖkosystemJan Stamer
Die Programmiersprache Go ist angesagt – und das zu Recht. Populäre Projekte wie Kubernetes, Docker oder Terraform zeigen, dass Go bestens geeignet ist, um moderne Anwendungen für die Cloud zu entwickeln. Aber was macht Go interessant für Java-Entwickler oder C++-Entwicklerinnen? Go ist durch und durch auf Nebenläufigkeit und Parallelisierung ausgelegt. Außerdem hat Go ein statisches Typsystem und ist rasend schnell. Aber vor allem: Go macht Spaß.
An einfachen praktischen Beispielen lernst du mit Go zu entwickeln. Dazu lernst du wesentliche Konzepte von Go wie Interfaces, Goroutinen und Channels kennen. Du lernst die wichtigsten Entwicklungsumgebungen und Tools zur Go-Entwicklung kennen. Dann kannst du schon mit der mächtigen Standardbibliothek von Go eigene Anwendungen entwickeln. Zum Abschluss bekommtst du noch wichtige Reisetipps für deinen weiteren Weg durchs Go-Universum.
Go provides:
+ Concurrent execution
+ Synchronization and messaging
+ Multi-way concurrent control
Go does NOT provide direct thread manipulation
- Go multithreading is fully managed by Go runtime.
- In Go you use goroutines in place of threads
Learn about Goroutines, channels and standard library
Think Async: Asynchronous Patterns in NodeJSAdam L Barrett
JavaScript is single threaded, so understanding the async patterns available in the language is critical to creating maintainable NodeJS applications with good performance. In order to master “thinking in async”, we’ll explore the async patterns available in node and JavaScript including standard callbacks, promises, thunks/tasks, the new async/await, the upcoming asynchronous iteration features, streams, CSP and ES Observables.
JavaForum Nord 2021: Java to Go - Google Go für Java-EntwicklerJan Stamer
Die Programmiersprache Go ist angesagt – und das zu Recht. Populäre Projekte wie Kubernetes, Docker oder Terraform zeigen, dass Go bestens geeignet ist, um moderne Anwendungen für die Cloud zu entwickeln. Aber was macht Go interessant für Java-Entwickler? Go ist durch und durch auf Nebenläufigkeit und Parallelisierung ausgelegt. Außerdem hat Go ein statisches Typsystem und ist rasend schnell. Aber vor allem: Go macht Spaß.
In dieser Session lernt Ihr die Sprache Go mit ihren Stärken und Schwächen aus Sicht eines Java Entwicklers kennen. Ihr bekommt einen sehr praxisbezogenen Einstieg, HandsOn anhand von kleinen Projekt Beispielen.
Everybody is talking about ES6, but is anyone out there using it in production? Mango recently started adopting ES6 features that make our front-end code easier to write and maintain.
In this talk, I will explain why we decided to use ES6, how we started to use it in production (using npm, browserify and babel) and I'll explain what problems we found along the way and how we solved them.
Links:
https://getmango.com
https://getmango.com/blog/writing-es6-modules-with-6to5/
http://kangax.github.io/compat-table/
https://github.com/zloirock/core-js
https://github.com/mango/emitter
http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts
http://benmccormick.org/2015/04/07/es6-classes-and-backbone-js/
HTTP/2, full json support and a great networking stack, all that is part of Go’s standard library. Just like everything else you need for a smashing web application. You can run your Go application on AWS Lambda, any operating system or in your browser with WebAssembly thanks to Go’s extreme portability.
You will learn the basics of web development with Go very hands on and with just the standard library of Go. Along the way we will touch essential tooling and dev setup. By then building a REST API or simple server rendered frontend is a piece of cake. And let us not forget to properly test the bastard, before putting it out in the wild.
entwickler.de Go Day: Go Web Development 101Jan Stamer
HTTP/2, full json support and a great networking stack, all that is part of Go’s standard library. Just like everything else you need for a smashing web application. You can run your Go application on AWS Lambda, any operating system or in your browser with WebAssembly thanks to Go’s extreme portability.
You will learn the basics of web development with Go very hands on and with just the standard library of Go. Along the way we will touch essential tooling and dev setup. By then building a REST API or simple server rendered frontend is a piece of cake. And let us not forget to properly test the bastard, before putting it out in the wild.
betterCode() Go: Einstieg in Go, Standard-Library und ÖkosystemJan Stamer
Die Programmiersprache Go ist angesagt – und das zu Recht. Populäre Projekte wie Kubernetes, Docker oder Terraform zeigen, dass Go bestens geeignet ist, um moderne Anwendungen für die Cloud zu entwickeln. Aber was macht Go interessant für Java-Entwickler oder C++-Entwicklerinnen? Go ist durch und durch auf Nebenläufigkeit und Parallelisierung ausgelegt. Außerdem hat Go ein statisches Typsystem und ist rasend schnell. Aber vor allem: Go macht Spaß.
An einfachen praktischen Beispielen lernst du mit Go zu entwickeln. Dazu lernst du wesentliche Konzepte von Go wie Interfaces, Goroutinen und Channels kennen. Du lernst die wichtigsten Entwicklungsumgebungen und Tools zur Go-Entwicklung kennen. Dann kannst du schon mit der mächtigen Standardbibliothek von Go eigene Anwendungen entwickeln. Zum Abschluss bekommtst du noch wichtige Reisetipps für deinen weiteren Weg durchs Go-Universum.
Go provides:
+ Concurrent execution
+ Synchronization and messaging
+ Multi-way concurrent control
Go does NOT provide direct thread manipulation
- Go multithreading is fully managed by Go runtime.
- In Go you use goroutines in place of threads
Learn about Goroutines, channels and standard library
Think Async: Asynchronous Patterns in NodeJSAdam L Barrett
JavaScript is single threaded, so understanding the async patterns available in the language is critical to creating maintainable NodeJS applications with good performance. In order to master “thinking in async”, we’ll explore the async patterns available in node and JavaScript including standard callbacks, promises, thunks/tasks, the new async/await, the upcoming asynchronous iteration features, streams, CSP and ES Observables.
JavaForum Nord 2021: Java to Go - Google Go für Java-EntwicklerJan Stamer
Die Programmiersprache Go ist angesagt – und das zu Recht. Populäre Projekte wie Kubernetes, Docker oder Terraform zeigen, dass Go bestens geeignet ist, um moderne Anwendungen für die Cloud zu entwickeln. Aber was macht Go interessant für Java-Entwickler? Go ist durch und durch auf Nebenläufigkeit und Parallelisierung ausgelegt. Außerdem hat Go ein statisches Typsystem und ist rasend schnell. Aber vor allem: Go macht Spaß.
In dieser Session lernt Ihr die Sprache Go mit ihren Stärken und Schwächen aus Sicht eines Java Entwicklers kennen. Ihr bekommt einen sehr praxisbezogenen Einstieg, HandsOn anhand von kleinen Projekt Beispielen.
Everybody is talking about ES6, but is anyone out there using it in production? Mango recently started adopting ES6 features that make our front-end code easier to write and maintain.
In this talk, I will explain why we decided to use ES6, how we started to use it in production (using npm, browserify and babel) and I'll explain what problems we found along the way and how we solved them.
Links:
https://getmango.com
https://getmango.com/blog/writing-es6-modules-with-6to5/
http://kangax.github.io/compat-table/
https://github.com/zloirock/core-js
https://github.com/mango/emitter
http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts
http://benmccormick.org/2015/04/07/es6-classes-and-backbone-js/
Kotlin coroutine - the next step for RxJava developer?Artur Latoszewski
Kotlin is a language that is rapidly gaining popularity, among others thanks to cooperation with Java. On the other hand, RxJava has brought us many solutions to problems related to asynchronous code. If everything is so cool, do we need anything else in the Kotlin world? Is Kotlin Coroutine a competition for RxJava?
1. what is the different unbuffered and buffered channel?
2. how to implement a job queue in golang?
3. how to stop the worker in a container?
4. Shutdown with Sigterm Handling
5. Canceling Workers without Context
6. Graceful shutdown with worker
7. How to auto-scaling build agent?
8. How to cancel the current Job?
Ubiratan Soares - Software Engineer da Stone, fala sobre Kotlin : Advanced Tricks no Kotlin Community Summit 2018.
https://eventos.imasters.com.br/kotlinsummit/
Saiba mais em
NDC Sydney 2019 - Async Demystified -- Karel ZikmundKarel Zikmund
NDC Sydney 2019 conference in Sydney, AU - 2019/10/15
Talk: War stories from .NET team by Karel Zikmund
https://sessionize.com/s/karel-zikmund/async-demystified/24175
https://www.youtube.com/watch?v=TgUYcZV-foM
O desenvolvimento de aplicações Android comumente exigem a criação de chamadas assíncronas, que podem acabar gerando diversos problemas como por exemplo o famigerado callback hell. As Coroutines oferecem uma maneira de escrever códigos assíncronos de forma sequencial em uma co-rotina, possibilitando um código mais compacto, fácil de gerenciar e alterar, além de gerar as chamadas lightweight threads, muito mais performáticas que as threads comuns. Nessa palestra vamos mostrar as principais features do Coroutines que podem resolver esse tipo de problema.
As a part of kotlinx.coroutines 1.2 Flow was introduced as a cold asynchronous data stream. How does it work? What we can do with it? Is it that we waiting so long for replacing Rx? The talk has answers to them.
Utilizing Kotlin Flows in an Android application
Vijay will be revealing to you the kind of challenges we face while working with asynchronous data streams and how Kotlin Flows solves them.
Learn the latest tips, tricks, and tools for Android Development from our international team of Android Developers in Bangkok!
Designing iOS+Android project without using multiplatform frameworks - UA Mob...UA Mobile
Using React Native, Flutter, Hybrid Web, Unity, Kotlin Multiplatform could be an interesting strategy, but what if we want to stay within traditional native development on both platforms?
A syntax of Swift and Kotlin looks pretty similar, especially if you are cooking it with RX. So, what if we will implement a new feature on one platform and then, kinda, copy-paste the code to another one, with minimum modification? How good it will work for us? How should we deal with platform-specific features? Will this strategy make a project too complex?
This speech will show the way, how to design your project in order to minimize the headache of implementing the same feature for both mobile platforms. Also, we will talk about gains and losses during implementation on a real project with this design idea.
http://uamobile.org/uk/topics/designing-iosandroid-project-without-using-multiplatform-frameworks
Декларативное программирование клиент-серверных приложений на андроид - UA Mo...UA Mobile
Практически сразу после написания первой программы возникла проблема повышения производительности труда программистов. Несмотря на предпринятые за прошедшее время большие усилия и достигнутые значительные результаты в повышении производительности труда, эта проблема и сейчас является актуальной.
Для решения указанной проблемы применяют разнообразные способы и методы. Основными из них являются организационно-социальные методы, использование разнообразных библиотек, паттернов, шаблонов. Перспективным является применение декларативных языков программирования. К сожалению, существующие декларативные языки ориентированы на ту или иную предметную область.
Сотрудниками компании “Брендер” (г. Харьков) создана библиотека реализующая принципы декларативного программирования при разработке клиент - серверных приложений на андроиде.
В докладе будут рассмотрены основы декларативного программирования клиент-серверных приложений на примере реального коммерческого проекта. Также будет показан анализ производительности и качества разработки приложений традиционными технологиями и с использованием библиотеки декларативного программирования.
Протягом останніх двох років Room був переважним рішенням для роботи з SQLite в Android. Але нещодавно була випущена нова версія бібліотеки SQLDelight, яка підтримує kotlin multiplatform, має перероблений api, новий генерований Kotlin-код, розширення до RxJava2, підтримує Paging-бібліотеки та багато іншого. З його можливістю генерувати в live-режимі typesafe kotlin код з чистого SQL за допомогою плагіну Android Studio важко конкурувати. Чи все ще варто розглядати інші рішення, маючи такий потужний інструмент?!
На цій сесії ми розглянемо основні можливості SQLDelight та в live-режимі побачимо, як він працює. Розберемо типові випадки його використання та поміркуємо про можливості multiplatform використання SQLDelight у майбутньому.
http://uamobile.org/uk/topics/leave-your-room-behind
OpenId and OAuth2: Rear, Medium, Well Done - UA Mobile 2019UA Mobile
Десятиліття тому Інтернет був зовсім не торт і мобільні пристрої не були вишенькою. Вразливості у доступі до персональних даних стирчали з таких місць, куди сьогодні може дістатись і дитина, та під час перегляду свинки Пеппи злити доступ до всіх ваших кредитних карт.
Прихід протоколу OAuth не зміг врятувати нас від ремейків Філіпа Кіркорова та клауд-репу, але спробував убезпечити доступ до наших даних. Але він не допоможе тобі, юзернейм, якщо ти не вмієш користуватися ним як слід.
Так що влаштовуйся покомфортніше на кухні мобільної авторизації, будемо готувати OAuth2 та OpenId.
Протягом цієї сесії я розповім:
- Що таке SAML (та про ледачі банки)
- Чим авторизація відрізняється від аутентифікації
- Що таке OAuth та OpenID та навіщо вони потрібні
- Які є OpenID SDK та чи варто їх використовувати?
http://uamobile.org/uk/topics/openid-and-oauth2-rear-medium-well-done
Google Wear OS watch faces and applications development - UA Mobile 2019UA Mobile
Google Wear OS, formerly Android Wear, is the platform for wearable devices, watches primarily. In this talk, I would like to present what kind of applications may be developed for this platform, how it differs from regular Android development, what are the limitations, pitfalls and caveats.
In the deck I plan to cover the next topics:
- Kinds of applications available
- API available on the watch itself
- API for communication with a connected phone
- Watch face development specifics
http://uamobile.org/uk/topics/google-wear-os-watch-faces-and-applications-development
Історія декількох проектів та що в них пішло не так - UA Mobile 2019UA Mobile
У середовищі розробників існує думка про те, що сучасні проекти, зокрема - Android проекти, - всього лише пазл з бібліотек та невеликої кількості бізнес-логіки. В рамках моєї презентації ми розглянемо кілька проектів, на прикладі яких я покажу деякі проблеми та приховану вартість використання деяких бібліотек, про яку мало хто замислюється.
В якості бонуса ми подивимося на деякі приклади очевидного (і не дуже) поганого коду та поганої архітектури.
Під час презентації ми розглядаємо як деякі відомі бібліотеки (RxAndroid, Dagger, Android Architecture Components) використовуються в занадто широкому сенсі або на занадто ранній стадії, і як це заважає проекту, викликаючи вельми неочевидні проблеми як для розробника, так і для кінцевого користувача.
http://uamobile.org/uk/topics/istoriya-dekilkoh-proektiv-ta-shcho-v-nyh-pishlo-ne-tak
Working effectively with ViewModels and TDD - UA Mobile 2019UA Mobile
The introduction of Android Architecture Components made a lot of things easier for Android developers. Despite this, the documentation is still not complete and confusing. Here and their developers arise questions like: “How should I handle communication between ViewModels?”, “How to send one time events properly?”, “How to fill pleasure from Android development again?”. I will cover these topics and guide you through this dark forest and show that the light of TDD.
In this talk, I will cover the most popular pitfalls when using ViewModels and show how one can easily follow the TDD approach while implementing MVVM on Android.
http://uamobile.org/uk/topics/working-effectively-viewmodels-and-tdd
Managing State in Reactive applications - UA Mobile 2019UA Mobile
Reactive programming becoming very popular these days and many people already adopted or started to adopt it in their projects. This is indeed a great tool but in the wrong hands, it quickly can get out of hands. Polluting the codebase with spaghettis of reactive operators where it can be hard to reason about and debug.
In this talk, I will share our experience with reactive programming at Babylon Health. And show our approach on how we manage the state in our ViewModels in a unidirectional way.
http://uamobile.org/uk/topics/managing-state-reactive-applications
Ідіоматична ін'єкція залежностей на Kotlin без фреймворків - UA Mobile2019UA Mobile
Всі сучасні популярні DI-фрейморки для Java використовують обробку анотацій під час компіляції та/або під час виконання програми. Вони однаково добре працюють і для Kotlin, але мають свої недоліки, бо генерують забагато коду та/або використовують рефлексію, що негативно позначається на часі компіляції додатку, його розмірі та швидкодії. Крім того, зазвичай їх конфігурація є нетривіальною для великого проекту. Kotlin пішов кращим шляхом...
В рамках доповіді буде продемонстровано як можна легко та ідіоматично організувати DI у своєму коді без допомоги сторонніх фреймворків. Натомість, в режимі програмування наживо ми разом створимо свій фреймворк без жодної анотації, де використаємо виключно стандартні можливості мови Kotlin.
http://uamobile.org/uk/topics/idiomatichna-iniekciya-zalezhnostey-na-kotlin-bez-freymvorkiv
Актуальні практики дизайну мобільних додатків - UA Mobile 2019UA Mobile
Вже десять років ми активно працюємо над створенням мобільних додатків. Користувачі стають все більш вибагливими, темпи розробки зростають, і дизайн не стоїть на місці. Ми розкажемо, що насьогодні вважається якісним дизайном, які дизайн-практики використовуються для забезпечення якості дизайну, як передати наробки дизайнерів команді розробників. Окрім цього розкажемо, де шукати натхнення і заряджати ним колег.
В рамках доповіді ми розповімо про дизайн мислення, креативні воркшопи, юзабіліті тестування, дизайн-систему і базовану на ній SDK, як подружити дизайн та аджайл.
http://uamobile.org/uk/topics/aktualni-praktyky-dyzaynu-mobilnyh-dodatkiv
До чого прикладати Docker в Android? - UA Mobile 2019UA Mobile
Docker - популярне слово в світі backend-у, а чим він може стати в пригоді в Android розробці? Виявляється може. Коли проект тривалий і досить серйозний, то справа доходить до написання тестів на декількох рівнях(unit, integration, UI automation), а це в свою чергу вимагає налаштування pipeline-у на CI, який би правильно проганяв ці тести на кожен коміт. Наступні питання виникають: як зробити щоб різні види тестів ранились паралельно, як ранити паралельно на кількох девайсах, на кількох типах backend-у, і при цьому щоб одні тести не "заважали іншим". Тоді на допомогу і приходить Docker - пісочниця яка дозволяє ізолювати середовище і думати про масштабування. В багатьох випадках можуть допомогти devops піхотинці, але не завжди вони виділені на проект чи можуть зрозуміти що ви від них хочете.
http://uamobile.org/uk/topics/do-chogo-prykladaty-docker-v-android
Building your Flutter apps using Redux - UA Mobile 2019UA Mobile
Обрати архітектуру для розробки не просто. Серед безлічі можливих архітектурних рішень для Flutter у фаворити вибились BLoC і Redux. BLoC ― нове рішення від компанії Google, яке лише починає набувати популярності. Redux ― незмінний улюбленець ком'юніті. І, звісно, мій. Саме про нього і поговоримо.
Під час доповіді ми візьмемо готовий UI шар і реалізуємо всі необхідні Redux компоненти: Store, State і Reducer Actions. А також специфічні для Flutter елементи ― StoreProvider і StoreConnector.
http://uamobile.org/uk/topics/building-your-flutter-apps-using-redux
Optional. Tips and Tricks - UA Mobile 2019UA Mobile
Optional є одним з фундаментальних типів у Swift. На жаль, незважаючи на його поширеність, чимало розробників не звертають уваги на можливості, приховані у цьому типі, або використовують його недоречно. Все це призводить до порушень основних принципів програмування, а також нехтує деякими потужними можливостями, доступними у Swift. Крім того, цей тип дозволяє розглянути важливі концепти, які зроблять рутинну роботу з Optional і схожими типами, ефективнішою та зручнішою.
Під час доповіді ми відповімо на питання чому та як слід оминати optional binding. Розглянемо приклад з код-рев'ю і зробимо рефакторинг у фунціональному стилі щоб побачити недоліки та переваги такого підходу у Swift. Це надасть нам змогу дослідити як Optional впливає на DI та обробку помилок і які є альтернативи до стандартних технік, доступних у Swift.
http://uamobile.org/uk/topics/optional-tips-and-tricks
Designing iOS+Android project without using multiplatform frameworks - UA Mob...UA Mobile
Using React Native, Flutter, Hybrid Web, Unity, Kotlin Multiplatform could be an interesting strategy, but what if we want to stay within traditional native development on both platforms?
A syntax of Swift and Kotlin looks pretty similar, especially if you are cooking it with RX. So, what if we will implement a new feature on one platform and then, kinda, copy-paste the code to another one, with minimum modification? How good it will work for us? How should we deal with platform-specific features? Will this strategy make a project too complex?
This speech will show the way, how to design your project in order to minimize the headache of implementing the same feature for both mobile platforms. Also, we will talk about gains and losses during implementation on a real project with this design idea.
http://uamobile.org/uk/topics/designing-iosandroid-project-without-using-multiplatform-frameworks
Бібліотеки та Інструменти на сторожі коду - UA Mobile 2019UA Mobile
В наш час мало просто писати код, його треба писати красиво і "правильно". Так як ці поняття вельми різняться від людини до людини, то в якийсь момент команди приходять до того, щоб формалізувати красивість і правильність. Деякі команди, втомившись лаятись в pull-request'ах через некрасиво оформлений код, йдуть далі та налаштовують автоматичні перевірки. Хтось навіть довіряє інстументам настільки, що дозволяє змінювати і виправляти код.
У цій доповіді я розповім про бібліотеки та інструменти, метою яких є робота з кодом. Розглянемо освновні відмінності бібліотек та області їх застосування. Після доповіді ви нарешті будете відрізняти SourceKit від SourceKitten, libSwiftSyntax від Swift Syntax.
http://uamobile.org/uk/topics/b%D1%96bl%D1%96oteki-ta-%D1%96nstrumenti-na-storozh%D1%96-kodu
Flutter: No more boring apps! - UA Mobile 2019UA Mobile
Одвічний вибір: швидко, дешево або красиво. До недавнього часу при розробці мобільних додатків можна було отримати два з трьох. Найчастіше в жертву приносили UX/UI, причому ситуація була особливо плачевною в категорії додатків для бізнесу. Користувачам пропонували щось, що в кращому випадку не порушувало HIG платформи, а часто так взагалі було калькою web версії. Але ситуація змінюється з приходом Flutter!
У цій доповіді ми поговоримо про те, як писати надійні, красиві додатки, на ультра швидкості та без особливих витрат.
http://uamobile.org/uk/topics/flutter-no-more-boring-apps
Долаючи прірву між дизайнерами та розробниками - UA Mobile 2019UA Mobile
Хороший дизайнер на вагу золота. Він підготує екрани, визначиться з кольорами та шрифтами, пропрацює додаток так, щоб він відповідав усім вимогам цільової платформи. Але буває, що клієнтські правки в готовий дизайн (або навіть готовий додаток) створюють дивовижні можливості для вправ з рефакторінгу для розробників, наприклад:
- зміни шрифт у всьому додатку на мій улюблений
- а можна список показати у вигляді сітки?
- хочу щоб AppBar скролився разом з контентом.
- ця картинка повинна вилітати за межі екрану, змінюючи колір, прокручуючись навколо своєї осі, повільно розчиняючись "у тумані".
- і т.д.
Якщо вас дратують подібні ситуації, то швидше за все ваш інструмент недостатньо хороший. ;)
У цій доповіді ми візьмемо кілька екранів з Mobile UI Inspiration розсилок з найсміливішими дизайнерськими фантазіями і реалізуємо їх на Flutter. Обережно, буде багато коду!
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019UA Mobile
If you want to share the code between Android and iOS but you don't feel like doing C++/JNI, React Native, Flutter, you must try Kotlin/Native! In this presentation we will see how Kotlin/Native is different and in some aspects superior, and how easy it becomes to develop, debug and maintain a common codebase with JetBrains tools and without sacrificing runtime performance.
Sceneform SDK на практиці - UA Mobile 2019UA Mobile
Тема нативних движків, що спрощують роботу з 3D графікою для Android, є головним болем багатьох розробників. У той час як для iOS існує SceneKit, розробники під Android були змушені або йти в крос-платформені рішення (Unity3d, LibGDX і т.п.) або використовувати самописні/опенсорсні рішення з обмеженим функціоналом. Поява Sceneform SDK вирішує не тільки цю проблему але й інкапсулює в собі роботу з ArCore SDK, відкриваючи для розробників можливість нативної реалізації AR рішень, не вдаючись до стороннього SDK.
В рамках доповіді будуть розглянуті практичні можливості та обмеження Sceneform SDK стосовно проектів з доповненою реальністю (AR). Так само будуть розглянуті такі теми як SLAM, ArCore SDK, розпізнавання та трекінг маркерів на основі зображень, Cloud Anchors та існуючі альтернативи на ринку.
13. Experimental status
Since Kotlin 1.1
-Xcoroutines=enable
kotlin.coroutines.experimental -> kotlin.coroutines (1.3)
Experimental != unstable
Can and should be used in production
14. Experimental status
New style of programming
The design is not final and expected to change
JetBrains still collects information and feedbacks
Backwards compatibility guaranteed
20. Standard API
• Language support (`suspend` keyword)
• low-level basic API (stdlib: kotlin.coroutines)
• high-level APIs that can be used in user code
28. Labels
suspend fun postItem(item: Item) {
// LABEL 0
val token = prepareToken()
// LABEL 1
val post = submitPost(token, item)
// LABEL 2
processPost(post)
}
29. Labels
suspend fun postItem(item: Item) {
switch(label) {
case 0:
val token = prepareToken()
case 1:
val post = submitPost(token, item)
case 2:
processPost(post)
}
}
30. State
suspend fun postItem(item: Item) {
val stateMachine = object: CoroutineImpl {…}
switch(stateMachine.label) {
case 0:
val token = prepareToken()
case 1:
val post = submitPost(token, item)
case 2:
processPost(post)
}
}
31. CPS Transform
fun postItem(item: Item, cont: Continuation) {
val stateMachine = object: CoroutineImpl {…}
switch(stateMachine.label) {
case 0:
val token = prepareToken(stateMachine)
case 1:
val post = submitPost(token, item, stateMachine)
case 2:
processPost(post)
}
}
32. Save state
fun postItem(item: Item, cont: Continuation) {
val stateMachine = object: CoroutineImpl {…}
switch(stateMachine.label) {
case 0:
stateMachine.item = item
stateMachine.label = 1
prepareToken(stateMachine)
case 1:
…
}
}
33. Callback
fun postItem(item: Item, cont: Continuation) {
val stateMachine = cont as? ThisSM ?: object: ThisSM {
fun resume(…) {
postItem(null, this)
}
}
switch(stateMachine.label) {
case 0:
….
}
}
34. Restore state and continue
fun postItem(item: Item, cont: Continuation) {
…
case 0:
stateMachine.item = item
stateMachine.label = 1
prepareToken(stateMachine)
case 1:
val item = stateMachine.item
val token = stateMachine.result
stateMachine.label = 2
submitPost(token, item, stateMachine)
case 2:
…
38. Subscribe
suspend fun <T> Single<T>.await(): T = suspendCancellableCoroutine { cont ->
subscribe(object : SingleObserver<T> {
override fun onSuccess(t: T) {
TODO()
}
override fun onError(error: Throwable) {
TODO()
}
override fun onSubscribe(d: Disposable) {
TODO()
}
})
}
39. Return a result, if successful
suspend fun <T> Single<T>.await(): T = suspendCancellableCoroutine { cont ->
subscribe(object : SingleObserver<T> {
override fun onSuccess(t: T) {
cont.resume(t)
}
override fun onError(error: Throwable) {
TODO()
}
override fun onSubscribe(d: Disposable) {
TODO()
}
})
}
40. Or resume with exception
suspend fun <T> Single<T>.await(): T = suspendCancellableCoroutine { cont ->
subscribe(object : SingleObserver<T> {
override fun onSuccess(t: T) {
cont.resume(t)
}
override fun onError(error: Throwable) {
cont.resumeWithException(error)
}
override fun onSubscribe(d: Disposable) {
TODO()
}
})
}
41. Don’t forget to dispose
suspend fun <T> Single<T>.await(): T = suspendCancellableCoroutine { cont ->
subscribe(object : SingleObserver<T> {
override fun onSuccess(t: T) {
cont.resume(t)
}
override fun onError(error: Throwable) {
cont.resumeWithException(error)
}
override fun onSubscribe(d: Disposable) {
cont.invokeOnCompletion { d.dispose() }
}
})
}
42. And this is it
suspend fun <T> Single<T>.await(): T = suspendCancellableCoroutine { cont ->
subscribe(object : SingleObserver<T> {
override fun onSuccess(t: T) {
cont.resume(t)
}
override fun onError(error: Throwable) {
cont.resumeWithException(error)
}
override fun onSubscribe(d: Disposable) {
cont.invokeOnCompletion { d.dispose() }
}
})
}
45. async/await
// C# way
async Task ProcessImage(String url)
{
var image = await LoadImage(url);
imageCache.Add(image);
}
// Kotlin way
suspend fun processImage(url: String) {
val image = loadImageAsync(url).await()
imageCache.add(image)
}
46. Not idiomatic way
fun loadImageAsync(url: String): Deferred<Image> = async { TODO() }
suspend fun processImage(url: String) {
val image = loadImageAsync(url).await()
imageCache.add(image)
}
Don’t define async functions
in the first place
47. Idiomatic way
suspend fun loadImage(url: String): Image = TODO()
suspend fun processImage(url: String) {
val image = async { loadImage(url) }.await()
imageCache.add(image)
}
Keep concurrency explicit
49. buildSequence {
print(“Start: ")
var prev = 1; var cur = 1
while (true) {
print(“Next")
yield(prev) // suspension point
val next = prev + cur
prev = cur; cur = next
}
print("End") // unreachable code
}.take(6).forEach { print(" $it ") }
// Output: Start 1 Next 1 Next 2 Next 3 Next 5 Next 8
50. buildSequence {
print(“Start: ")
var prev = 1; var cur = 1
while (true) {
print(“Next")
yield(prev) // suspension point
val next = prev + cur
prev = cur; cur = next
}
print("End") // unreachable code
}.take(6).forEach { print(" $it ") }
// Output: Start 1 Next 1 Next 2 Next 3 Next 5 Next 8
51. buildSequence {
print(“Start: ")
var prev = 1; var cur = 1
while (true) {
print(“Next")
yield(prev) // suspension point
val next = prev + cur
prev = cur; cur = next
}
print("End") // unreachable code
}.take(6).forEach { print(" $it ") }
// Output: Start 1 Next 1 Next 2 Next 3 Next 5 Next 8
52. buildSequence {
print(“Start: ")
var prev = 1; var cur = 1
while (true) {
print(“Next")
yield(prev) // suspension point
val next = prev + cur
prev = cur; cur = next
}
print("End") // unreachable code
}.take(6).forEach { print(" $it ") }
// Output: Start 1 Next 1 Next 2 Next 3 Next 5 Next 8
53. buildSequence {
print(“Start: ")
var prev = 1; var cur = 1
while (true) {
print(“Next")
yield(prev) // suspension point
val next = prev + cur
prev = cur; cur = next
}
print("End") // unreachable code
}.take(6).forEach { print(" $it ") }
// Output: Start 1 Next 1 Next 2 Next 3 Next 5 Next 8