SlideShare a Scribd company logo
How PHP developer use
Kotlin
1
Autoline.ua
PHP/ Kotlin
Full stack -> backend
Love Automation
2
How PHP developer
use Kotlin
@funivan
Agenda
How I get there
Cool features
Same code in .php & .kt
Result
3
How PHP developer
use Kotlin
Php ~> Java
PhpStorm Plugin
● Internal
● Completion
● GoTo
4
2014
LoloGA
● AI
● Genetic Algorithm
5github.com/funivan/lologa
2017
Php ~> Java
Automatically convert
.java to .kt
6
2017
Java ~> Kotlin
Kotlin +1
Type inference
Lambda
Default and named
arguments
Easy to build DSL
7
Kotlin +1
Type inference
Lambda
Default and named
arguments
Easy to build DSL
8
Kotlin +1
Type inference
Lambda
Default and named
arguments
Easy to build DSL
9
Kotlin +1
Type inference
Lambda
Default and named
arguments
Easy to build DSL
10
Kotlin +1
Type inference
Lambda
Default and named
arguments
Easy to build DSL
11
12
Rule 0: Small interfaces
13
Rule 0: Small interfaces
14
Rule 0: Small interfaces
15
interface ClientActionInterface {
public function execute(Client $client) : bool;
}
class LoggableClientAction {
// string $message, Logger $logger, Action $origin
public function execute(Client $target){
$this->logger->log($message)
$this->origin->execute($target);
}
}
Rule 1: Decorator one love
16
Rule 1: Decorator one love
17
class Complicated8To8Board(gameplay: GameplayInterface)
: Board(gameplay, 8, 8,
Cycled<Color>(
Shuffled<Color>(
ListOf<Color>(
GREEN, RED, BLUE, YELLOW, VIOLET
)
)
),
Tiles().with(Tile(BLUE, Position(5, 1))).with(Tile(BLUE, Position(5, 1)))
.with(Tile(BLUE, Position(5, 2))).with(Tile(BLUE, Position(6, 2)))
.with(Tile(BLUE, Position(5, 3)))
)
Rule 2: Object thinking
18
$clients = new FilteredClientsList(
new AllOfClientConstraint(
new ManagerNotesClientConstraint(
new IntEqual(0), new CurrentMonthConstraint(), ['Pyment']
),
new ManagerStatusClientConstraint('Online'),
),
new ActiveClientsList()
);
Rule 2: Object thinking
19
// Possible moves
override fun perform(tiles: TilesInterface): TilesInterface {
var result: TilesInterface = Tiles()
for (tile in tiles.all()) {
val bottom = MaxBottom(tile).find(tiles)
if (!result.has(bottom.position())) {
val connected = AllConnectedFinder(bottom).perform(tiles).size()
if (connected >= this.num) {
result = result.with(bottom)
}
}
}
return result
Rule 3: Small Methods
Effect
20
1. Plugin - increase productivity
2. New languages? Easy!
3. Interesting work
Effect
21
1. Plugin - increase productivity
2. New languages? Easy!
3. Interesting work
Effect
22
1. Plugin - increase productivity
2. New languages? Easy!
3. Interesting work
Thanks
PhpClean
https://github.com/funivan/PhpClean
Kotlin spec
https://kotlinlang.org/
Kotlin book
Kotlin in action
23
@funivan

More Related Content

PDF
Dev + DevOps для PHP розробника
phpfriendsclub
 
PDF
Understanding how concurrency work in os
GenchiLu1
 
PDF
Extensible web #html5j
Jxck Jxck
 
PDF
ORTC SVC SimulCast
Jxck Jxck
 
PDF
Extensible web
Jxck Jxck
 
PDF
DBI for Parrot and Perl 6 Lightning Talk 2007
Tim Bunce
 
PDF
Run Go applications on Pico using TinyGo
Yu-Shuan Hsieh
 
PDF
Building Command Line Tools with Golang
Takaaki Mizuno
 
Dev + DevOps для PHP розробника
phpfriendsclub
 
Understanding how concurrency work in os
GenchiLu1
 
Extensible web #html5j
Jxck Jxck
 
ORTC SVC SimulCast
Jxck Jxck
 
Extensible web
Jxck Jxck
 
DBI for Parrot and Perl 6 Lightning Talk 2007
Tim Bunce
 
Run Go applications on Pico using TinyGo
Yu-Shuan Hsieh
 
Building Command Line Tools with Golang
Takaaki Mizuno
 

What's hot (20)

PPTX
Extending GDB with Python
Lisa Roach
 
PDF
Let your REST API talk
hrabur
 
PDF
202107 - Orion introduction - COSCUP
Ronald Hsu
 
PDF
マイクロサービスバックエンドAPIのためのRESTとgRPC
disc99_
 
PDF
Http2 on go1.6rc2
Jxck Jxck
 
PDF
Python Static Site Generator in Pelican
Gaurav Sehrawat
 
PDF
Crystal
Kamil Lelonek
 
PDF
Intro to Crystal Programming Language
Adler Hsieh
 
PDF
Flutter beers and pizza
Jon Durán
 
PDF
Golang from Scala developer’s perspective
Sveta Bozhko
 
PPTX
Wonders of Golang
Kartik Sura
 
PDF
A brief intro to RubyMotion
Kamil Lelonek
 
PDF
Groovy Finesse
mzgubin
 
PDF
Scala vs ruby
Kamil Lelonek
 
PPTX
Golang - Overview of Go (golang) Language
Aniruddha Chakrabarti
 
PDF
welcome to gopherlabs - why go (golang)?
sangam biradar
 
PPTX
Golang
Michael Blake
 
PDF
Creating an api from design to security.
Roan Brasil Monteiro
 
PDF
Opensource pnp container based waf
Varun konadagadapa
 
PDF
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
Nexus FrontierTech
 
Extending GDB with Python
Lisa Roach
 
Let your REST API talk
hrabur
 
202107 - Orion introduction - COSCUP
Ronald Hsu
 
マイクロサービスバックエンドAPIのためのRESTとgRPC
disc99_
 
Http2 on go1.6rc2
Jxck Jxck
 
Python Static Site Generator in Pelican
Gaurav Sehrawat
 
Crystal
Kamil Lelonek
 
Intro to Crystal Programming Language
Adler Hsieh
 
Flutter beers and pizza
Jon Durán
 
Golang from Scala developer’s perspective
Sveta Bozhko
 
Wonders of Golang
Kartik Sura
 
A brief intro to RubyMotion
Kamil Lelonek
 
Groovy Finesse
mzgubin
 
Scala vs ruby
Kamil Lelonek
 
Golang - Overview of Go (golang) Language
Aniruddha Chakrabarti
 
welcome to gopherlabs - why go (golang)?
sangam biradar
 
Creating an api from design to security.
Roan Brasil Monteiro
 
Opensource pnp container based waf
Varun konadagadapa
 
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
Nexus FrontierTech
 
Ad

Similar to Як РНР розробник пише код на Kotlin (20)

PPTX
PHP Variables & Comments 01
mohamedsaad24
 
PPTX
DSC ASEB Android Study Jams 2020: New to Programming 3
Aravind V. Nair
 
PDF
PHP Toolkit from Zend and IBM: Open Source on IBM i
Alan Seiden
 
PPTX
Developing Rich Internet Applications with Perl and JavaScript
nohuhu
 
PPTX
Android Study Jam
DSCMESCOE
 
ODP
Improving code quality using CI
Martin de Keijzer
 
PPTX
What’s new in CSharp6
Duduman Bogdan Vlad
 
PDF
2.3 (Architecture) Moving to Managed Code
Micro Focus
 
PPTX
Session-1.pptx
RamshaAshraf12
 
PPTX
C# 6
Pascal Laurin
 
PDF
Lately in php - 2019 May 4
Eric Poe
 
PPTX
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
goccy
 
PDF
Tutorial Módulo 1 de Introdução com Flask
Vinícius Marques
 
PDF
Modern Web Development with Perl
Dave Cross
 
PDF
Spring Boot with Kotlin, Kofu and Coroutines
VMware Tanzu
 
PDF
Let's Create a GitHub Copilot Extension! - Nick Taylor, Pomerium
All Things Open
 
PDF
PHP Batch Jobs on IBM i
Alan Seiden
 
PPTX
Say Goodbye To Java: Getting Started With Kotlin For Android Development
Adam Magaña
 
PDF
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays
 
PHP Variables & Comments 01
mohamedsaad24
 
DSC ASEB Android Study Jams 2020: New to Programming 3
Aravind V. Nair
 
PHP Toolkit from Zend and IBM: Open Source on IBM i
Alan Seiden
 
Developing Rich Internet Applications with Perl and JavaScript
nohuhu
 
Android Study Jam
DSCMESCOE
 
Improving code quality using CI
Martin de Keijzer
 
What’s new in CSharp6
Duduman Bogdan Vlad
 
2.3 (Architecture) Moving to Managed Code
Micro Focus
 
Session-1.pptx
RamshaAshraf12
 
Lately in php - 2019 May 4
Eric Poe
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
goccy
 
Tutorial Módulo 1 de Introdução com Flask
Vinícius Marques
 
Modern Web Development with Perl
Dave Cross
 
Spring Boot with Kotlin, Kofu and Coroutines
VMware Tanzu
 
Let's Create a GitHub Copilot Extension! - Nick Taylor, Pomerium
All Things Open
 
PHP Batch Jobs on IBM i
Alan Seiden
 
Say Goodbye To Java: Getting Started With Kotlin For Android Development
Adam Magaña
 
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays
 
Ad

Recently uploaded (20)

PDF
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PDF
Latest Scam Shocking the USA in 2025.pdf
onlinescamreport4
 
PPTX
谢尔丹学院毕业证购买|Sheridan文凭不见了怎么办谢尔丹学院成绩单
mookxk3
 
PPTX
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PDF
LB# 820-1889_051-7370_C000.schematic.pdf
matheusalbuquerqueco3
 
PDF
KIPER4D situs Exclusive Game dari server Star Gaming Asia
hokimamad0
 
PPTX
B2B_Ecommerce_Internship_Simranpreet.pptx
LipakshiJindal
 
PPTX
dns domain name system history work.pptx
MUHAMMADKAVISHSHABAN
 
PDF
LOGENVIDAD DANNYFGRETRRTTRRRTRRRRRRRRR.pdf
juan456ytpro
 
PDF
PDF document: World Game (s) Great Redesign.pdf
Steven McGee
 
PPTX
Microsoft PowerPoint Student PPT slides.pptx
Garleys Putin
 
PPTX
Crypto Recovery California Services.pptx
lionsgate network
 
PPT
Transformaciones de las funciones elementales.ppt
rirosel211
 
PDF
BGP Security Best Practices that Matter, presented at PHNOG 2025
APNIC
 
PPTX
Google SGE SEO: 5 Critical Changes That Could Wreck Your Rankings in 2025
Reversed Out Creative
 
PDF
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
PPTX
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
PPTX
Black Yellow Modern Minimalist Elegant Presentation.pptx
nothisispatrickduhh
 
PPT
Introduction to dns domain name syst.ppt
MUHAMMADKAVISHSHABAN
 
PDF
Slides: PDF Eco Economic Epochs for World Game (s) pdf
Steven McGee
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
Latest Scam Shocking the USA in 2025.pdf
onlinescamreport4
 
谢尔丹学院毕业证购买|Sheridan文凭不见了怎么办谢尔丹学院成绩单
mookxk3
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
LB# 820-1889_051-7370_C000.schematic.pdf
matheusalbuquerqueco3
 
KIPER4D situs Exclusive Game dari server Star Gaming Asia
hokimamad0
 
B2B_Ecommerce_Internship_Simranpreet.pptx
LipakshiJindal
 
dns domain name system history work.pptx
MUHAMMADKAVISHSHABAN
 
LOGENVIDAD DANNYFGRETRRTTRRRTRRRRRRRRR.pdf
juan456ytpro
 
PDF document: World Game (s) Great Redesign.pdf
Steven McGee
 
Microsoft PowerPoint Student PPT slides.pptx
Garleys Putin
 
Crypto Recovery California Services.pptx
lionsgate network
 
Transformaciones de las funciones elementales.ppt
rirosel211
 
BGP Security Best Practices that Matter, presented at PHNOG 2025
APNIC
 
Google SGE SEO: 5 Critical Changes That Could Wreck Your Rankings in 2025
Reversed Out Creative
 
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
Black Yellow Modern Minimalist Elegant Presentation.pptx
nothisispatrickduhh
 
Introduction to dns domain name syst.ppt
MUHAMMADKAVISHSHABAN
 
Slides: PDF Eco Economic Epochs for World Game (s) pdf
Steven McGee
 

Як РНР розробник пише код на Kotlin