Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kwebio/kweb-core
A Kotlin web framework
https://github.com/kwebio/kweb-core
dom html kotlin ktor web-framework web-performance
Last synced: about 2 months ago
JSON representation
A Kotlin web framework
- Host: GitHub
- URL: https://github.com/kwebio/kweb-core
- Owner: kwebio
- License: lgpl-3.0
- Created: 2017-01-08T02:18:02.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-18T14:14:17.000Z (7 months ago)
- Last Synced: 2024-05-21T01:58:51.438Z (7 months ago)
- Topics: dom, html, kotlin, ktor, web-framework, web-performance
- Language: Kotlin
- Homepage: https://docs.kweb.io/book
- Size: 26.6 MB
- Stars: 963
- Watchers: 19
- Forks: 53
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-list - kwebio/kweb-core - A Kotlin web framework (Kotlin)
- awesome-kotlin - kweb-core - A lightweight Kotlin web framework for backend developers π¦ (Libraries)
- awesome-ktor - Kweb
- awesome-ktor - Kweb
README
# Kweb - A Kotlin web framework
## Notice of Project Status (June 2024)
Due primarily to recent [changes](https://www.reddit.com/r/java/comments/1dkgh85/psa_maven_central_publishing_requires_token_now/) in Sonatype's deployment requirements, and persistent other [headaches](https://www.reddit.com/r/Kotlin/comments/y042g1/rant_gradle_is_an_embarrassment_to_the_javakotlin/) with JVM ecosystem tooling, I'm no longer able to actively support Kweb.
The last straw was Sonatype breaking my automatic deployment process by changing how it's authenticated, and [apparently](https://help.sonatype.com/en/user-tokens.html) requiring a paid upgrade to their Pro service to fix it. Over the past two years, most of the time I've spent on Kweb has been dealing with tooling regressions rather than improving the software.
This decision wasn't easy, but itβs become untenable for me to continue maintaining the framework given these challenges.
If you are interested in taking over the project or contributing to its development, please feel free to fork the repository. If you need to contact me I'm @sanity on [X](https://x.com/sanity) and [Reddit](https://reddit.com/u/sanity).
## Quick Start
Read the [Introduction](https://docs.kweb.io/book/intro.html) or
[Getting Started](https://docs.kweb.io/book/gettingstarted.html) from
the [Kweb User Manual](https://docs.kweb.io/book/).## Why another web framework?
Kweb is designed to make it easy for developers to create modern websites without having to worry about the complexities of communication between the server and the browser. With a unified codebase, you can focus on creating an intuitive and user-friendly interface, rather than spending time on technical details. By streamlining the development process, Kweb makes it easier to build functional and beautiful websites that meet the needs of your users.
## How does it work?
Kweb is a remote interface for a web browser's DOM (Document Object Model). With Kweb, you can create and manipulate DOM elements, and listen for and handle events, all using an intuitive Kotlin DSL that mirrors the structure of the HTML being created. Kweb is built on the Ktor framework, which handles HTTP, HTTPS, and WebSocket transport, and is optimized to minimize latency and resource usage on both the server and browser.
### Note on Memory Leak Issue
We have identified a memory leak issue that may affect users when using the `InputElement` class, we're working on a [fix](https://github.com/kwebio/kweb-core/pull/611) but can't make any promises if/when it will be completed. We recommend that you run a memory profiler to see if you're affected.
## Example
```kotlin
import kweb.*
import kweb.InputType.textfun main() {
Kweb(port = 16097) {
doc.body {
val name = kvar("")
div {
h1().text("Enter Your Name")
input(type = text).value = name
}
div {
span().text(name.map { "Hello, $it" })
}
}
}
}