rabbibotton / clog

CLOG - The Common Lisp Omnificent GUI
Other
1.49k stars 102 forks source link

Integrating third party JS libraries #139

Closed CGenie closed 2 years ago

CGenie commented 2 years ago

Hello, I was thinking of creating maps with d3/d3-geo. Any tips on how to implement such foreign lib FFI with clog?

MuhammedZakir commented 2 years ago

This may help: https://github.com/rabbibotton/clog/discussions/111.

rabbibotton commented 2 years ago

My plan in work to 1.3 of clog is to include and example and some directions. I will push that up to try and do something in the next days.

Tip - 1 - use the same parameters of create-* used through out so that it can easily be used with the builder (I should make sure I did that with the two tutorials that already exist) Tip - 2 - you should derive clog-element if an html element or clog-obj when not

I am more than happy to review and help. Especially for the first few "plug-ins" we create, once people get the feel for it I think there will be many.

D3 is a bit more complex to try and wrap it all, but anything is doable. That is why I am planning to do first https://plotly.com/javascript/ based on D3

rabbibotton commented 2 years ago

The main examples to see is tutorial 20, how I used the ACE editor (with out wapping) in demo 3, and #111 is also worth a look.

rabbibotton commented 2 years ago

https://docs.google.com/document/d/1EDODcnyijP_EjrDQTiA0AB-zbMQzvCo2HltXarw5q5A

and the two projects

clog-typeahead clog-terminal

I will be adding some examples of custom properties to clog-terminal later and adding a template to make writing plugins easier this week.

rabbibotton commented 2 years ago

d3 btw is a bit more complicated since parts of d3 are a library of more base functions unrelated to GUI, to bind those requires use js-execute for executing arbitrary js and also may require setting up custom events to retrieve the results.

CGenie commented 2 years ago

OK thank you, this is interesting!