kotlin for frontend & backend web development

18
Kotlin Frontend & Backend By : Mohamed Hegazy

Upload: shady-selim

Post on 21-Jan-2018

318 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Kotlin for Frontend & Backend Web development

KotlinFrontend & Backend

By : Mohamed Hegazy

Page 2: Kotlin for Frontend & Backend Web development

Agenda

1. Installation Guide.

2. Frameworks we will use.

3. How to use Kotlin frontend with existing HTML pages.

4. How to use Kotlin frontend to create HTML elements.

5. How to use Kotlin + http requests.

6. How to use Kotlin for server side.

Page 3: Kotlin for Frontend & Backend Web development

Installation Guide

• Jetbrains Intellij for windows https://www.jetbrains.com/idea/download/#section=windows

• Create New Project Using Gradle and choose Kotlin (Java).

• Create Kotlin File – with any name you want

Page 4: Kotlin for Frontend & Backend Web development

Kotlin for frontend with existing HTML

Page 5: Kotlin for Frontend & Backend Web development

Kotlin for frontend with existing HTML

Page 6: Kotlin for Frontend & Backend Web development

Kotlin for frontend creating HTML DOMs

Page 7: Kotlin for Frontend & Backend Web development

Kotlin Http requests with Fuel

• Fuel Framework https://github.com/kittinunf/Fuel

Page 8: Kotlin for Frontend & Backend Web development

Kotlin Http requests with Fuel

Page 9: Kotlin for Frontend & Backend Web development

Kotlin Http requests with Fuel

Page 10: Kotlin for Frontend & Backend Web development

Kotlin Http requests with Fuel

Page 11: Kotlin for Frontend & Backend Web development

Kotlin Http requests with Fuel

Page 12: Kotlin for Frontend & Backend Web development

Kotlin Http requests with Fuel

Page 13: Kotlin for Frontend & Backend Web development

Kotlin For Server Side

Page 14: Kotlin for Frontend & Backend Web development

Installation Guide

• Jetbrains Intellij for windows https://www.jetbrains.com/idea/download/#section=windows

• Create New Project Using Gradle and choose Kotlin (Java).

• Create Kotlin File – with any name you want

• The Differnece is in the Library that is used – Ktorhttps://github.com/Kotlin/ktor

Page 15: Kotlin for Frontend & Backend Web development

Kotlin for frontend HTTP Requests

• Using the Ktor framework

• https://github.com/Kotlin/ktor

Page 16: Kotlin for Frontend & Backend Web development

Kotlin for frontend HTTP Requests

Page 17: Kotlin for Frontend & Backend Web development

Putting Things Together

Page 18: Kotlin for Frontend & Backend Web development

Useful Links

• https://github.com/KotlinBy/awesome-kotlin

• https://kotlinlang.org/docs/tutorials/httpservlets.html

• https://kotlinlang.org/docs/reference/server-overview.html

• https://kotlin.link/