Kotlin for creation and APIs: is it only for Android?

2

I saw some features offered by the Kotlin tool, even more so when it comes to saving lines of code and verbosity generated in Java.

How is the tool for generating services and consumed by Web applications? Like Angular 2+, for example ... Would language have this support?

    
asked by anonymous 12.11.2018 / 04:38

2 answers

3

Kotlin is a language like any other. It does not have any specific technology binding and is capable of executing anything. It is an exception to any language that has limitations on use.

Of course, the support for extra libraries and tools always varies from language to language. Kotlin can be used as a web backend without any hassle, but there is not as good a support as other solutions, even by having a small community today. But almost everything that is good for Java is for it to a greater or lesser degree, so the support is not that small.

Angular is a frontend technology . Support in browsers for languages other than JavaScript is recent. Kotlin even has a JavaScript generation mode, but when it can generate its own code it will be more powerful. In any case it is possible to integrate with Angular, but it will make little sense, and will have little compatibility. It will be more interesting to have a framework of it to replace the Angular in the browser. But of course, if it is used in , it can communicate seamlessly with the client running Angular, it's completely different things that communicate through universal protocols.

    
12.11.2018 / 07:55
4

Yes, it is perfectly possible to build your backend with Kotlin.

One of Kotlin's top priorities is to offer interoperability with Java. So, practically all libraries / frameworks you would use to build your Java backend can be used with Kotlin.

A great example today is Spring , one of the largest web frameworks for Java, which already offers support for Kotlin for more than two years .

    
12.11.2018 / 10:17