HeinrichApfelmus / threepenny-gui

GUI framework that uses the web browser as a display.
https://heinrichapfelmus.github.io/threepenny-gui/
Other
439 stars 77 forks source link

Compile UI code to JavaScript #61

Closed vlatkoB closed 5 years ago

vlatkoB commented 10 years ago

Hi,

Maybe a solution for too much traffic generated between server/client is to move the client code to the client (Haskell->JS) so the most of the client stuff that happen on client, stays on client.

Google’s GWT has something similar for Java and its solution might be used in 3p as well.

In GWT you're writing all the web-app code in Java, but the project is physically separated into 3 top directories/sections: server, client and shared.

Client code is written in files that will be compiled into JS. That code has limitations on functions that can be used, but it is possible to use FFI for third-party JS functions and wrappers for JS vars.

Server code is full blown Haskell code that will be executed on host.

Not so much server/client communication.

Best regards,

vlatko