https://kotlinlang.org logo
m

Marc Knaup

07/22/2020, 4:54 PM
What Kotlin technologies and frameworks is JetBrains Space based on? Is it really already possible to build a large web project in Kotlin without going nuts? 😁 (The more I use JS/TS & React/Vue/Angular the more I’m going crazy…)
s

streetsofboston

07/22/2020, 5:02 PM
Looks like it uses Kotlin Multi Platform https://link.medium.com/LNeV0JFIk8
👍 1
m

Marc Knaup

07/22/2020, 5:04 PM
Yes, but even with MP it still needs a proper web framework for example.
You don’t want to manually put HTML together for example 😁 Something like React, but made for Kotlin.
b

Big Chungus

07/22/2020, 5:27 PM
Kotlin has react dsl provided and maintained by jetbrains (which in my opinion is much better than jsx)
For state management there's js redux kotlin bindings as well or reduxkotlin lib which us a full redux port to kotlin #redux
I'm also working on full kotlin vdom lib for wasm and js #kvdom
r

Robert Jaros

07/22/2020, 5:40 PM
m

Marc Knaup

07/22/2020, 5:41 PM
Yeah, looks like they’re using React for Spaces! 🙂

https://www.youtube.com/watch?v=JnmHqKLgYY4&list=PLQ176FUIyIUY6SKGl3Cj9yeYibBuRr3Hl

b

Big Chungus

07/22/2020, 5:41 PM
#kvision for questions :)
m

Marc Knaup

07/22/2020, 5:46 PM
Do I understand that right that KVision and KVDOM basically try to recreate React’s approach from scratch, but 100% Kotlin?
b

Big Chungus

07/22/2020, 5:46 PM
Not quite
m

Marc Knaup

07/22/2020, 5:47 PM
hmm, KVision seems to be imperative. Aren’t we all moving past that? 😅
b

Big Chungus

07/22/2020, 5:47 PM
Kvision is object oriented high level web framework, whereas kvdom is essentially a lift and shift of snabbdom - low level vdom implementation
In theory kvision could eventually replace snabbdom with kvdom for vdom rendering and diffing
Anyways, if you want something stable, go with kotlin react as that fully integrates with js react ecosystem
r

Robert Jaros

07/22/2020, 5:49 PM
KVision is imperative by design, but also supports DSL and declarative UI building with observable data models and unidirectional data flow
b

Big Chungus

07/22/2020, 5:49 PM
If you're adventurous, do try out kvision. It's a blast to work with!
m

Marc Knaup

07/22/2020, 5:50 PM
Thanks for all the info. So much to learn! Anything that helps getting rid of JS and TS is worth working on though 😁
💯 1
👍 1
r

Robert Jaros

07/22/2020, 5:50 PM
KVision is definitely stable as well :-)
b

Big Chungus

07/22/2020, 5:51 PM
In short, here's how kotlin libs maps to js alternatives from use-case perspective: * React = kvision * Snabbdom = kvdom
r

Robert Jaros

07/22/2020, 5:51 PM
KVision large webapps are running smoothly in production for some time.
m

Marc Knaup

07/22/2020, 5:52 PM
Thanks 🙂 Is there any article that compares KVision and (Kotlin-)React?
r

Robert Jaros

07/22/2020, 5:52 PM
I don't think so
b

Big Chungus

07/22/2020, 5:52 PM
My bad, misused the word stable there. I meant to say that kotlin react is the way to go if you want a stable and tested ecosystem since it can tap into whole react.js world
@Robert Jaros I think kvision and react comparison article on medium would be a very hot topic. Please give it a go when you have some time to spare
m

Marc Knaup

07/22/2020, 5:53 PM
I also tend towards kotlin-react for the start since anything that has JetBrains behind that has a much higher chance of getting pushed forward :)
They must have a lot of Kotlin developers there! Just watching that video was like “it sounds like a project with several dozen of developers involved” 😮
r

Robert Jaros

07/22/2020, 5:56 PM
It's hard to compete with a product supported by Kotlin creators 😉 But in my humble opinion if you just want to have many ready to use components, KVision is way easier to work with.
b

Big Chungus

07/22/2020, 5:57 PM
Plus kvision is full on kotlin, whereas kotlin-react is just kotlin bindings and depends on react.js under the hood
r

Robert Jaros

07/22/2020, 5:58 PM
@Big Chungus I probably wouldn't be able to do fair comparision, because I have never used React with plain JS 🙂
😢 1
m

Marc Knaup

07/22/2020, 5:58 PM
Yeah, I’ll probably have to spend a lot of time digging into both to really understand the pros and cons and how day-to-day development feels like.
b

Big Chungus

07/22/2020, 5:59 PM
If you're pushing kotlin js to a company, you'll definitely have an easier sell with kotlin react.
r

Robert Jaros

07/22/2020, 5:59 PM
You need to know React very well to work with kotlin-react.
m

Marc Knaup

07/22/2020, 6:00 PM
No need to sell as I make the decisions. But I’ve got burned a lot by Kotlin Multiplatform once (that was mobile though), so I’m way more careful now 🙂
I only know Vue.js and Angular a lot by now and little React. I hope that the knowledge can be easily transferred though 😉
b

Big Chungus

07/22/2020, 6:01 PM
I see what you mean. MPP is still experimental after all. I'd suggest trying to write simple webapps (todo list maybe?) on both and see what issues you face.
r

Robert Jaros

07/22/2020, 6:01 PM
But you can easily work with KVision, if you know any typical UI library from non-web world (e.g. Swing, QT, Winforms)
b

Big Chungus

07/22/2020, 6:02 PM
Bonus points for kvision, though, since it being mostly kotlin potentially will allow it to support webassembly once it's reworked by jetbrains
👍 1
m

Marc Knaup

07/22/2020, 6:02 PM
What’s your experience with debugging when using either kotlin-react or KVision? That was often a big problem with Kotlin MPP.
b

Big Chungus

07/22/2020, 6:03 PM
Never had any. It's plain js source map debugging afterall
m

Marc Knaup

07/22/2020, 6:03 PM
Breakpoints, variable inspection etc all working?
In mobile MPP I had to resort to
println()
😵
We need a social network for Kotlin where every developer can show their preferred stack and improve it over time 😄
b

Big Chungus

07/22/2020, 6:05 PM
It might take some time getting used to filtering out kotlin properties noise attached to your object by the compiler, but basic stuff like breakpoints, scopes, variable inspection works the same as for js
👍 1
m

Marc Knaup

07/22/2020, 6:05 PM
noise is fine
b

Big Chungus

07/22/2020, 6:06 PM
For your mpp issue I'm guessing you didn't have a good time on ios side of things, since android is a first-class citizen on kotlin
m

Marc Knaup

07/22/2020, 6:06 PM
Yeah, Android is a lot easier. Although I kept switching between IDEA and Android Studio…
b

Big Chungus

07/22/2020, 6:07 PM
Ah, i hate that you cannot use idea for Android anymore... Drives me nuts when working on MPP
m

Marc Knaup

07/22/2020, 6:07 PM
Basically IDEA, Android Studio and AppCode in one IDE would be amazing 🙂
b

Big Chungus

07/22/2020, 6:08 PM
But since android studio is idea based I'd expect it to support android and common source sets in the near future
AppCode is OS locked, so i wouldn't expect being able to get rid of it anytime soon...
m

Marc Knaup

07/22/2020, 6:09 PM
It could still be an OS-specific plugin for IDEA instead of its own IDE.
Like I use PHP without PhpStorm
b

Big Chungus

07/22/2020, 6:10 PM
Best case we'll get ios idea supporting android and iOS, but still requiring both android studio and app code installed on the machine
m

Marc Knaup

07/22/2020, 6:12 PM
Yes, or something like that.
I’ll dabble with kotlin-react and kvision at some point as a basis for a CRM I’m working on and figure out if it’s a good option. Back-end is all Kotlin & GraphQL but front-end is still a Vue.js mess.
Another problem is finding other developers who can actually work with that. It’s much easier to find a React developer than a kotlin-react or KVision developer.
Anyone interested in GraphQL btw? I’m still looking for some help with my GraphQL library 😛
b

Big Chungus

07/22/2020, 6:13 PM
There's also #vuejs for kotlin :D
m

Marc Knaup

07/22/2020, 6:14 PM
I guess that makes finding a developer for that even more difficult 😛
b

Big Chungus

07/22/2020, 6:14 PM
Never worked with graphql myself, sadly /disappointed:
m

Marc Knaup

07/22/2020, 6:14 PM
I disliked it at first. After using it for a while, I do now dislike normal HTTP REST 😁
b

Big Chungus

07/22/2020, 6:15 PM
Finding a non-android kotlin developer is difficult in general 😀
m

Marc Knaup

07/22/2020, 6:15 PM
true
Maybe they all work for JetBrains by now 🤔
b

Big Chungus

07/22/2020, 6:15 PM
Yeah, I keep hearing great things about graphql, just didn't have the opportunity to try it out myself yet
Well kotlin is still young, especially MPP
m

Marc Knaup

07/22/2020, 6:16 PM
I’m surprised that the Gradle plugin says that Kotlin MPP plugin will be mandatory with Kotlin 1.4
Given that it’s still so buggy
b

Big Chungus

07/22/2020, 6:16 PM
And android announcing it as main language grabbed a bigger part of kotlin developers from the pool
Same thing happened when they removed kotlin native plugin while mpp was even buggier
r

Robert Jaros

07/22/2020, 6:17 PM
There is 31K kotlin developers on #general channel and only 28K on #android 😉 That's 3K non-android kotlin developers to choose from 😉
m

Marc Knaup

07/22/2020, 6:18 PM
I’m also in #android but rarely work on Android apps 😛
b

Big Chungus

07/22/2020, 6:18 PM
But that allowed them to develop native much faster as there was just one less plugin to support
👍 1
I personally would prefer them dropping all gradle plugins and focusing on finally fleshing out MPP plugin
m

Marc Knaup

07/22/2020, 6:20 PM
I’d also be fine with that if it doesn’t break existing projects
b

Big Chungus

07/22/2020, 6:20 PM
Since if you can use mpp plugin for mpp project you automatically can use that for non mpp
m

Marc Knaup

07/22/2020, 6:20 PM
Like almost everything that uses composite builds
They should make Spaces open source (or at least share the source without allowing its use) so that we can use it as a reference for how to implement such a complex product 🤔
b

Big Chungus

07/22/2020, 6:24 PM
m

Marc Knaup

07/22/2020, 6:25 PM
Nice, thanks
btw, any specific reason you use GitLab instead of GitHub?
b

Big Chungus

07/22/2020, 6:25 PM
Take them with a big grain of salt, though, as I've written them both nearly a year ago
Gives much much more free stuff for open source than github
And has a lot of other neat features other than being just a repo
m

Marc Knaup

07/22/2020, 6:26 PM
What features for example?
b

Big Chungus

07/22/2020, 6:27 PM
The only downside is that github is pretty much a norm for open source these days...
r

Robert Jaros

07/22/2020, 6:28 PM
using gitlab instead of github is just like using kvision instead of kotlin-react 😉
😄 2
b

Big Chungus

07/22/2020, 6:28 PM
Ci cd, container registries, kubernetes integration, environment monitoring, dependency and security scanning, auto devops just to name a few I'm using myself, but there's a lot more
Good point, Robert 😀 sneaky ad there
m

Marc Knaup

07/22/2020, 6:29 PM
Monitoring sounds good 🙂 Kubernetes I’ve never used or needed. CI/CD, registries, security scanning is available on GitHub too.
b

Big Chungus

07/22/2020, 6:29 PM
Also i love gitlab's web IDE. Very useful when you're on the go without work laptop
👍 1
Yes, github has most of gitlab features too, but I'm not a fan the way github implemented some of them. Ci cd, for example is not managed by github, but rather delegated to external service like circle ci
m

Marc Knaup

07/22/2020, 6:31 PM
They do have their own by now (GitHub Actions)
b

Big Chungus

07/22/2020, 6:32 PM
Just different approaches i guess. Github aims to be hackable, wheres gitlab provides in-house solutions
m

Marc Knaup

07/22/2020, 6:32 PM
So many choices these days 😵
b

Big Chungus

07/22/2020, 6:33 PM
Just give gitlab a go and see how you like it. I don't think theres a hard deciding factor to pick one over the other.
m

Marc Knaup

07/22/2020, 6:34 PM
Yeah, if there’s not at least one big convincing reason then I’ll stick with what everyone is using
b

Big Chungus

07/22/2020, 6:35 PM
You might find one that convinces you specifically. Just live with it for a month for two. Also it allows you to mirror githib repos, so you can try it without any impact on your flow
👍 1
For me, I just found gitlab much easier to manage and work with
2 Views