Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[some request] tutorial/demo on interfacing 3rd javascript code #21

Open
retsyo opened this issue Jun 21, 2023 · 8 comments
Open

[some request] tutorial/demo on interfacing 3rd javascript code #21

retsyo opened this issue Jun 21, 2023 · 8 comments
Labels
documentation Improvements or additions to documentation

Comments

@retsyo
Copy link

retsyo commented Jun 21, 2023

for example
https://github.com/olifolkerd/tabulator
https://github.com/jspreadsheet/ce

further, is it possible to interface 3rd javascript code without writing any js code?

thanks

@delphius
Copy link

Since webui is a mechanism for accessing the browser via web sockets, two-way data and event binding functions are available to you. Thus, you can write a backend wrapper library in your preferred programming language, using, for example, events and callbacks provided by tabulator , which will allow you to create, display and manage tables using all the features provided by this js library, without resorting directly to javascript programming. But, in any case, it will require initial work on writing a wrapper using, including javascript

@retsyo
Copy link
Author

retsyo commented Jun 21, 2023

so bad, javascript is not my language

@delphius
Copy link

Please describe in general terms, using the example of some library, for example tabulator, how are you going to use it from your programming language? Or give an example of a similar ready-made solution, even if not in your preferred programming language, which can be taken as the basis of your use case.

@delphius
Copy link

further, is it possible to interface 3rd javascript code without writing any js code?

Possible approaches

@AlbertShown
Copy link

Tabulator and CE you provided are written in JavaScript. Using it will require JavaScript skills as well.
Someone will probably create an example using those JavaScript plugins, but using WebUI generally requires Web skills.

@neroist neroist added the documentation Improvements or additions to documentation label Jun 23, 2023
@neroist
Copy link
Contributor

neroist commented Jul 3, 2023

further, is it possible to interface 3rd javascript code without writing any js code?

You could probably write Nim code, compile it to JS, then link the JS in the HTML code. For external libraries, you could wrap them and import functions with importc.

@retsyo
Copy link
Author

retsyo commented Oct 27, 2023

I met htmx which seems to be successful in some projects by reducing JavaScript code. Will it be useful for nim-webui? I don't know since I know nothing about front-end programming

@hassandraga
Copy link
Member

Thank you @retsyo for pointing this out. I guess HTMX is useful for end-user because this can reduce the need of JS in their apps. While WebUI itself does not provide/generate any HTML hypertext.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants