You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 10, 2024. It is now read-only.
KWeb is an experimental [Kotlin](http://kotlinlang.org/) library for building rich interactive web applications in pure Kotlin in a way
6
+
Kweb is an experimental [Kotlin](http://kotlinlang.org/) library for building rich interactive web applications in pure Kotlin in a way
7
7
that makes the distinction between web browser and server largely invisible to the programmer.
8
8
9
9
In particular, it can use the new [coroutines](https://github.com/Kotlin/kotlinx.coroutines) mechanism in
@@ -17,10 +17,10 @@ Building rich webapps normally requires navigating the
17
17
choosing between a vast multitude of tools, transpilers, minifiers, state maintainers, and so on, most of which will
18
18
be obsolete in 6 months. Then you're faced with handling interaction between client and server which is a whole other world of pain.
19
19
20
-
KWeb intends to solve this.
20
+
Kweb intends to solve this.
21
21
22
22
### How does it work?
23
-
KWeb treats the web browser as a fairly dumb robot, keeping most of the intelligence server-side,
23
+
Kweb treats the web browser as a fairly dumb robot, keeping most of the intelligence server-side,
24
24
relaying instructions to the client via a websocket, and receiving responses from the client. Instructions to the server
25
25
are simple JavaScript snippets which the browser immediately executes, returning the result to the server if requested.
26
26
@@ -32,17 +32,17 @@ transparently keeping server and client state in sync, motivated largely by the
32
32
to HTML in the event that the browser doesn't support JavaScript. This requirement is a lot less relevant today than it
33
33
was a decade ago.
34
34
35
-
Uniquely, KWeb takes advantage of the new coroutines functionality in the upcoming Kotlin 1.1 to handle
36
-
asynchronously waiting for responses from the client in a way that's almost transparent to the user of KWeb, without tying up threads (a definite no-no if you plan on having more than a handful of people visiting your website at a delay).
35
+
Uniquely, Kweb takes advantage of the new coroutines functionality in the upcoming Kotlin 1.1 to handle
36
+
asynchronously waiting for responses from the client in a way that's almost transparent to the user of Kweb, without tying up threads (a definite no-no if you plan on having more than a handful of people visiting your website at a delay).
37
37
38
38
#### News
39
39
##### 2017-01-09: Plugins
40
-
KWeb now has a simple but flexible plugin mechanism, allowing the addition of support for 3rd party JavaScript libraries.
40
+
Kweb now has a simple but flexible plugin mechanism, allowing the addition of support for 3rd party JavaScript libraries.
41
41
42
42
As an example, here is a [demo](https://github.com/sanity/kweb/blob/master/src/main/kotlin/com/github/sanity/kweb/demos/jquery/jquery.kt) of a rudimentary JQuery plugin being used, and [here](https://github.com/sanity/kweb/blob/master/src/main/kotlin/com/github/sanity/kweb/plugins/jqueryCore/JQueryCorePlugin.kt) you can see its implementation. Currently it only supports .remove() - but you should get a feel for how easy it will be to flesh out other functionality.
43
43
44
44
##### 2017-01-08: Initial announcement
45
-
KWeb is currently very experimental, at this stage more of a proof-of-concept and playground for ideas than anything
45
+
Kweb is currently very experimental, at this stage more of a proof-of-concept and playground for ideas than anything
46
46
even close to being useful in production.
47
47
48
48
The DOM DSL only covers a tiny subset of its eventual functionality, just barely more than is required for the TODO
@@ -54,7 +54,7 @@ Have questions, ideas, or otherwise want to contribute?
54
54
Join our Slack channel [#kweb on kotlinlang](https://kotlinlang.slack.com/messages/kweb/)! You may need to [sign up for kotlinlang](http://kotlinslackin.herokuapp.com/) first.
55
55
56
56
Take a look at our [open issues](https://github.com/sanity/kweb/issues), some of them should be quite easy to tackle, even
57
-
for someone new to KWeb. I will do my best to review and merge any suitable pull requests promptly.
57
+
for someone new to Kweb. I will do my best to review and merge any suitable pull requests promptly.
58
58
59
59
#### Getting started
60
60
1. Ensure you are using the "Early Access Preview 1.1" Kotlin plugin in IDEA, see "How to Try It" section at the
@@ -72,18 +72,18 @@ This is way longer than it needs to be due to the extensive comments, it may als
0 commit comments