pollen-users icon indicating copy to clipboard operation
pollen-users copied to clipboard

Interactive books with Pollen?

Open jenshweber opened this issue 5 years ago • 1 comments

Hello, I just read through the Pollen information and I am wondering if Pollen is capable of creating interactive electronic books. I do understand (of course) that the underlying Racket system can do anything. However, I am wondering whether Pollen supports interactive books (i.e., books that allow readers to enter data that will then be processed by some Racket function and result in an update of the displayed page content.)

jenshweber avatar Mar 29 '20 07:03 jenshweber

I assume that you are targeting HTML. In that case, the "interactive" part requires JavaScript. You could either write JavaScript directly, use RacketScript (which allows you to write Racket, and it will translate the Racket code to JavaScript), or use Urlang (which allows you to create JavaScript syntax tree from Racket side).

Here's an example of my Pollen project that is "interactive". It allows users to step through program evaluation back and forth. Here's the JavaScript file.

sorawee avatar Mar 29 '20 07:03 sorawee