kotlinwildflykotlin-multiplatform

Can 'Kotlin Multiplatform Web' be used with other 'server-side' rather than Ktor?


I've deployed using Kotlin (& Java) on my EE Server Applications on:

Using Jakarta Faces (JSF) for the Web UI.

I want to migrate to 'Kotlin Multiplatform' to use Web UI first, then Android & iOS.

Do I have to use Ktor as the Server or can I stay with WildFly & Jakarta EE?

I don't want to migrate to 'Spring Boot' either.


Solution

  • Your current stack (WildFly, Jakarta EE, Kotlin) already supports standard Java bytecode and interoperates well with Kotlin.

    Since you're interested in moving the Web UI first, here’s how it typically works:

    1. Adopt Kotlin Multiplatform (KMP) in shared modules (business logic, DTOs, network models, etc.).  
    
    2. For Web UI, you can use:  
    
        - Kotlin/JS with React wrappers (Kotlin React)  
           Libraries:   
                     kotlin-wrappers:kotlin-react, kotlin-react-dom  
                     kotlin-emotion (for styling)  
                     kotlin-react-router (for routing)
    
    
        OR
    
        - JetBrains Compose for Web (experimental but maturing).  
    
    These frontend frameworks produce JavaScript that can be deployed alongside or separately from your backend via CDN. 
    
    1. KMP encourages splitting your app into shared, frontend, and backend modules.

    2. Your backend (WildFly/Jakarta EE) remains a JVM project.

    3. Only the frontend module would need to target Kotlin/JS.