https://github.com/openmole/scalawui
A ready to work Client/Server application built with Scalatra, scalaJS, scalaTags, scalarx and autowire. An example using the svg lib.
https://github.com/openmole/scalawui
Last synced: 3 months ago
JSON representation
A ready to work Client/Server application built with Scalatra, scalaJS, scalaTags, scalarx and autowire. An example using the svg lib.
- Host: GitHub
- URL: https://github.com/openmole/scalawui
- Owner: openmole
- License: agpl-3.0
- Created: 2014-07-27T16:20:45.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2022-11-07T12:57:11.000Z (over 3 years ago)
- Last Synced: 2025-12-21T15:09:05.990Z (5 months ago)
- Language: Scala
- Homepage:
- Size: 1.3 MB
- Stars: 54
- Watchers: 7
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ScalaWUI (Scala Web UI)
[](https://www.scala-js.org/)
The project aims at building a small but complete client / server application using very powerfull scala tools to construct fully typed and reactive Web applications. Among them:
- [scalajs](https://github.com/scala-js/scala-js)
- [scalatra](http://scalatra.org/)
- [scalatags](https://github.com/lihaoyi/scalatags)
- [scala.rx](https://github.com/lihaoyi/scala.rx)
- [autowire](https://github.com/lihaoyi/autowire)
- [boopickle](https://github.com/suzaku-io/boopickle)
as well as [scaladget](https://github.com/mathieuleclaire/scaladget) to draw some svg and display a [http://d3js.org/](D3.js)-like workflow.
It is an empty ready-to-work application, dealing with all the starting wiring. This prototype also exposes as example a small Graph editor inspired from [http://bl.ocks.org/cjrd/6863459](http://bl.ocks.org/cjrd/6863459) javascript example, but written witten in a reactive way thanks to the [scala.rx](https://github.com/lihaoyi/scala.rx) library.
## Build & Run##
First, build the javascript:
```sh
$ cd scalaWUI
$ sbt
> go // Build the client JS files and move them to the right place
```
Then, start the server:
```sh
> jetty:start // Start the server
```
## Play with the graph ##
Open [http://localhost:8080/](http://localhost:8080/) in your browser.
The demo provides with a small graph based on d3.js library but with no D3 at all. It only relies on the previously cited libraries. Try to :
- drag the nodes to move them
- shift-click on graph to create a node
- shift-click on a node and then drag to another node to connect them with a directed edge
- click on node or edge and press delete to delete
