One other question I have. We are building out a document management solution at my company and I have a few options to consider in terms of tools. On the frontend it is between Typescript/KotlinJs with React and on the backend Java/Kotlin with Spring. I know all the benefits of Kotlin cross-platform so that is a great selling point. But what I'm not sure about is the future of KotlinJs. If we start this project using React and KotlinJs, then the new backend compiler for KotlinJs is completed in a year or so (just guessing on the timeline), will the interop between KotlinJs and Javascript be so improved that the React wrapper is no longer needed and we would need to refactor the whole app when doing an upgrade? More specifically, what I'm unsure about is what effect the new backend compiler will have on KotlinJs, and if huge refactoring is going to be required if we use any current wrappers.
r
Roman Artemev [JB]
10/11/2019, 3:02 PM
Hi Graham,
Generally we try to keep all correct Kotlin/JS working with new compiler, and for sure any external declaration (e.g. React wrapper) should be working as well. So your migration to new compiler expected to be as much easy as it could.
The kind of code which potentially could require some refactoring is
js("...")
expression but also in case of complex cases.
➕ 1
g
gbaldeck
10/11/2019, 3:25 PM
Sure, during upgrades some refactoring is expected. Thanks for the reply.
s
Svyatoslav Kuzmich [JB]
10/11/2019, 3:46 PM
Improvements in interop automation tools like dukat are not really tied to release of the new compiler backend. Thus, some of the wrappers might not be needed in the future, regardles of moving to a new compiler. But they will continue to work for the most part.
g
gbaldeck
10/11/2019, 8:50 PM
Ok, not needing wrappers in the future is the best way to go regardless of what upgrade paths would look like. Definitely excited about that when it lands. What the leadership at my company is worried about is having a situation where the upgrade is as large as changing a whole framework. For instance, moving from Angular to React. We have a situation like that going on right now because of a vendor and no one is happy. It sounds like it wouldn't be nearly as bad as that with KotlinJs, even though it would require some refactoring, which of course is to be expected.