meiersi / blaze-react

A blaze-html style ReactJS binding for Haskell using GHCJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decouple from html library (blaze)

vagifverdi opened this issue · comments

How much effort would it be to decouple this library from blaze and allow using other html generating libraries like lucid or hamlet?

I could be wrong, but it looks to me the point of this library is javascript generation, not html. So it should not force users to use a specific html library.

The library uses the same "surface syntax" as blaze-thml, but not the same implementation. The implementation uses a different representation for Html values, as it also needs to represent event-handlers. Different surface syntax can be added, as it is just a matter of adding different combinators. However, the library is still in an experimental phase, and the syntactic issue does not have a very high priority for now.

Moreover, the point of this library is to provide a versatile GUI framework using React.js as a platform. We are for example experimenting with running the GUI server-side and serializing the Html value as standard Html to provide a very snappy first-load experience.

Hi @meiersi, I think it's too late to ask but I'll try anyway.

Do you have any chance to release reimplementation of blaze-html only this part (with EventHandler as well) as a separate package on hackage?

BTW, could you bring some light on results of your experiments with server-side rendering? I am currently doing absolutely the same experiments but with different JS-less bridge and, occasionally, without GHCJS.

Right now I am a bit struggling during sharing one server state across several routes and find Text.Blaze.Event modules awesome.

Best Regards,
@swamp-agr

Hi @swamp-agr , thanks for asking. It is indeed too late for this project. I'm currently not working in the web-app space, but if I were I'd be looking at https://reflex-frp.org/ -- that is actively maintained and I've heard good things about it. All the best with your experiments, Simon.

Hi @meiersi, thank you for response!

We had already met in 2016 during one of HaskellerZ meetup and it is a pleasure for me to make this conversation. I am currently working on side-project that include some interesting combination of technologies and packages. I had already reviewed reflex and (miso as well) and found out that they are using GHCJS with high JS overhead right after compilation (>1 MB after compilation).

So, I decided to take pretty unused Fay and built on top of it tiny bridge between JS world and GHC for further experiments. And to be honest, one of missing chunks of my puzzle was integration with blaze-html that had already been resolved right here. I will try to reuse Text.Blaze.Event and refer to this repo as inspiration for me and deep work that was done here.

Thanks and regards, Andrey.

Hi @meiersi,

I had chosen a weird approach (with Fay compiler instead of GHCJS), combined it with EventHandler and extended MarkupM from your package. And now I am publishing new reactive web framework. With respect to work that was done several years ago I mentioned you and this repo in Aknowledgement section.

Best Regards,
@swamp-agr.