https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
server
  • o

    orangy

    06/06/2018, 11:03 AM
    Kotlin Actions for OpenWhisk https://github.com/ibm-functions/runtime-kotlin
    n
    k
    +1
    11 replies · 4 participants
  • n

    noncom

    06/06/2018, 2:58 PM
    as I understand, the DSL only works when it is used to generate a HTML page starting with
    <html>
    g
    1 reply · 2 participants
  • o

    orangy

    06/06/2018, 9:04 PM
    TechEmpower Benchmarks Round 16 is out https://www.techempower.com/blog/2018/06/06/framework-benchmarks-round-16/
    n
    d
    4 replies · 3 participants
  • s

    sdeleuze

    06/08/2018, 1:08 PM
    Hey, I have a surprise for you today 😉 https://twitter.com/sdeleuze/status/1005072964822487040
    😮 4
    🍻 1
    👍 14
    🥓 1
    p
    k
    +1
    7 replies · 4 participants
  • o

    orangy

    06/08/2018, 8:55 PM
    Now, would you say, @sdeleuze, that Spring Fu is inspired by #ktor?
    😂 2
    n
    n
    +1
    18 replies · 4 participants
  • g

    gaetan

    06/08/2018, 10:14 PM
    For me the 2 approach are quite different. For what I understand spring-fu is more a DSL using the builder pattern to simplify spring configuration and get rid of annotations. In the case of ktor, the lambda are executed in the request pipeline. It’s more than just configuration.
    o
    n
    2 replies · 3 participants
  • n

    napperley

    06/10/2018, 6:38 AM
    The Fn Project (a open source Serverless platform) has recently added Kotlin support:

    https://youtu.be/rVcT_N8w4II?t=1903▾

    n
    7 replies · 2 participants
  • h

    Hamza

    06/11/2018, 4:13 AM
    hey guys, how can i make a GET endpoint for something like
    /book/1
    or
    /book/2
    , or
    /book/N
    for any N number? I am using Javalin
    d
    3 replies · 2 participants
  • g

    gregopet

    06/11/2018, 7:34 AM
    Unfortunately it doesn't support Kotlin directly, but with what you usually do in templates it mostly means calling
    .getProperty()
    instead of
    .property
    which I can totally live with
    h
    2 replies · 2 participants
  • h

    Hamza

    06/11/2018, 8:53 AM
    is there a function which can be called on shutdown? To represent when the app is closing?
    h
    d
    5 replies · 3 participants
  • m

    mp

    06/12/2018, 1:07 AM
    There probably aren’t too many kotlin + spring boot users out there, so you may well be in uncharted waters.
    g
    36 replies · 2 participants
  • a

    amanda.hinchman-dominguez

    06/12/2018, 1:53 AM
    @dave08 I really like your idea of testing for behavior, not frameworks. I will definitely need to take a step back tonight on testing so I can think of a more objective way of testing APIs without stumbling over ridiculous issues like these
    d
    b
    5 replies · 3 participants
  • p

    poohbar

    06/12/2018, 2:43 PM
    Spring Boot is now reactive too with webflux or Spring Fu
    n
    s
    +2
    10 replies · 5 participants
  • v

    vincent.brule

    06/13/2018, 12:23 PM
    Hello. I don’t know if I’m in the good channel. I would know if anyone can help me for Ktor unit tests using Hoverfly ? Thanks 🙂
    o
    2 replies · 2 participants
  • a

    amanda.hinchman-dominguez

    06/15/2018, 4:13 PM
    @Kenneth Spring boot is definitely overkill, and I've personally found extreme blocks for the simplest versions for things like authentication security, testing via Mockito, deploying with Docker etc. Not saying it's impossible, but I should have to struggle for 3 hours trying to make it work together per issue
    k
    a
    +5
    24 replies · 8 participants
  • b

    brabo-hi

    06/15/2018, 10:19 PM
    Hi guys i have a question : why using vertx ?
    g
    n
    +1
    8 replies · 4 participants
  • p

    poohbar

    06/17/2018, 11:42 PM
    I don't think Spring Boot is overkill for anything really. It has been designed for microservices so it's meant to run tiny services with just a few classes. Of course I am not saying you have to use Spring Boot.
    n
    1 reply · 2 participants
  • a

    amanda.hinchman-dominguez

    06/18/2018, 12:18 AM
    @poohbar I finally got time tonight have you worked with Spring Boot and Kotlin by any chance? I'm pretty sure the issues I am having are Kotlin-related issues
    n
    1 reply · 2 participants
  • p

    poohbar

    06/18/2018, 12:21 PM
    Of course if you never needed the stuff in Spring Boot you are better off with a lightweight framework. The question is what do you do when you need the stuff. And Spring Boot has answer for pretty much any server-side need. I really like how autoconfiguration works for example.
    ☝️ 2
    👍 4
    n
    2 replies · 2 participants
  • a

    amanda.hinchman-dominguez

    06/19/2018, 2:41 AM
    I'm cutting out docker for the time being just to have one variable at a time solving the deployment issue. It works fine on localhost, but seems to be a different story on heroku for spring and kotlin
    g
    d
    6 replies · 3 participants
  • a

    amanda.hinchman-dominguez

    06/19/2018, 11:40 AM
    @pike KTOR is probably recommended - I did not start my project using it though, maybe later on I'll transfer it over
    d
    g
    +3
    23 replies · 6 participants
  • a

    Albert

    06/19/2018, 1:55 PM
    Anyone here got experience with a Kotlin parser, similar what JavaParser does for Java?
    g
    2 replies · 2 participants
  • h

    Hamza

    06/20/2018, 4:12 AM
    hey everyone 👋. Does anyone know a way (using kotlinx.html) to make a method that returns a html element? I can’t just do
    fun DIV.foo() = form {}
    as it returns Unit
    s
    o
    10 replies · 3 participants
  • b

    Bart.K

    06/20/2018, 11:11 AM
    How does .count() operation work on Sequences? Does it aggregate all elements going through the sequence and then counts them all at the end very much like .size() in Collections or is it just a counter that increments with each element? I have a potentially infinite/very long sequence and started wondering if this could lead to memory issues at some point down the line.
    k
    2 replies · 2 participants
  • s

    sdeleuze

    06/20/2018, 3:33 PM
    https://twitter.com/sdeleuze/status/1009458696408256513
    👍 1
    ⏩ 1
    d
    1 reply · 2 participants
  • h

    Hamza

    06/21/2018, 6:48 AM
    not sure how to implement it
    g
    g
    +3
    66 replies · 6 participants
  • j

    jw

    06/22/2018, 11:56 PM
    Retrofit would be a good level of abstraction
    o
    2 replies · 2 participants
  • j

    jw

    06/22/2018, 11:57 PM
    In my common modules I have a Retrofit interface which I manually implement for JS and then use Retrofit on JVM
    n
    2 replies · 2 participants
  • j

    jdemeulenaere

    06/23/2018, 10:35 AM
    @Nikky I started to work on a project called kRPC (similar to gRPC, but fully kotlin) that would scan kotlin interfaces and @Serializable data classes (instead of protobuf messages and services definitions) and generate multipaltform implementations of those interfaces using HTTP RPC calls behind the scene. Unfortunately I stopped working on that given that it's quite difficult to generate anything from common Kotlin code. AFAIK the only way to generate code is to either use java annotation processing (but then it requires your project to be a Kotlin/JVM project) or create a compiler plugin which is not a trivial task and for which the API is not documented or stable. I'm secretly hoping that JB will release something that could help us do that kind of metaprogramming soon 🙂
    o
    1 reply · 2 participants
  • h

    Hamza

    06/27/2018, 3:43 AM
    any good resources on using mvc format with kotlin? My current code style is ummm… ^_^
    g
    a
    +3
    14 replies · 6 participants
Powered by Linen
Title
h

Hamza

06/27/2018, 3:43 AM
any good resources on using mvc format with kotlin? My current code style is ummm… ^_^
g

gildor

06/27/2018, 3:56 AM
mvc format?
h

Hamza

06/27/2018, 3:56 AM
yeah. someone told me about that
g

gildor

06/27/2018, 3:58 AM
i know what is MVC but what do you mean “format” or “mvc format”. Also you mentioned code style and I’m confused %)
h

Hamza

06/27/2018, 3:59 AM
oh, i guess just MVC then. not sure how it would work with Kotlin though. most of it is on asp.net whenever i try to look
a

amanda.hinchman-dominguez

06/27/2018, 4:04 AM
@Hamza it depends on the framework you use, of course. MVC is simply one of many architectural solutions based on a recommended design by many. For example, #tornadofx allows you to use any MV* you wish and has good documentation. In terms of MVC itself, I wouldn't tie that with Kotlin. I would highly recommend reading any explanation of MVC
h

Hamza

06/27/2018, 4:05 AM
oh, okay. any ideas what code style i should use with something like ktor or javalin? Where you get GET requests and POST requests with a context.
a

amanda.hinchman-dominguez

06/27/2018, 4:09 AM
ktor/javalin isn't necessarily a coding style, it's more of different approaches to server-side solutions with its own focuses on aspects of pipelining. ktor looks really cool and to me, reminds me a lot of Go with routing. You create your own GET and POST requests.
t

tipsy

06/27/2018, 7:29 AM
@Hamza i know you don't like hearing it, but life is easier if you use javascript and MVVM. use vue/react for your frontend, then javalin/ktor for your backend. make all communication JSON.
h

Hamza

06/27/2018, 7:58 AM
😞. okay. i’ll check it out
d

david-wg2

06/27/2018, 8:27 AM
I recommend vue, it's a lot easier to get started with
j

Juan Guillermo Gomez - GDG Cali - GDE Firebase

06/27/2018, 6:47 PM
I did an example with clean architecture for server side and kotlin
https://github.com/jggomez/KotlinAPI_MAVEN
MVC is a pattern, Clean architecture is a architecture style
https://speakerdeck.com/jggomez/kotlin-for-server-side
View count: 5