Closed mb21 closed 6 years ago
Good! Let's make it into a small cross-platform library libs/hs/qua-web-api
. Also try to keep a bare minimum of dependencies - this is important for qua-view (atm, qua-view.js can be up to 15 mb without optimizations already).
Another, connected task is to track all necessary api calls. What we remember so far:
qua-web-api
, because it is just a bytestring from the point of view of qua-kit)Because you're using ghcjs and reflex, you could use servant and reflex-servant to take care of most of the boiler plate.
Yes, we could. Though, it is debatable if the benefit of using servant API outweights the costs of integrating servant into yesod, porting existing yesod handlers, and, most importantly, having more deps in GHCJS output.
Do you know how much servant-reflex
adds up to the output size? If around 100KB then I would agree, if couple megabytes then it would be too much.
This has been done on the reflex branch...
Make conditionals in .cabal file, e.g.:
Use CPP to select proper imports in each implementation, e.g.:
Use DeriveGeneric extension to automate generation of from/to json:
Hope for good luck!