UI component library or front end framework for SPA development


#1

I have same question about full stack web application development using kotlin.

Vue.js/Node.js (Express.js) is current development environment. I hate JavaScript, but GWT and Flex given to apache but lost the charm… Your front end development options are limited to JavaScript frameworks for rich single page application (hate angular 4 & React.js)

If I am not wrong kotlin got no front end UI library, e.g. primeNG for angular 4 & element.io for vue.js.

Right now, you have to use other JavaScript frameworks for front end and kotlin serving at REST API. Please correct me if I am wrong and good front end solution is available.

I am aware of JSF option available with kotlin but primeFace or Vaadin (GWT type) are only options with rich UI components (need good datatable grid & upload file component for my app)

I am not a fan of javascript frameworks & like to use kotlin as single language for full stack development.

Thanks


#2

There is Yested, which a simple framework which wraps components from other JS libraries (like Bootstrap) plus some of its own (complex grid/table control). The “new Yested” at https://github.com/jean79/yested_fw is still based on Kotlin 1.0, however. I ported “old Yested” (at https://github.com/jean79/yested, which has a much simpler “framework” part which doesn’t give you much) to Kotlin 1.1 before I realised there was a new one. Someone could take the same approach and port the new one to 1.1, and it might be me, but not any time soon.

All that said, why not just use one or more existing JS libraries with a thin Kotlin adapter layer on top? It seems like there are several JvM-based Kotlin libraries which take this approach, and it makes sense to me. Why re-invent the whole wheel if most of it is good enough?


#3

you can write your front end app using Kotlin and then compile it to JS to run on brower
at the moment they provide this gradle plugin to compile Kotlin to JS

have a look at my example for a FullStack app written with Kotlin which runs on Node.js
here a link:
http://techprd.com/kotlin-node-js-seed-project/
Github:


#4

One way of writing webcomponent-based webapps is to use pure-JS on client-side, communicating with REST with server-side. However, I also dislike JS so that’s not an option for me. Luckily, there is also another option now.

It is possible to only include existing webcomponents to your page, then you can nest them, orchestrate them and control them from your JVM-based server. This is the essence of Vaadin 10 / Flow: https://vaadin.com/flow . There are Kotlin bindings of course, see an example project here: https://github.com/mvysny/vaadin-on-kotlin/tree/master/vok-example-flow-sql2o . The following videos explain these ideas further: https://www.youtube.com/watch?v=1GVdKwrI16A