https://kotlinlang.org logo
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
kobweb
  • f

    Filip Wiesner

    02/27/2023, 6:33 PM
    But to give you some idea about my current hobby project. I have monorepo with backend written in Ktor, Android app, iOS app, one module shared across all platforms and one module shared for frontend. So I hope Kobweb will fill the "web frontend" part nicely.
  • d

    David Herman

    02/27/2023, 6:34 PM
    Yeah, I definitely want to add codelabs to introduce the concepts of Kobweb incrementally.
  • d

    David Herman

    02/27/2023, 6:36 PM
    Kobweb is a small crutch I think for Android devs, thanks to its own Modifier class and a few other classes copied over (kind of) from Jetpack Compose, but ultimately the developer still needs to learn JavaScript and CSS APIs.
  • d

    David Herman

    02/27/2023, 6:37 PM
    Note that the blog article linked to above refers to https://bitspittle.dev/blog/2022/kotlinsite which could be a good skim.
  • f

    Filip Wiesner

    02/27/2023, 6:39 PM
    I've come to terms with using CSS but I hope I won't have to touch JavaScript a lot 😅 Thanks for the articles 👍
  • d

    David Herman

    02/27/2023, 6:40 PM
    Ah, no JS. You are always writing Kotlin. But the Kotlin is often a thin layer over JS code.
  • d

    David Herman

    02/27/2023, 6:41 PM
    (This isn't Kobweb, btw, but Kotlin/JS itself. For example, you read https://developer.mozilla.org/en-US/docs/Web/API/Window/location but use https://kotlinlang.org/api/latest/jvm/stdlib/org.w3c.dom/-window/location.html)
  • f

    Filip Wiesner

    02/27/2023, 6:43 PM
    Good 😄 I have some experience with Kotlin JS (made my own library for Kotlin JVM/JS back in the day) but you scared me with the "developer still needs to learn JavaScript" 😄
  • d

    David Herman

    02/27/2023, 6:44 PM
    Ha, I'll be careful in the future
  • f

    Filip Wiesner

    02/27/2023, 6:44 PM
    Btw is there a way to donate and support the project?
  • d

    David Herman

    02/27/2023, 6:44 PM
    Oh, no need at this point. But thanks for the offer!
  • d

    David Herman

    02/27/2023, 6:45 PM
    I think the best way to support the project would be if people end up using it, creating cool stuff, and sharing what they created
  • d

    David Herman

    02/27/2023, 6:46 PM
    Code contributions would be welcome too, or even just if you see typos or other confusing things in the code, just let me know so I can fix it.
  • f

    Filip Wiesner

    02/27/2023, 6:46 PM
    Feels like a lot of care went into this project and it would be really sad seeing it die in a year or two so when you open some way of donation, be sure to let me know 👍
  • d

    David Herman

    02/27/2023, 6:47 PM
    So for background, I've got enough savings to run for quite a while. My thought has always been I don't want to make money on Kobweb itself, but maybe I build something with Kobweb that makes money.
  • d

    David Herman

    02/27/2023, 6:48 PM
    I'm assuming at some point Kobweb stabilizes a bit and doesn't need as much energy put into it. If that assumption turns out wrong, then I may revisit my original plan 🙂
  • d

    David Herman

    02/27/2023, 6:50 PM
    You're a good person for asking though. I agree that open source needs more of that!
  • f

    Filip Wiesner

    02/27/2023, 6:59 PM
    To be honest, I've never donated to any open source project but Kobweb just amazed me reading through the readme. The fact that you have CLI tool for quickly starting the project, a bunch of demos, gradle plugin and so on... I just felt like this is a passion project worth following
  • d

    David Herman

    02/27/2023, 7:03 PM
    It's definitely a passion project 🙂 and one I plan to use myself. Thanks for the very kind words.
  • d

    David Herman

    02/27/2023, 7:11 PM
    Welcome! I'd love to know the sorts of pain points people are having with Kotlin webdev in general, what kind of projects people are working on / want to work on, what they hope Kobweb might fix, etc.. Just lurking is fine too!
  • f

    Filip Wiesner

    02/27/2023, 7:18 PM
    So I've read the articles and came with questions as promised 😄 You mentioned that you wanted full stack solution but you are focusing on static layouts for now. Maybe this is stupid question but what is the other side of "static site". Server-side rendering? Is that something Kobweb supports? Maybe I need to visit your Readme again 😅
    d
    • 2
    • 72
  • c

    CLOVIS

    02/28/2023, 10:25 AM
    Nice to see you got your channel 🙂
  • d

    David Herman

    02/28/2023, 5:02 PM
    Thanks for being the inspiration to take this step! For those who don't know him, Ivan is working on #decouple , a project you might be interested in. The library is an approach to abstract Compose concepts so you can declare widgets at a common layer in a multiplatform project. FAQ here: https://gitlab.com/opensavvy/decouple/-/blob/main/FAQ.md#how-does-decouple-fit-with-other-compose-based-ui-projects
  • p

    Pablichjenkov

    02/28/2023, 7:31 PM
    I did a quick view over decouple, the API looks good. A bit simpler/cleaner than decompose. Any reason why Gitlab and not GitHub? Never used gitlab before, do they have stars, sponsorship and the kind of social features GitHub has? I might create an account later to be able to star it
    c
    • 2
    • 3
  • s

    sdeleuze

    03/01/2023, 8:34 AM
    @David Herman I would be interested to learn more about static deployment with Kobweb as I could be interested by leveraging a variation of that in Spring for server-side rendering. I have read https://bitspittle.dev/blog/2022/staticdeploy, and tried https://bitspittle.github.io/kobweb-ghp-demo/. What I would like to understand more is how you switch from the static to the dynamic version. Is there a mechanism to hydrate the server-side generated HTML with handlers, etc?
    d
    • 2
    • 10
  • f

    Filip Wiesner

    03/05/2023, 4:44 PM
    Is there a way to combine multiple `ComponentStyle`s into on
    ComponentStyle
    ? And is that even something I want to do? I have
    MaterialShadowStyle
    and now I am creating some specific component that should have this shadow. Is my only option to combine modifiers in the composable?
    d
    • 2
    • 18
  • d

    David Herman

    03/11/2023, 10:01 PM
    Compose 1.3.1 (tied to Kotlin 1.8.10) was released two days ago. Kobweb 0.12.1 has just been published, to support it.
    f
    • 2
    • 4
  • d

    David Herman

    03/24/2023, 11:47 PM
    Kobweb 0.12.3 was published today. Compared to 0.12.1 I announced two weeks ago, this release adds: • radial gradient support via a Kotlin-idiomatic API • various server improvements including better dependency support (dependencies can use reflection / services now) and crash stack reporting • simplified the API around configuring where links open (in place vs. new tab) https://github.com/varabyte/kobweb/releases/tag/v0.12.3
    f
    • 2
    • 4
  • d

    David Herman

    03/26/2023, 10:05 PM
    I am extremely proud to mention that one of Kobweb's users, Stevdza-San (YouTube channnel here), has just released a course on using Compose for Web to develop websites, featuring Kobweb.
    • 1
    • 1
  • c

    Chi-Hsuan Wu

    03/28/2023, 4:00 AM
    Hi, can I use Kobweb in an existing Kotlin multiplatform project?
    d
    • 2
    • 20
Powered by Linen
Title
c

Chi-Hsuan Wu

03/28/2023, 4:00 AM
Hi, can I use Kobweb in an existing Kotlin multiplatform project?
d

David Herman

03/28/2023, 4:01 AM
It depends what you're trying to do.
First, check out: https://github.com/varabyte/kobweb#what-about-compose-for-web-canvas
Basically, you have to think of Compose for Web DOM as a fairly different UI approach. It will be hard to share UI code between C4W DOM and, say, Android and Desktop.
However, if you just want to share business logic between a C4W site and your other projects, then sure, that's fine.
In short Compose for Web DOM is getting to use Kotlin instead of JS/TS Compose for Web Canvas is getting to use Kotlin instead of Dart (i.e. Flutter)
c

Chi-Hsuan Wu

03/28/2023, 4:07 AM
I am currently using Compose DOM to let my existing KMM project support for web. My problem is that I cannot find a way to set up Kobweb without creating a new project.
d

David Herman

03/28/2023, 4:07 AM
You basically need to consider on of your modules is now a Kobweb application module
To do that, you need to do a few things...
1. Set a dependency on my artifact repository location 2. Apply the Kobweb Gradle Application plugin 3. Update your build.gradle.kts script 4. Add a .kobweb/conf.yaml file in your Kobweb application module's folder
The dependency on the artifact repository location can be found in settings.gradle.kts
If I were you, I'd create a new empty module in your application, maybe
site
or whatever, and then create a dummy project on the side, and copy it over.
(Note that the Kobweb Gradle Application plugin is pretty opinionated. It wants to create your index.html and main.kt files for you, and you probably already have one, which is why it's probably good to create a new module)
Once you have the new module building within your project, copy code over incrementally.
I apologize there's not a better way yet. With my limited resources, I still need to focus on supporting new projects, but I hope this will get better someday. I can help you out if you are willing to try!
c

Chi-Hsuan Wu

03/28/2023, 4:13 AM
Thanks, I'll give it a try
d

David Herman

03/28/2023, 4:13 AM
You may want to play with a dummy Kobweb project first to make sure you are happy with what Kobweb does for you.
Good luck!
c

Chi-Hsuan Wu

03/28/2023, 7:55 AM
It works! Thanks!
d

David Herman

03/28/2023, 8:17 PM
Wow, great job!!
I'm impressed you navigated that on your own 👍 Sorry if it was frustrating.
View count: 4