SlideShare uma empresa Scribd logo
1 de 72
Baixar para ler offline
BUILDING A SIMPLE APP WITH KOTLIN
IN 90 MINUTES
KAI KOENIG (@AGENTK)
HELLO
HELLO
I’m Kai!
I’m a { Software Engineer | Pilot | Traveller | 

Gamer | Husband | Dad to 1 cat and 3 chickens | 

… }
Find me on Twitter: @AgentK
HELLO
CODE
https://github.com/TheRealAgentK/

SummerOfTechKotlinAndroidBootcamp
AGENDA
▸ What is Kotlin?
▸ Language idioms & concepts
▸ Kotlin and Android
▸ Anko DSL
MORE
WELLINGTON.KT
MORE
GDG WELLINTON
MORE
MOBILE REFRESH WELLINGTON - 25 AUGUST 2017
WHAT IS KOTLIN?
WHAT IS KOTLIN?
SOME FUNDAMENTALS
▸ Statically typed programming
language for the JVM and Android
▸ Started as internal language “Project
Kotlin” at Jetbrains in 2010
▸ Now: Open-Source, Apache License
▸ Kotlin SDK plus tool support for IntelliJ,
Android Studio, Eclipse
▸ Named after an island in the Gulf of
Finland
WHAT IS KOTLIN?
MOTIVATION FOR KOTLIN
▸ The Java platform is awesome, but it has its issues:
▸ sometimes tied to backwards/legacy compatibility
▸ can be a very verbose language and produce bloated code
▸ type system has various flaws
▸ Kotlin aims to fix a lot of those issues
▸ compiles to Java 6 byte code therefore caters well for Android runtimes
LANGUAGE IDIOMS &
CONCEPTS
https://www.flickr.com/photos/geraldford/6976818221/
LANGUAGE IDIOMS & CONCEPTS
OVERVIEW
▸ Immutability
▸ String templates & Enum classes
▸ Null safety
▸ Properties and Fields
▸ Type inference and casts
▸ Data classes
▸ Syntactic sugar (loops, ranges etc)
▸ Extension functions
▸ Lambdas
▸ Collection API
▸ Type-safe builders
▸ Java-Kotlin-Interop
LANGUAGE IDIOMS & CONCEPTS
IMMUTABILITY
▸ Built-in support for mutable and
immutable variables, properties and
fields
▸ Keywords var and val
▸ val - immutable (recommended)
▸ var - mutable
▸ Similar concept applies for class
properties, val creates getters, var
creates getters and setters (more later)
val a: Int = 1
val b = 1
val c: Int
c = 1
var x = 23
x += 1
LANGUAGE IDIOMS & CONCEPTS
STRING TEMPLATES & ENUM CLASSES (I)
▸ Kotlin Strings can contain template
expressions
▸ String templates start with a $ character
and
▸ can contain simple references such
as $s, as well as
▸ complex expressions in curly braces: 

${s.length}
val s = "abc"
val str = "$s.length is ${s.length}"
Output:
abc.length is 3
LANGUAGE IDIOMS & CONCEPTS
STRING TEMPLATES & ENUM CLASSES (II)
▸ Kotlin has a dedicated and expressive
enum class
▸ Can be used very nicely in conjunction
with String templates
enum class Locale(val hello: String) {
DE_DE("Hallo"),
EN_NZ("Hello"),
MI_NZ("Kia Ora")
}
class Customer(val firstName:String,
val lastName:String,
val locale: Locale = Locale.DE_DE) {
fun sayHello() = println(
"${locale.hello}, $firstName $lastName")
}
fun main(args : Array<String>) {
val myCustomer = Customer("Sandra",
"Musterfrau",
Locale.MI_NZ)
myCustomer.sayHello()
}
LANGUAGE IDIOMS & CONCEPTS
NULL SAFETY
▸ Motivation: A better way to deal with NPEs
▸ Kotlin differentiates nullable types from non-
nullable types by adding a ? to the type:
▸ String: no nullable
▸ String?: nullable
▸ Handle manually
▸ Use Safe Call operator ?.
▸ Use the !! operator to allow/trigger a NPE
// Won't compile
var lastName: String = null
// Will compile
var lastNameNullable: String? = null
// Will also not compile
println(lastNameNullable.length)
// Option 1 (-1)
println(if (lastNameNullable != null)
lastNameNullable.length else -1)
// Option 2 (null)
println(lastNameNullable?.length)
// Option 3 (NPE)
println(lastNameNullable!!.length)
LANGUAGE IDIOMS & CONCEPTS
PROPERTIES AND FIELDS
▸ Kotlin classes have mutable or
immutable properties
▸ Default getter/setters for properties,
can be customised
▸ An automated backing field can be
provided by the compiler (if required)
▸ Alternative: use an explicit backing
property
var counter = 0
set(value) {
if (value >= 0)
field = value
}
public class Address {
public var name: String = ...
public var street: String = ...
public var city: String = ...
public var state: String? = ...
public var zip: String = ...
}
LANGUAGE IDIOMS & CONCEPTS
TYPE INFERENCE AND CASTS (I)
▸ When possible, Kotlin will infer the type
of variables
▸ Explicit conversions, type widening and
inference
▸ Smaller types are not subtypes of
bigger types, no implicit conversion
▸ Types are often inferred from the
context
val b: Byte = 1
// This won't work
val i: Int = b
// This will
val i: Int = b.toInt()
val l: Long = 1L + 3
LANGUAGE IDIOMS & CONCEPTS
TYPE INFERENCE AND CASTS (II)
▸ is or !is checks if an object adheres to a
certain type
▸ Smart cast: Compiler tracks is-expressions
for immutable values
▸ works for val local variables and private,
internal or in-module performed casts
▸ works for var local variables if the
variable hasn’t been modified between
check and usage, never for var
properties
fun whatIs(x: Any) {
when (x) {
is Int -> println(x + 42)
is String -> println(x.length)
is IntArray -> println(x.sum())
}
}
whatIs(4) // 46
whatIs("4") // 1
whatIs(intArrayOf(1,2,3,4,5)) // 15
LANGUAGE IDIOMS & CONCEPTS
DATA CLASSES
▸ The POJOs/Beans of other languages
▸ Data classes implicitly create:
▸ getters/setters (non-data classes
have those too) - recommend to use
val as often as possible.
▸ useful implementations for equals(),
hashCode(), toString(), copy()
▸ copy() has default parameters and
can be used to alter a copy
data class ChromeEncryptedPayload(
val encryptedPayload: String,
val encryptionHeader: String,
val cryptoKeyHeader: String)
val pl = ChromeEncryptedPayload(
encryptedPayload = "...",
encryptionHeader = "...",
cryptoKeyHeader = "...")
val anotherPl = pl.copy(
encryptedPayload = "...")
LANGUAGE IDIOMS & CONCEPTS
EXTENSION FUNCTIONS
▸ Allow adding new functionality to a
class without inheritance or Decorators
▸ Kotlin has extension functions as well
as extension properties
▸ Resolved statically, don’t actually
modify the class (excellent example
why this has to be the case at http://
goo.gl/EN6bTs
fun Int.sum(otherInt: Int): Int =
this + otherInt
3.sum(7)
fun Activity.toast(message: CharSequence,
duration: Int =
TOAST.LENGTH_SHORT) {
Toast.makeText(this, message,
duration).show()
}
// In onCreate of an Activity
override fun onCreate(...) {
...
toast("Hi there")
...
}
LANGUAGE IDIOMS & CONCEPTS
LAMBDAS
▸ Anonymous function or “function
literal”, closely related to the ideas of
Higher-Order-Functions
val sum = { x: Int, y: Int -> x + y }
val sum: (Int, Int) -> Int = { x, y ->
x + y }
private fun convertPetListToDomain(list: List<Pet>): List<PetDomain> {
return list.map { convertPetItemToDomain(it) }
}
private fun convertPetItemToDomain(pet: Pet): PetDomain {
return PetDomain(pet.age,pet.size,pet.id,pet.name,pet.sex,pet.breed)
}
LANGUAGE IDIOMS & CONCEPTS
TYPE-SAFE BUILDERS (I)
▸ Builders are a very popular approach in
Groovy to define data in a declarative
way
▸ Often used for:
▸ generating XML or JSON
▸ UI layout (Swing components) etc
▸ In Kotlin, builders even can be type-
checked
JsonBuilder builder = new JsonBuilder()
builder.records {
car {
name 'HSV Maloo'
make 'Holden'
year 2006
country 'Australia'
}
}
String json = JsonOutput.prettyPrint
(builder.toString())
LANGUAGE IDIOMS & CONCEPTS
TYPE-SAFE BUILDERS (II)
▸ html() is a function with a lambda as an
argument (init)
▸ init’s type is a function type with
receiver, this allows you to:
▸ pass receiver (of type HTML) to
function
▸ call members of instance inside the
function
fun result(args: Array<String>) =
html {
head {
title {”HTML in Kotlin"}
}
body {
...
}
}
fun html(init: HTML.() -> Unit): HTML {
val html = HTML()
html.init()
return html
}
LANGUAGE IDIOMS & CONCEPTS
TYPE-SAFE BUILDERS (III)
▸ HTML class has functions to build the
head and the body elements of the
DSL.
▸ Not shown: classes further down in the
hierarchy:
▸ Head, Body etc.
▸ Complete HTML builder example at:
http://goo.gl/TndcC9
class HTML {
...
fun head(headBuilder: Head.() -> Unit) {
head = Head()
head?.headBuilder()
}
fun body(bodyBuilder: Body.() -> Unit) {
body = Body()
body?.bodyBuilder()
}
}
LANGUAGE IDIOMS & CONCEPTS
JAVA-KOTLIN-INTEROP
▸ Java and Kotlin are fully interoperable from an integration point of view
▸ Your Java code can call and use Kotlin code
▸ Your Kotlin code can call and use Java code
▸ The latter is in particular useful because it means you can continue to use pretty
much any existing Android/Java library
▸ Check out Hendrik Kokocinski’s sample Kotlin app that uses all kinds of well
known Android/Java libs: https://goo.gl/xdYqf5
LANGUAGE IDIOMS & CONCEPTS
OVERVIEW
▸ Immutability
▸ String templates & Enum classes
▸ Null safety
▸ Properties and Fields
▸ Type inference and casts
▸ Data classes
▸ Syntactic sugar (loops, ranges etc)
▸ Extension functions
▸ Lambdas
▸ Collection API
▸ Type-safe builders
▸ Java-Kotlin-Interop
KOTLIN AND ANDROID
https://realm.io/assets/img/news/tutorial-kotlin-anko-cover.png
APP
STEP 1 - KOTLIN SETUP
▸ Setup Kotlin Plugin and tooling
▸ Automated vs. manual
APP
STEP 2 - REFACTOR JAVA -> KOTLIN
▸ Kotlin Source Path
▸ Replace Java activity with Kotlin equivalent
▸ Class/Inheritance syntax
▸ Function syntax
▸ The ?
APP
STEP 3 - KOTLIN ANDROID EXTENSIONS
▸ Finding views with KAE (built into the plugin)
APP
STEP 4 - MORE KAE
▸ KAE Click handler - compare to classic Kotlin code
▸ Lambdas
APP
STEP 5 - BUTTERKNIFE
▸ View Bindings with Butterknife in Kotlin
▸ KAPT setup
APP
STEP 6 - RECYCLERVIEW AND SOME DATA
▸ Adding Adapter and RecyclerView
▸ Displaying hardcoded data for now
APP
STEP 7 - DATA (I)
▸ Loading and returning some hard JSON sample data
▸ Companion object
▸ No UI changes, use debugger in MainActivity
APP
STEP 8 - DATA (II) / GSON PARSING
▸ Kotlin data classes
▸ GSON parsing
▸ String templates
▸ No UI changes, use debugger in MainActivity
APP
STEP 9 - ARCHITECTURE
▸ Command pattern
▸ Introducing Anko for async
▸ More String templates
▸ with
▸ Interface
▸ .map
ANKO DSL
ANKO DSL
WHAT IS A DSL?
▸ Domain-Specific Language
▸ Limited expressiveness:
▸ DSLs are usually not general-purpose languages
▸ strongly focussed on a particular domain
▸ examples: SQL, Ant XML, XSLT, Gradle etc.
ANKO DSL
A DSL FOR LAYOUTS
▸ The most important element of Anko is the Layout DSL
▸ Idea: replace XML layout definitions by Kotlin code - without having to build
the layout in a fully programmatic sense
▸ Modular: as we’re talking about UI/Layout, it’s very important to select the
right library for your minSDKVersion
▸ Extensible: you can add your own DSL elements for custom UI controls
ANKO DSL
LAYOUT XML
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:layout_width="match_parent"
android:gravity="center"
android:text="@string/empty_todos_message"
android:layout_weight="7"
android:layout_height="wrap_content" />
<Button
android:layout_width="match_parent"
android:layout_weight="1"
android:text="Say Hello"
android:layout_height="0dp" />
</LinearLayout>
ANKO DSL
PROGRAMMATIC LAYOUT IN KOTLIN
val act = this
val layout = LinearLayout(act)
layout.orientation = LinearLayout.VERTICAL
val name = EditText(act)
val button = Button(act)
button.text = "Say Hello"
button.setOnClickListener {
Toast.makeText(act, "Hello, ${name.text}!", Toast.LENGTH_SHORT).show()
}
layout.addView(name)
layout.addView(button)
ANKO DSL
ANKO DSL
verticalLayout {
val name = editText()
button("Say Hello") {
onClick { toast("Hello, ${name.text}!") }
}
}
ANKO DSL
ANKO DSL INTERNALS
▸ Anko DSL example from previous slide looks very similar to the earlier HTML
builder example
▸ Anko uses extension functions arranged into type-safe builders and lambdas
▸ You don’t have to write all those extensions by hand though - Anko generates
them based on the Android SDK’s android.jar
ANKO DSL
GETTING STARTED WITH ANKO DSL (I)
▸ Depending on minSdkVersion of project, import:

compile "org.jetbrains.anko:anko-sdk{15|19|21|23}:0.9"
▸ If the project uses an Android Support library, import matching Anko library:

compile "org.jetbrains.anko:anko-recyclerview-v7:0.9"
ANKO DSL
GETTING STARTED WITH ANKO DSL (II)
▸ General approach:
▸ Anko DSL automatically becomes
available in onCreate() in an Activity
▸ no need for setContentView(), Anko
DSL also automatically sets the
content view for activities
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
verticalLayout {
padding = dip(30)
editText {
hint = "Name"
textSize = 24f
}
editText {
hint = "Password"
textSize = 24f
}
button("Login") {
textSize = 26f
}
}
}
ANKO DSL
ANKO DSL IN FRAGMENTS
▸ In fragments, use 

onCreateView(…)
▸ Returns UI {…}.view:
▸ mandatory before Anko 0.8
▸ works well for Fragments
▸ createTodo() is a fragment-private
method
override fun onCreateView(inflater: LayoutInflater?,
container: ViewGroup?,
savedInstanceState: Bundle?): View? {
return UI {
verticalLayout {
padding = dip(24)
var title = editText {
id = R.id.title
hintResource = R.string.hint
}
...
button {
id = R.id.add
textResource = R.string.add
onClick { view -> createTodo(title, desc) }
}
}
}.view
}
ANKO DSL
ANKO COMPONENTS (I)
▸ Often it’s nicer to have UI code separated from onCreate or other livecycle
methods
▸ AnkoComponent helps organising your UI code in their own classes
ANKO DSL
ANKO COMPONENTS (II)
override fun onCreateView(...)= EditFragmentUI().createView(AnkoContext.create(ctx,this))
class EditFragmentUI : AnkoComponent<EditFragment> {
override fun createView(ui: AnkoContext<EditFragment>) = with(ui) {
verticalLayout {
padding = dip(24)
var title = editText {
id = R.id.title
hintResource = R.string.hint
}
...
button {
id = R.id.add
textResource = R.string.add
onClick { view -> ui.owner.createTodoFrom(title, desc) }
}
}
}
}
ANKO DSL
ANKO COMPONENTS (III)
▸ Anko Preview plugin for
AnkoComponent layouts
▸ Get it here: http://goo.gl/5CVmAA
▸ Can preview layouts and convert XML
to Anko DSL
▸ Can be fiddly to get going with AS,
Kotlin plugin versions
ANKO DSL
EXTENDING ANKOS DSL FUNCTIONALITY (I)
▸ Multiple ways to do this:
▸ insert an existing XML layout into an Anko DSL declaration:

▸ adding new DSL elements to the language
include<View>(R.layout.mylayout) { ... }
inline fun ViewManager.customView(theme: Int = 0) = customView(theme) {}
inline fun ViewManager.customView(theme: Int = 0, init: CustomView.() -> Unit) =
ankoView({ CustomView(it) }, theme, init)
inline fun Activity.customView(theme: Int = 0) = customView(theme) {}
inline fun Activity.customView(theme: Int = 0, init: CustomView.() -> Unit) =
ankoView({ CustomView(it) }, theme, init)
ANKO DSL
EXTENDING ANKOS DSL FUNCTIONALITY (II)
▸ Extending Anko’s DSL to support your own custom view groups is currently rather
painful
▸ Essentially it comes down to .lparams (for layout purposes) not being easily accessible
▸ More here:
▸ http://goo.gl/qpb3SL
▸ http://goo.gl/tMHs2c
▸ Fix targeted for Anko 0.9.1
THE HIDDEN PARTS OF
ANKO
THE HIDDEN PARTS OF ANKO
BUT THERE’S MORE
▸ Intent wrappers for various purposes: e.g. sendSMS(number, [text])
▸ Intent builders
▸ Service shortcuts
▸ Configuration qualifiers: configuration(screenSize = ScreenSize.LARGE,
orientation = Orientation.LANDSCAPE) { … }
▸ Asynchronous tasks
▸ SQLLite
THE HIDDEN PARTS OF ANKO
INTENT WRAPPERS AND SERVICE SHORTCUTS
▸ Anko provides wrappers for commonly used Intents:
▸ makeCall(number), sendSMS(number, text), browse(url) etc.
▸ Shortcuts to Android services:
▸ notificationManager, displayManager, sensorManager etc.
▸ Useful, but both not major features of Anko
THE HIDDEN PARTS OF ANKO
INTENT BUILDERS
▸ Syntactic sugar to cut down the amount of code needed to start a new activity
val intent = Intent(this, javaClass<MyActivity>())
intent.putExtra("customerId", 4711)
intent.putExtra("country", "NZ")
startActivity(intent)
startActivity(Intent(this, MyActivity::class.java).
putExtra("customerId", 4711).putExtra("country", "NZ"))
startActivity<MyActivity>("customerId" to 4711, "country" to "NZ")
THE HIDDEN PARTS OF ANKO
CONFIGURATION QUALIFIERS
▸ “CSS Media Queries for Android”
▸ Screen features:
▸ screenSize, density, orientation, long, 

nightMode, rightToLeft, smallestWidth
▸ SDK versions:
▸ fromSdk, sdk
▸ Other:
▸ language, uiMode
configuration(screenSize = ScreenSize.LARGE,
orientation =
Orientation.LANDSCAPE)
{
/*
This code will be only executed
if the screen is large and its
orientation is landscape
*/
}
THE HIDDEN PARTS OF ANKO
ASYNC DSL
▸ Does anyone enjoy working with AsyncTasks?
▸ Anko: async and asyncResult (return future respectively future with result)
async() {
val result = PetFindCommand("90210","cat").execute()
uiThread {
animalList.adapter = AnimalListAdapter(result,
object: AnimalListAdapter.ItemClickListener{
override fun invoke(pet:Pet) {
toast(pet.name)
}
}
)
}
}
THE HIDDEN PARTS OF ANKO
SQLITE (I)
▸ Working with SQLite usually requires a lot of boilerplate code and try/catch-
structures, issues around concurrency, dealing with cached code and
references etc.
▸ Anko aims to make that easier
▸ Dependency: compile ‘org.jetbrains.anko:anko-sqlite:0.9'
▸ Setup class extending ManagedSQLiteOpenHelper in your code
THE HIDDEN PARTS OF ANKO
SQLITE (II)
▸ database.use ensures DB is opened
and closed correctly
▸ Asynchronous use of the DB is possible
through Anko’s async DSL
▸ Important: There can still be
SQLiteExceptions when handling SQL
code - Anko doesn’t abstract those.
▸ Handling of cursors and parsing data
via lambdas
database.use {
createTable("Customer", ifNotExists = true,
"id" to INTEGER + PRIMARY_KEY + UNIQUE,
"name" to TEXT,
"photo" to BLOB)
}
APP
STEP 10 - CLICK ON LIST
▸ Adapter/RecyclerView click handler changes
▸ when-statement
APP
STEP 11 - EXCEPTIONS
▸ Exception handler in Anko
APP
STEP 12 - ANKO DSL
▸ Anko layout for main view
▸ Removing layout XML and replacing it with Anko DSL
APP
STEP 13 - ANKO COMPONENTS
▸ Refactoring into Anko component
APP
STEP 14
▸ Mini refactoring for better testing
▸ jUnit tests in Kotlin
APP
STEP 15
▸ Using Spek for BDD testing
APP
IDEAS
▸ Add second Activity or Fragment to display details
▸ Use Kotson instead of Gson
▸ Change RecyclerView to Anko Layout DSL
▸ Use Butterknife instead of Kotterknife
▸ Write some proper tests
▸ Try Android integration tests
MORE
WELLINGTON.KT
MORE
GDG WELLINTON
MORE
MOBILE REFRESH WELLINGTON - 25 AUGUST 2017
RESOURCES
RESOURCES
▸ Kotlin: http://kotlinlang.org
▸ Anko: https://github.com/Kotlin/anko
▸ Kotter Knife: https://github.com/JakeWharton/kotterknife
▸ Spek: http://jetbrains.github.io/spek/
▸ Kotson: https://github.com/SalomonBrys/Kotson
RESOURCES
GET IN TOUCH
Kai Koenig
Email: kai@ventego-creative.co.nz
Twitter: @AgentK

Mais conteúdo relacionado

Mais procurados

Introduction to kotlin for android app development gdg ahmedabad dev fest 2017
Introduction to kotlin for android app development   gdg ahmedabad dev fest 2017Introduction to kotlin for android app development   gdg ahmedabad dev fest 2017
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017Hardik Trivedi
 
Taking Kotlin to production, Seriously
Taking Kotlin to production, SeriouslyTaking Kotlin to production, Seriously
Taking Kotlin to production, SeriouslyHaim Yadid
 
Kotlin Developer Starter in Android projects
Kotlin Developer Starter in Android projectsKotlin Developer Starter in Android projects
Kotlin Developer Starter in Android projectsBartosz Kosarzycki
 
Kotlin for Android - Vali Iorgu - mRready
Kotlin for Android - Vali Iorgu - mRreadyKotlin for Android - Vali Iorgu - mRready
Kotlin for Android - Vali Iorgu - mRreadyMobileAcademy
 
Intro to Kotlin
Intro to KotlinIntro to Kotlin
Intro to KotlinMagda Miu
 
K is for Kotlin
K is for KotlinK is for Kotlin
K is for KotlinTechMagic
 
Develop your next app with kotlin @ AndroidMakersFr 2017
Develop your next app with kotlin @ AndroidMakersFr 2017Develop your next app with kotlin @ AndroidMakersFr 2017
Develop your next app with kotlin @ AndroidMakersFr 2017Arnaud Giuliani
 
Kotlin, smarter development for the jvm
Kotlin, smarter development for the jvmKotlin, smarter development for the jvm
Kotlin, smarter development for the jvmArnaud Giuliani
 
Swift and Kotlin Presentation
Swift and Kotlin PresentationSwift and Kotlin Presentation
Swift and Kotlin PresentationAndrzej Sitek
 
A quick and fast intro to Kotlin
A quick and fast intro to Kotlin A quick and fast intro to Kotlin
A quick and fast intro to Kotlin XPeppers
 
eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...
eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...
eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...eMan s.r.o.
 
Kotlin in action
Kotlin in actionKotlin in action
Kotlin in actionCiro Rizzo
 
Kotlin hands on - MorningTech ekito 2017
Kotlin hands on - MorningTech ekito 2017Kotlin hands on - MorningTech ekito 2017
Kotlin hands on - MorningTech ekito 2017Arnaud Giuliani
 
Building microservices with Kotlin
Building microservices with KotlinBuilding microservices with Kotlin
Building microservices with KotlinHaim Yadid
 
Kotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developersKotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developersBartosz Kosarzycki
 
Introduction to kotlin + spring boot demo
Introduction to kotlin + spring boot demoIntroduction to kotlin + spring boot demo
Introduction to kotlin + spring boot demoMuhammad Abdullah
 

Mais procurados (20)

Introduction to kotlin for android app development gdg ahmedabad dev fest 2017
Introduction to kotlin for android app development   gdg ahmedabad dev fest 2017Introduction to kotlin for android app development   gdg ahmedabad dev fest 2017
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017
 
Fall in love with Kotlin
Fall in love with KotlinFall in love with Kotlin
Fall in love with Kotlin
 
Taking Kotlin to production, Seriously
Taking Kotlin to production, SeriouslyTaking Kotlin to production, Seriously
Taking Kotlin to production, Seriously
 
Kotlin Developer Starter in Android projects
Kotlin Developer Starter in Android projectsKotlin Developer Starter in Android projects
Kotlin Developer Starter in Android projects
 
Kotlin for Android - Vali Iorgu - mRready
Kotlin for Android - Vali Iorgu - mRreadyKotlin for Android - Vali Iorgu - mRready
Kotlin for Android - Vali Iorgu - mRready
 
Introduction to kotlin
Introduction to kotlinIntroduction to kotlin
Introduction to kotlin
 
Intro to Kotlin
Intro to KotlinIntro to Kotlin
Intro to Kotlin
 
Kotlin - Better Java
Kotlin - Better JavaKotlin - Better Java
Kotlin - Better Java
 
K is for Kotlin
K is for KotlinK is for Kotlin
K is for Kotlin
 
Develop your next app with kotlin @ AndroidMakersFr 2017
Develop your next app with kotlin @ AndroidMakersFr 2017Develop your next app with kotlin @ AndroidMakersFr 2017
Develop your next app with kotlin @ AndroidMakersFr 2017
 
Kotlin, smarter development for the jvm
Kotlin, smarter development for the jvmKotlin, smarter development for the jvm
Kotlin, smarter development for the jvm
 
Swift and Kotlin Presentation
Swift and Kotlin PresentationSwift and Kotlin Presentation
Swift and Kotlin Presentation
 
A quick and fast intro to Kotlin
A quick and fast intro to Kotlin A quick and fast intro to Kotlin
A quick and fast intro to Kotlin
 
eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...
eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...
eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...
 
Kotlin in action
Kotlin in actionKotlin in action
Kotlin in action
 
Kotlin hands on - MorningTech ekito 2017
Kotlin hands on - MorningTech ekito 2017Kotlin hands on - MorningTech ekito 2017
Kotlin hands on - MorningTech ekito 2017
 
Building microservices with Kotlin
Building microservices with KotlinBuilding microservices with Kotlin
Building microservices with Kotlin
 
Kotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developersKotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developers
 
Introduction to kotlin + spring boot demo
Introduction to kotlin + spring boot demoIntroduction to kotlin + spring boot demo
Introduction to kotlin + spring boot demo
 
Kotlin Overview
Kotlin OverviewKotlin Overview
Kotlin Overview
 

Semelhante a Summer of Tech 2017 - Kotlin/Android bootcamp

Android 101 - Building a simple app with Kotlin in 90 minutes
Android 101 - Building a simple app with Kotlin in 90 minutesAndroid 101 - Building a simple app with Kotlin in 90 minutes
Android 101 - Building a simple app with Kotlin in 90 minutesKai Koenig
 
Kotlin fundamentals - By: Ipan Ardian
Kotlin fundamentals - By: Ipan ArdianKotlin fundamentals - By: Ipan Ardian
Kotlin fundamentals - By: Ipan ArdianRizal Khilman
 
Kotlin Fundamentals
Kotlin Fundamentals Kotlin Fundamentals
Kotlin Fundamentals Ipan Ardian
 
Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)Hassan Abid
 
Kotlin coroutines and spring framework
Kotlin coroutines and spring frameworkKotlin coroutines and spring framework
Kotlin coroutines and spring frameworkSunghyouk Bae
 
KotlinForJavaDevelopers-UJUG.pptx
KotlinForJavaDevelopers-UJUG.pptxKotlinForJavaDevelopers-UJUG.pptx
KotlinForJavaDevelopers-UJUG.pptxIan Robertson
 
Being Expressive in Code
Being Expressive in CodeBeing Expressive in Code
Being Expressive in CodeEamonn Boyle
 
Kotlin for Android Development
Kotlin for Android DevelopmentKotlin for Android Development
Kotlin for Android DevelopmentSpeck&Tech
 
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...Tudor Dragan
 
Having Fun with Kotlin Android - DILo Surabaya
Having Fun with Kotlin Android - DILo SurabayaHaving Fun with Kotlin Android - DILo Surabaya
Having Fun with Kotlin Android - DILo SurabayaDILo Surabaya
 
Kotlin Coroutines and Android sitting in a tree
Kotlin Coroutines and Android sitting in a treeKotlin Coroutines and Android sitting in a tree
Kotlin Coroutines and Android sitting in a treeKai Koenig
 
Kotlin for Android devs
Kotlin for Android devsKotlin for Android devs
Kotlin for Android devsAdit Lal
 
Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)
Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)
Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)Andrés Viedma Peláez
 
Kotlin: A pragmatic language by JetBrains
Kotlin: A pragmatic language by JetBrainsKotlin: A pragmatic language by JetBrains
Kotlin: A pragmatic language by JetBrainsJigar Gosar
 
Introduction to Kotlin
Introduction to KotlinIntroduction to Kotlin
Introduction to KotlinPatrick Yin
 
Best Practices for Quality Code
Best Practices for Quality CodeBest Practices for Quality Code
Best Practices for Quality CodeSercan Degirmenci
 
What’s new in Kotlin?
What’s new in Kotlin?What’s new in Kotlin?
What’s new in Kotlin?Squareboat
 

Semelhante a Summer of Tech 2017 - Kotlin/Android bootcamp (20)

Android 101 - Building a simple app with Kotlin in 90 minutes
Android 101 - Building a simple app with Kotlin in 90 minutesAndroid 101 - Building a simple app with Kotlin in 90 minutes
Android 101 - Building a simple app with Kotlin in 90 minutes
 
Kotlin fundamentals - By: Ipan Ardian
Kotlin fundamentals - By: Ipan ArdianKotlin fundamentals - By: Ipan Ardian
Kotlin fundamentals - By: Ipan Ardian
 
Kotlin Fundamentals
Kotlin Fundamentals Kotlin Fundamentals
Kotlin Fundamentals
 
Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)
 
Kotlin coroutines and spring framework
Kotlin coroutines and spring frameworkKotlin coroutines and spring framework
Kotlin coroutines and spring framework
 
Why Kotlin is your next language?
Why Kotlin is your next language? Why Kotlin is your next language?
Why Kotlin is your next language?
 
KotlinForJavaDevelopers-UJUG.pptx
KotlinForJavaDevelopers-UJUG.pptxKotlinForJavaDevelopers-UJUG.pptx
KotlinForJavaDevelopers-UJUG.pptx
 
Being Expressive in Code
Being Expressive in CodeBeing Expressive in Code
Being Expressive in Code
 
Python1
Python1Python1
Python1
 
Kotlin for Android Development
Kotlin for Android DevelopmentKotlin for Android Development
Kotlin for Android Development
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...
 
Having Fun with Kotlin Android - DILo Surabaya
Having Fun with Kotlin Android - DILo SurabayaHaving Fun with Kotlin Android - DILo Surabaya
Having Fun with Kotlin Android - DILo Surabaya
 
Kotlin Coroutines and Android sitting in a tree
Kotlin Coroutines and Android sitting in a treeKotlin Coroutines and Android sitting in a tree
Kotlin Coroutines and Android sitting in a tree
 
Kotlin for Android devs
Kotlin for Android devsKotlin for Android devs
Kotlin for Android devs
 
Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)
Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)
Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)
 
Kotlin: A pragmatic language by JetBrains
Kotlin: A pragmatic language by JetBrainsKotlin: A pragmatic language by JetBrains
Kotlin: A pragmatic language by JetBrains
 
Introduction to Kotlin
Introduction to KotlinIntroduction to Kotlin
Introduction to Kotlin
 
Best Practices for Quality Code
Best Practices for Quality CodeBest Practices for Quality Code
Best Practices for Quality Code
 
What’s new in Kotlin?
What’s new in Kotlin?What’s new in Kotlin?
What’s new in Kotlin?
 

Mais de Kai Koenig

Why a whole country skipped a day - Fun with Timezones
Why a whole country skipped a day - Fun with Timezones Why a whole country skipped a day - Fun with Timezones
Why a whole country skipped a day - Fun with Timezones Kai Koenig
 
Android 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsAndroid 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsKai Koenig
 
Android 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other thingsAndroid 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other thingsKai Koenig
 
Kotlin Coroutines and Android sitting in a tree - 2018 version
Kotlin Coroutines and Android sitting in a tree - 2018 versionKotlin Coroutines and Android sitting in a tree - 2018 version
Kotlin Coroutines and Android sitting in a tree - 2018 versionKai Koenig
 
Improving your CFML code quality
Improving your CFML code qualityImproving your CFML code quality
Improving your CFML code qualityKai Koenig
 
Introduction to Data Mining
Introduction to Data MiningIntroduction to Data Mining
Introduction to Data MiningKai Koenig
 
Garbage First and you
Garbage First and youGarbage First and you
Garbage First and youKai Koenig
 
Real World Lessons in jQuery Mobile
Real World Lessons in jQuery MobileReal World Lessons in jQuery Mobile
Real World Lessons in jQuery MobileKai Koenig
 
The JVM is your friend
The JVM is your friendThe JVM is your friend
The JVM is your friendKai Koenig
 
Regular Expressions 101
Regular Expressions 101Regular Expressions 101
Regular Expressions 101Kai Koenig
 
There's a time and a place
There's a time and a placeThere's a time and a place
There's a time and a placeKai Koenig
 
Clojure - an introduction (and some CFML)
Clojure - an introduction (and some CFML)Clojure - an introduction (and some CFML)
Clojure - an introduction (and some CFML)Kai Koenig
 
AngularJS for designers and developers
AngularJS for designers and developersAngularJS for designers and developers
AngularJS for designers and developersKai Koenig
 
Cryptography for developers
Cryptography for developersCryptography for developers
Cryptography for developersKai Koenig
 
JVM and Garbage Collection Tuning
JVM and Garbage Collection TuningJVM and Garbage Collection Tuning
JVM and Garbage Collection TuningKai Koenig
 
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...Kai Koenig
 

Mais de Kai Koenig (16)

Why a whole country skipped a day - Fun with Timezones
Why a whole country skipped a day - Fun with Timezones Why a whole country skipped a day - Fun with Timezones
Why a whole country skipped a day - Fun with Timezones
 
Android 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsAndroid 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture Components
 
Android 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other thingsAndroid 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other things
 
Kotlin Coroutines and Android sitting in a tree - 2018 version
Kotlin Coroutines and Android sitting in a tree - 2018 versionKotlin Coroutines and Android sitting in a tree - 2018 version
Kotlin Coroutines and Android sitting in a tree - 2018 version
 
Improving your CFML code quality
Improving your CFML code qualityImproving your CFML code quality
Improving your CFML code quality
 
Introduction to Data Mining
Introduction to Data MiningIntroduction to Data Mining
Introduction to Data Mining
 
Garbage First and you
Garbage First and youGarbage First and you
Garbage First and you
 
Real World Lessons in jQuery Mobile
Real World Lessons in jQuery MobileReal World Lessons in jQuery Mobile
Real World Lessons in jQuery Mobile
 
The JVM is your friend
The JVM is your friendThe JVM is your friend
The JVM is your friend
 
Regular Expressions 101
Regular Expressions 101Regular Expressions 101
Regular Expressions 101
 
There's a time and a place
There's a time and a placeThere's a time and a place
There's a time and a place
 
Clojure - an introduction (and some CFML)
Clojure - an introduction (and some CFML)Clojure - an introduction (and some CFML)
Clojure - an introduction (and some CFML)
 
AngularJS for designers and developers
AngularJS for designers and developersAngularJS for designers and developers
AngularJS for designers and developers
 
Cryptography for developers
Cryptography for developersCryptography for developers
Cryptography for developers
 
JVM and Garbage Collection Tuning
JVM and Garbage Collection TuningJVM and Garbage Collection Tuning
JVM and Garbage Collection Tuning
 
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
 

Último

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedDelhi Call girls
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxalwaysnagaraju26
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 

Último (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 

Summer of Tech 2017 - Kotlin/Android bootcamp

  • 1. BUILDING A SIMPLE APP WITH KOTLIN IN 90 MINUTES KAI KOENIG (@AGENTK)
  • 2. HELLO HELLO I’m Kai! I’m a { Software Engineer | Pilot | Traveller | 
 Gamer | Husband | Dad to 1 cat and 3 chickens | 
 … } Find me on Twitter: @AgentK
  • 4. AGENDA ▸ What is Kotlin? ▸ Language idioms & concepts ▸ Kotlin and Android ▸ Anko DSL
  • 9. WHAT IS KOTLIN? SOME FUNDAMENTALS ▸ Statically typed programming language for the JVM and Android ▸ Started as internal language “Project Kotlin” at Jetbrains in 2010 ▸ Now: Open-Source, Apache License ▸ Kotlin SDK plus tool support for IntelliJ, Android Studio, Eclipse ▸ Named after an island in the Gulf of Finland
  • 10. WHAT IS KOTLIN? MOTIVATION FOR KOTLIN ▸ The Java platform is awesome, but it has its issues: ▸ sometimes tied to backwards/legacy compatibility ▸ can be a very verbose language and produce bloated code ▸ type system has various flaws ▸ Kotlin aims to fix a lot of those issues ▸ compiles to Java 6 byte code therefore caters well for Android runtimes
  • 12. LANGUAGE IDIOMS & CONCEPTS OVERVIEW ▸ Immutability ▸ String templates & Enum classes ▸ Null safety ▸ Properties and Fields ▸ Type inference and casts ▸ Data classes ▸ Syntactic sugar (loops, ranges etc) ▸ Extension functions ▸ Lambdas ▸ Collection API ▸ Type-safe builders ▸ Java-Kotlin-Interop
  • 13. LANGUAGE IDIOMS & CONCEPTS IMMUTABILITY ▸ Built-in support for mutable and immutable variables, properties and fields ▸ Keywords var and val ▸ val - immutable (recommended) ▸ var - mutable ▸ Similar concept applies for class properties, val creates getters, var creates getters and setters (more later) val a: Int = 1 val b = 1 val c: Int c = 1 var x = 23 x += 1
  • 14. LANGUAGE IDIOMS & CONCEPTS STRING TEMPLATES & ENUM CLASSES (I) ▸ Kotlin Strings can contain template expressions ▸ String templates start with a $ character and ▸ can contain simple references such as $s, as well as ▸ complex expressions in curly braces: 
 ${s.length} val s = "abc" val str = "$s.length is ${s.length}" Output: abc.length is 3
  • 15. LANGUAGE IDIOMS & CONCEPTS STRING TEMPLATES & ENUM CLASSES (II) ▸ Kotlin has a dedicated and expressive enum class ▸ Can be used very nicely in conjunction with String templates enum class Locale(val hello: String) { DE_DE("Hallo"), EN_NZ("Hello"), MI_NZ("Kia Ora") } class Customer(val firstName:String, val lastName:String, val locale: Locale = Locale.DE_DE) { fun sayHello() = println( "${locale.hello}, $firstName $lastName") } fun main(args : Array<String>) { val myCustomer = Customer("Sandra", "Musterfrau", Locale.MI_NZ) myCustomer.sayHello() }
  • 16. LANGUAGE IDIOMS & CONCEPTS NULL SAFETY ▸ Motivation: A better way to deal with NPEs ▸ Kotlin differentiates nullable types from non- nullable types by adding a ? to the type: ▸ String: no nullable ▸ String?: nullable ▸ Handle manually ▸ Use Safe Call operator ?. ▸ Use the !! operator to allow/trigger a NPE // Won't compile var lastName: String = null // Will compile var lastNameNullable: String? = null // Will also not compile println(lastNameNullable.length) // Option 1 (-1) println(if (lastNameNullable != null) lastNameNullable.length else -1) // Option 2 (null) println(lastNameNullable?.length) // Option 3 (NPE) println(lastNameNullable!!.length)
  • 17. LANGUAGE IDIOMS & CONCEPTS PROPERTIES AND FIELDS ▸ Kotlin classes have mutable or immutable properties ▸ Default getter/setters for properties, can be customised ▸ An automated backing field can be provided by the compiler (if required) ▸ Alternative: use an explicit backing property var counter = 0 set(value) { if (value >= 0) field = value } public class Address { public var name: String = ... public var street: String = ... public var city: String = ... public var state: String? = ... public var zip: String = ... }
  • 18. LANGUAGE IDIOMS & CONCEPTS TYPE INFERENCE AND CASTS (I) ▸ When possible, Kotlin will infer the type of variables ▸ Explicit conversions, type widening and inference ▸ Smaller types are not subtypes of bigger types, no implicit conversion ▸ Types are often inferred from the context val b: Byte = 1 // This won't work val i: Int = b // This will val i: Int = b.toInt() val l: Long = 1L + 3
  • 19. LANGUAGE IDIOMS & CONCEPTS TYPE INFERENCE AND CASTS (II) ▸ is or !is checks if an object adheres to a certain type ▸ Smart cast: Compiler tracks is-expressions for immutable values ▸ works for val local variables and private, internal or in-module performed casts ▸ works for var local variables if the variable hasn’t been modified between check and usage, never for var properties fun whatIs(x: Any) { when (x) { is Int -> println(x + 42) is String -> println(x.length) is IntArray -> println(x.sum()) } } whatIs(4) // 46 whatIs("4") // 1 whatIs(intArrayOf(1,2,3,4,5)) // 15
  • 20. LANGUAGE IDIOMS & CONCEPTS DATA CLASSES ▸ The POJOs/Beans of other languages ▸ Data classes implicitly create: ▸ getters/setters (non-data classes have those too) - recommend to use val as often as possible. ▸ useful implementations for equals(), hashCode(), toString(), copy() ▸ copy() has default parameters and can be used to alter a copy data class ChromeEncryptedPayload( val encryptedPayload: String, val encryptionHeader: String, val cryptoKeyHeader: String) val pl = ChromeEncryptedPayload( encryptedPayload = "...", encryptionHeader = "...", cryptoKeyHeader = "...") val anotherPl = pl.copy( encryptedPayload = "...")
  • 21. LANGUAGE IDIOMS & CONCEPTS EXTENSION FUNCTIONS ▸ Allow adding new functionality to a class without inheritance or Decorators ▸ Kotlin has extension functions as well as extension properties ▸ Resolved statically, don’t actually modify the class (excellent example why this has to be the case at http:// goo.gl/EN6bTs fun Int.sum(otherInt: Int): Int = this + otherInt 3.sum(7) fun Activity.toast(message: CharSequence, duration: Int = TOAST.LENGTH_SHORT) { Toast.makeText(this, message, duration).show() } // In onCreate of an Activity override fun onCreate(...) { ... toast("Hi there") ... }
  • 22. LANGUAGE IDIOMS & CONCEPTS LAMBDAS ▸ Anonymous function or “function literal”, closely related to the ideas of Higher-Order-Functions val sum = { x: Int, y: Int -> x + y } val sum: (Int, Int) -> Int = { x, y -> x + y } private fun convertPetListToDomain(list: List<Pet>): List<PetDomain> { return list.map { convertPetItemToDomain(it) } } private fun convertPetItemToDomain(pet: Pet): PetDomain { return PetDomain(pet.age,pet.size,pet.id,pet.name,pet.sex,pet.breed) }
  • 23. LANGUAGE IDIOMS & CONCEPTS TYPE-SAFE BUILDERS (I) ▸ Builders are a very popular approach in Groovy to define data in a declarative way ▸ Often used for: ▸ generating XML or JSON ▸ UI layout (Swing components) etc ▸ In Kotlin, builders even can be type- checked JsonBuilder builder = new JsonBuilder() builder.records { car { name 'HSV Maloo' make 'Holden' year 2006 country 'Australia' } } String json = JsonOutput.prettyPrint (builder.toString())
  • 24. LANGUAGE IDIOMS & CONCEPTS TYPE-SAFE BUILDERS (II) ▸ html() is a function with a lambda as an argument (init) ▸ init’s type is a function type with receiver, this allows you to: ▸ pass receiver (of type HTML) to function ▸ call members of instance inside the function fun result(args: Array<String>) = html { head { title {”HTML in Kotlin"} } body { ... } } fun html(init: HTML.() -> Unit): HTML { val html = HTML() html.init() return html }
  • 25. LANGUAGE IDIOMS & CONCEPTS TYPE-SAFE BUILDERS (III) ▸ HTML class has functions to build the head and the body elements of the DSL. ▸ Not shown: classes further down in the hierarchy: ▸ Head, Body etc. ▸ Complete HTML builder example at: http://goo.gl/TndcC9 class HTML { ... fun head(headBuilder: Head.() -> Unit) { head = Head() head?.headBuilder() } fun body(bodyBuilder: Body.() -> Unit) { body = Body() body?.bodyBuilder() } }
  • 26. LANGUAGE IDIOMS & CONCEPTS JAVA-KOTLIN-INTEROP ▸ Java and Kotlin are fully interoperable from an integration point of view ▸ Your Java code can call and use Kotlin code ▸ Your Kotlin code can call and use Java code ▸ The latter is in particular useful because it means you can continue to use pretty much any existing Android/Java library ▸ Check out Hendrik Kokocinski’s sample Kotlin app that uses all kinds of well known Android/Java libs: https://goo.gl/xdYqf5
  • 27. LANGUAGE IDIOMS & CONCEPTS OVERVIEW ▸ Immutability ▸ String templates & Enum classes ▸ Null safety ▸ Properties and Fields ▸ Type inference and casts ▸ Data classes ▸ Syntactic sugar (loops, ranges etc) ▸ Extension functions ▸ Lambdas ▸ Collection API ▸ Type-safe builders ▸ Java-Kotlin-Interop
  • 29. APP STEP 1 - KOTLIN SETUP ▸ Setup Kotlin Plugin and tooling ▸ Automated vs. manual
  • 30. APP STEP 2 - REFACTOR JAVA -> KOTLIN ▸ Kotlin Source Path ▸ Replace Java activity with Kotlin equivalent ▸ Class/Inheritance syntax ▸ Function syntax ▸ The ?
  • 31. APP STEP 3 - KOTLIN ANDROID EXTENSIONS ▸ Finding views with KAE (built into the plugin)
  • 32. APP STEP 4 - MORE KAE ▸ KAE Click handler - compare to classic Kotlin code ▸ Lambdas
  • 33. APP STEP 5 - BUTTERKNIFE ▸ View Bindings with Butterknife in Kotlin ▸ KAPT setup
  • 34. APP STEP 6 - RECYCLERVIEW AND SOME DATA ▸ Adding Adapter and RecyclerView ▸ Displaying hardcoded data for now
  • 35. APP STEP 7 - DATA (I) ▸ Loading and returning some hard JSON sample data ▸ Companion object ▸ No UI changes, use debugger in MainActivity
  • 36. APP STEP 8 - DATA (II) / GSON PARSING ▸ Kotlin data classes ▸ GSON parsing ▸ String templates ▸ No UI changes, use debugger in MainActivity
  • 37. APP STEP 9 - ARCHITECTURE ▸ Command pattern ▸ Introducing Anko for async ▸ More String templates ▸ with ▸ Interface ▸ .map
  • 39. ANKO DSL WHAT IS A DSL? ▸ Domain-Specific Language ▸ Limited expressiveness: ▸ DSLs are usually not general-purpose languages ▸ strongly focussed on a particular domain ▸ examples: SQL, Ant XML, XSLT, Gradle etc.
  • 40. ANKO DSL A DSL FOR LAYOUTS ▸ The most important element of Anko is the Layout DSL ▸ Idea: replace XML layout definitions by Kotlin code - without having to build the layout in a fully programmatic sense ▸ Modular: as we’re talking about UI/Layout, it’s very important to select the right library for your minSDKVersion ▸ Extensible: you can add your own DSL elements for custom UI controls
  • 41. ANKO DSL LAYOUT XML <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <EditText android:layout_width="match_parent" android:gravity="center" android:text="@string/empty_todos_message" android:layout_weight="7" android:layout_height="wrap_content" /> <Button android:layout_width="match_parent" android:layout_weight="1" android:text="Say Hello" android:layout_height="0dp" /> </LinearLayout>
  • 42. ANKO DSL PROGRAMMATIC LAYOUT IN KOTLIN val act = this val layout = LinearLayout(act) layout.orientation = LinearLayout.VERTICAL val name = EditText(act) val button = Button(act) button.text = "Say Hello" button.setOnClickListener { Toast.makeText(act, "Hello, ${name.text}!", Toast.LENGTH_SHORT).show() } layout.addView(name) layout.addView(button)
  • 43. ANKO DSL ANKO DSL verticalLayout { val name = editText() button("Say Hello") { onClick { toast("Hello, ${name.text}!") } } }
  • 44. ANKO DSL ANKO DSL INTERNALS ▸ Anko DSL example from previous slide looks very similar to the earlier HTML builder example ▸ Anko uses extension functions arranged into type-safe builders and lambdas ▸ You don’t have to write all those extensions by hand though - Anko generates them based on the Android SDK’s android.jar
  • 45. ANKO DSL GETTING STARTED WITH ANKO DSL (I) ▸ Depending on minSdkVersion of project, import:
 compile "org.jetbrains.anko:anko-sdk{15|19|21|23}:0.9" ▸ If the project uses an Android Support library, import matching Anko library:
 compile "org.jetbrains.anko:anko-recyclerview-v7:0.9"
  • 46. ANKO DSL GETTING STARTED WITH ANKO DSL (II) ▸ General approach: ▸ Anko DSL automatically becomes available in onCreate() in an Activity ▸ no need for setContentView(), Anko DSL also automatically sets the content view for activities override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) verticalLayout { padding = dip(30) editText { hint = "Name" textSize = 24f } editText { hint = "Password" textSize = 24f } button("Login") { textSize = 26f } } }
  • 47. ANKO DSL ANKO DSL IN FRAGMENTS ▸ In fragments, use 
 onCreateView(…) ▸ Returns UI {…}.view: ▸ mandatory before Anko 0.8 ▸ works well for Fragments ▸ createTodo() is a fragment-private method override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? { return UI { verticalLayout { padding = dip(24) var title = editText { id = R.id.title hintResource = R.string.hint } ... button { id = R.id.add textResource = R.string.add onClick { view -> createTodo(title, desc) } } } }.view }
  • 48. ANKO DSL ANKO COMPONENTS (I) ▸ Often it’s nicer to have UI code separated from onCreate or other livecycle methods ▸ AnkoComponent helps organising your UI code in their own classes
  • 49. ANKO DSL ANKO COMPONENTS (II) override fun onCreateView(...)= EditFragmentUI().createView(AnkoContext.create(ctx,this)) class EditFragmentUI : AnkoComponent<EditFragment> { override fun createView(ui: AnkoContext<EditFragment>) = with(ui) { verticalLayout { padding = dip(24) var title = editText { id = R.id.title hintResource = R.string.hint } ... button { id = R.id.add textResource = R.string.add onClick { view -> ui.owner.createTodoFrom(title, desc) } } } } }
  • 50. ANKO DSL ANKO COMPONENTS (III) ▸ Anko Preview plugin for AnkoComponent layouts ▸ Get it here: http://goo.gl/5CVmAA ▸ Can preview layouts and convert XML to Anko DSL ▸ Can be fiddly to get going with AS, Kotlin plugin versions
  • 51. ANKO DSL EXTENDING ANKOS DSL FUNCTIONALITY (I) ▸ Multiple ways to do this: ▸ insert an existing XML layout into an Anko DSL declaration:
 ▸ adding new DSL elements to the language include<View>(R.layout.mylayout) { ... } inline fun ViewManager.customView(theme: Int = 0) = customView(theme) {} inline fun ViewManager.customView(theme: Int = 0, init: CustomView.() -> Unit) = ankoView({ CustomView(it) }, theme, init) inline fun Activity.customView(theme: Int = 0) = customView(theme) {} inline fun Activity.customView(theme: Int = 0, init: CustomView.() -> Unit) = ankoView({ CustomView(it) }, theme, init)
  • 52. ANKO DSL EXTENDING ANKOS DSL FUNCTIONALITY (II) ▸ Extending Anko’s DSL to support your own custom view groups is currently rather painful ▸ Essentially it comes down to .lparams (for layout purposes) not being easily accessible ▸ More here: ▸ http://goo.gl/qpb3SL ▸ http://goo.gl/tMHs2c ▸ Fix targeted for Anko 0.9.1
  • 53. THE HIDDEN PARTS OF ANKO
  • 54. THE HIDDEN PARTS OF ANKO BUT THERE’S MORE ▸ Intent wrappers for various purposes: e.g. sendSMS(number, [text]) ▸ Intent builders ▸ Service shortcuts ▸ Configuration qualifiers: configuration(screenSize = ScreenSize.LARGE, orientation = Orientation.LANDSCAPE) { … } ▸ Asynchronous tasks ▸ SQLLite
  • 55. THE HIDDEN PARTS OF ANKO INTENT WRAPPERS AND SERVICE SHORTCUTS ▸ Anko provides wrappers for commonly used Intents: ▸ makeCall(number), sendSMS(number, text), browse(url) etc. ▸ Shortcuts to Android services: ▸ notificationManager, displayManager, sensorManager etc. ▸ Useful, but both not major features of Anko
  • 56. THE HIDDEN PARTS OF ANKO INTENT BUILDERS ▸ Syntactic sugar to cut down the amount of code needed to start a new activity val intent = Intent(this, javaClass<MyActivity>()) intent.putExtra("customerId", 4711) intent.putExtra("country", "NZ") startActivity(intent) startActivity(Intent(this, MyActivity::class.java). putExtra("customerId", 4711).putExtra("country", "NZ")) startActivity<MyActivity>("customerId" to 4711, "country" to "NZ")
  • 57. THE HIDDEN PARTS OF ANKO CONFIGURATION QUALIFIERS ▸ “CSS Media Queries for Android” ▸ Screen features: ▸ screenSize, density, orientation, long, 
 nightMode, rightToLeft, smallestWidth ▸ SDK versions: ▸ fromSdk, sdk ▸ Other: ▸ language, uiMode configuration(screenSize = ScreenSize.LARGE, orientation = Orientation.LANDSCAPE) { /* This code will be only executed if the screen is large and its orientation is landscape */ }
  • 58. THE HIDDEN PARTS OF ANKO ASYNC DSL ▸ Does anyone enjoy working with AsyncTasks? ▸ Anko: async and asyncResult (return future respectively future with result) async() { val result = PetFindCommand("90210","cat").execute() uiThread { animalList.adapter = AnimalListAdapter(result, object: AnimalListAdapter.ItemClickListener{ override fun invoke(pet:Pet) { toast(pet.name) } } ) } }
  • 59. THE HIDDEN PARTS OF ANKO SQLITE (I) ▸ Working with SQLite usually requires a lot of boilerplate code and try/catch- structures, issues around concurrency, dealing with cached code and references etc. ▸ Anko aims to make that easier ▸ Dependency: compile ‘org.jetbrains.anko:anko-sqlite:0.9' ▸ Setup class extending ManagedSQLiteOpenHelper in your code
  • 60. THE HIDDEN PARTS OF ANKO SQLITE (II) ▸ database.use ensures DB is opened and closed correctly ▸ Asynchronous use of the DB is possible through Anko’s async DSL ▸ Important: There can still be SQLiteExceptions when handling SQL code - Anko doesn’t abstract those. ▸ Handling of cursors and parsing data via lambdas database.use { createTable("Customer", ifNotExists = true, "id" to INTEGER + PRIMARY_KEY + UNIQUE, "name" to TEXT, "photo" to BLOB) }
  • 61. APP STEP 10 - CLICK ON LIST ▸ Adapter/RecyclerView click handler changes ▸ when-statement
  • 62. APP STEP 11 - EXCEPTIONS ▸ Exception handler in Anko
  • 63. APP STEP 12 - ANKO DSL ▸ Anko layout for main view ▸ Removing layout XML and replacing it with Anko DSL
  • 64. APP STEP 13 - ANKO COMPONENTS ▸ Refactoring into Anko component
  • 65. APP STEP 14 ▸ Mini refactoring for better testing ▸ jUnit tests in Kotlin
  • 66. APP STEP 15 ▸ Using Spek for BDD testing
  • 67. APP IDEAS ▸ Add second Activity or Fragment to display details ▸ Use Kotson instead of Gson ▸ Change RecyclerView to Anko Layout DSL ▸ Use Butterknife instead of Kotterknife ▸ Write some proper tests ▸ Try Android integration tests
  • 70. MORE MOBILE REFRESH WELLINGTON - 25 AUGUST 2017
  • 71. RESOURCES RESOURCES ▸ Kotlin: http://kotlinlang.org ▸ Anko: https://github.com/Kotlin/anko ▸ Kotter Knife: https://github.com/JakeWharton/kotterknife ▸ Spek: http://jetbrains.github.io/spek/ ▸ Kotson: https://github.com/SalomonBrys/Kotson
  • 72. RESOURCES GET IN TOUCH Kai Koenig Email: kai@ventego-creative.co.nz Twitter: @AgentK